diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8782d6af9..6b144b71d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -123,6 +123,7 @@ jobs: include: - debug_getRawReceipts - debug_getRawTransaction/get-tx$ + - debug_getRawBlock/get-invalid-number$ - eth_blockNumber/simple-test$ - eth_call/call-simple-contract$ - eth_call/call-simple-transfer$ diff --git a/Cargo.lock b/Cargo.lock index 3b0bce0c8..023c3960e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3705,10 +3705,10 @@ dependencies = [ ] [[package]] -name = "dotenv" -version = "0.15.0" +name = "dotenvy" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "dunce" @@ -6662,7 +6662,7 @@ dependencies = [ "cainome", "cairo-lang-starknet 2.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "dojo-test-utils", - "dotenv", + "dotenvy", "ef-testing", "env_logger", "ethers", diff --git a/Cargo.toml b/Cargo.toml index b67f50871..0aea620e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,7 +51,7 @@ anyhow = { version = "1.0.68", default-features = false } async-trait = { version = "0.1.58", default-features = false } auto_impl = { version = "1.1.0", default-features = false } bytes = { version = "1", default-features = false } -dotenv = { version = "0.15.0", default-features = false } +dotenvy = { version = "0.15", default-features = false } env_logger = { version = "0.10.0", default-features = false } eyre = { version = "0.6.8", default-features = false } diff --git a/README.md b/README.md index de4c11612..5930636b0 100644 --- a/README.md +++ b/README.md @@ -247,12 +247,9 @@ by the Kakarot RPC. For the [hive rpc compatibility tests](https://github.com/kkrt-labs/hive/tree/master/simulators/ethereum/rpc-compat), the following tests are skipped: -- debug_getRawBlock/get-block-n: debug API is currently not supported by the - Kakarot RPC. -- debug_getRawBlock/get-genesis: debug API is currently not supported by the - Kakarot RPC. -- debug_getRawBlock/get-invalid-number: debug API is currently not supported by the - Kakarot RPC. +- debug_getRawBlock/get-block-n: the Kakarot implementation currently + doesn't compute the block hash following EVM standards. +- debug_getRawBlock/get-genesis: see `debug_getRawBlock/get-block-n`. - debug_getRawHeader/get-block-n: debug API is currently not supported by the Kakarot RPC. - debug_getRawHeader/get-genesis: debug API is currently not supported by the @@ -273,12 +270,11 @@ the following tests are skipped: - eth_feeHistory/fee-history: the Kakarot implementation doesn't currently set the block gas limit dynamically, which causes some disparity in the returned data. Additionally, the rewards of the blocks aren't available. -- eth_getBalance/get-balance-blockhash: the Kakarot implementation currently - doesn't compute the block hash following EVM standards . -- eth_getBlockByHash/get-block-by-hash: see `eth_getBalance/get-balance-blockhash`. -- eth_getBlockReceipts/get-block-receipts-by-hash: see `eth_getBalance/get-balance-blockhash`. -- eth_getBlockTransactionCountByHash/get-block-n: see `eth_getBalance/get-balance-blockhash`. -- eth_getBlockTransactionCountByHash/get-genesis: see `eth_getBalance/get-balance-blockhash`. +- eth_getBalance/get-balance-blockhash: see `debug_getRawBlock/get-block-n`. +- eth_getBlockByHash/get-block-by-hash: see `debug_getRawBlock/get-block-n`. +- eth_getBlockReceipts/get-block-receipts-by-hash: see `debug_getRawBlock/get-block-n`. +- eth_getBlockTransactionCountByHash/get-block-n: see `debug_getRawBlock/get-block-n`. +- eth_getBlockTransactionCountByHash/get-genesis: see `debug_getRawBlock/get-block-n`. - eth_getProof/get-account-proof-blockhash: the getProof endpoint is currently not supported by the Kakarot RPC. - eth_getProof/get-account-proof-with-storage: the getProof endpoint is currently @@ -298,7 +294,7 @@ the following tests are skipped: code of `-32602` which corresponds to an invalid parameters error, whenever it encounters issues when deserializing the input. We decide to ignore this test as the only issue is the error code returned. -- eth_getTransactionByBlockHashAndIndex/get-block-n: see `eth_getBalance/get-balance-blockhash`. +- eth_getTransactionByBlockHashAndIndex/get-block-n: see `debug_getRawBlock/get-block-n`. In addition to the tests we skip, some of the objects fields need to be ignored in the passing tests: diff --git a/src/bin/hive_genesis.rs b/src/bin/hive_genesis.rs index 1143a7ae4..71fe62490 100644 --- a/src/bin/hive_genesis.rs +++ b/src/bin/hive_genesis.rs @@ -1,4 +1,4 @@ -use dotenv::dotenv; +use dotenvy::dotenv; use kakarot_rpc::test_utils::{hive::HiveGenesisConfig, katana::genesis::KatanaGenesisBuilder}; use starknet_crypto::FieldElement; use std::{env::var, path::Path}; diff --git a/src/bin/katana_genesis.rs b/src/bin/katana_genesis.rs index 3bb536642..752986859 100644 --- a/src/bin/katana_genesis.rs +++ b/src/bin/katana_genesis.rs @@ -1,4 +1,4 @@ -use dotenv::dotenv; +use dotenvy::dotenv; use ethers::types::U256; use kakarot_rpc::test_utils::katana::genesis::KatanaGenesisBuilder; use lazy_static::lazy_static; diff --git a/src/eth_provider/starknet/kakarot_core.rs b/src/eth_provider/starknet/kakarot_core.rs index d02bd88f2..421c003cb 100644 --- a/src/eth_provider/starknet/kakarot_core.rs +++ b/src/eth_provider/starknet/kakarot_core.rs @@ -3,7 +3,7 @@ use std::str::FromStr; use crate::models::felt::Felt252Wrapper; use alloy_rlp::Encodable; use cainome::rs::abigen_legacy; -use dotenv::dotenv; +use dotenvy::dotenv; use lazy_static::lazy_static; use reth_primitives::{Address, Transaction, TransactionSigned}; use starknet::{ diff --git a/src/main.rs b/src/main.rs index 1c7dec07f..f479e4a74 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ use std::env::var; use std::sync::Arc; -use dotenv::dotenv; +use dotenvy::dotenv; use eyre::Result; use kakarot_rpc::config::{JsonRpcClientBuilder, KakarotRpcConfig, Network, SequencerGatewayProviderBuilder}; use kakarot_rpc::eth_provider::database::Database; diff --git a/src/test_utils/katana/mod.rs b/src/test_utils/katana/mod.rs index a83eb0dbc..1d631d3fd 100644 --- a/src/test_utils/katana/mod.rs +++ b/src/test_utils/katana/mod.rs @@ -62,7 +62,7 @@ impl Katana { /// Initializes the Katana test environment. async fn initialize(sequencer: TestSequencer, starknet_provider: Arc>) -> Self { // Load PK - dotenv::dotenv().expect("Failed to load .env file"); + dotenvy::dotenv().expect("Failed to load .env file"); let pk = std::env::var("EVM_PRIVATE_KEY").expect("Failed to get EVM private key"); let pk = B256::from_str(&pk).expect("Failed to parse EVM private key");