Skip to content

Commit ac1e648

Browse files
committed
fix tests compilation
1 parent 41b742e commit ac1e648

File tree

6 files changed

+55
-228
lines changed

6 files changed

+55
-228
lines changed

Cargo.lock

Lines changed: 37 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ async-channel = "2"
727727
bitfinity-block-confirmation = { path = "crates/bitfinity-block-confirmation" }
728728
candid = "0.10"
729729
did = { git = "https://github.com/bitfinity-network/bitfinity-evm-sdk", package = "did", branch = "alloy_0_12" }
730-
dirs = "5.0.1"
730+
dirs = "6"
731731
ethereum-json-rpc-client = { git = "https://github.com/bitfinity-network/bitfinity-evm-sdk", package = "ethereum-json-rpc-client", branch = "alloy_0_12", features = [
732732
"reqwest",
733733
] }

bin/reth/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ ethereum-json-rpc-client = { workspace = true, features = ["reqwest"] }
111111
jsonrpsee = { workspace = true }
112112
parking_lot = { workspace = true }
113113
rand = { workspace = true }
114+
reth-evm = { workspace = true, features = ["test-utils"] }
114115
reth-primitives = { workspace = true, features = ["test-utils"] }
115116
reth-trie = { workspace = true, features = ["test-utils"] }
116117
revm-primitives.workspace = true

bin/reth/tests/commands/bitfinity_import_it.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,6 @@ fn compute_state_root(genesis_balances: &[(Address, U256)]) -> H256 {
503503
..Default::default()
504504
},
505505
hardforks: Default::default(),
506-
genesis_hash: Default::default(),
507506
paris_block_and_final_difficulty: None,
508507
deposit_contract: None,
509508
..Default::default()

bin/reth/tests/commands/bitfinity_node_it.rs

Lines changed: 11 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,20 @@ use reth_db::test_utils::TempDatabase;
1919
use reth_db::DatabaseEnv;
2020
use reth_db::{init_db, test_utils::tempdir_path};
2121
use reth_discv5::discv5::enr::secp256k1::{Keypair, Secp256k1};
22-
use reth_network::NetworkHandle;
22+
use reth_errors::ConsensusError;
23+
use reth_network::EthNetworkPrimitives;
2324
use reth_node_api::{FullNodeTypesAdapter, NodeTypesWithDBAdapter, TreeConfig};
24-
use reth_node_builder::components::Components;
25-
use reth_node_builder::rpc::RpcAddOns;
2625
use reth_node_builder::{EngineNodeLauncher, NodeAdapter, NodeBuilder, NodeConfig, NodeHandle};
27-
use reth_node_ethereum::node::{EthereumAddOns, EthereumEngineValidatorBuilder};
26+
use reth_node_ethereum::node::EthereumAddOns;
2827
use reth_node_ethereum::{
2928
BasicBlockExecutorProvider, EthEvmConfig, EthereumNode,
3029
};
31-
use reth_primitives::{Transaction, TransactionSigned};
30+
use reth_primitives::{EthPrimitives, Transaction, TransactionSigned};
3231
use reth_provider::providers::BlockchainProvider;
33-
use reth_rpc::EthApi;
3432
use reth_tasks::TaskManager;
3533
use reth_transaction_pool::{
3634
blobstore::DiskFileBlobStore, CoinbaseTipOrdering, EthPooledTransaction,
37-
EthTransactionValidator, Pool, TransactionValidationTaskExecutor,
35+
EthTransactionValidator, TransactionValidationTaskExecutor,
3836
};
3937
use revm_primitives::{hex, Address, B256, U256};
4038
use std::{net::SocketAddr, str::FromStr, sync::Arc};
@@ -318,6 +316,7 @@ fn sign_tx_with_random_key_pair(tx: Transaction) -> TransactionSigned {
318316
}
319317

320318
fn sign_tx_with_key_pair(key_pair: Keypair, tx: Transaction) -> TransactionSigned {
319+
use alloy_consensus::SignableTransaction;
321320
let signature = reth_primitives::sign_message(
322321
B256::from_slice(&key_pair.secret_bytes()[..]),
323322
tx.signature_hash(),
@@ -330,111 +329,8 @@ fn sign_tx_with_key_pair(key_pair: Keypair, tx: Transaction) -> TransactionSigne
330329
pub async fn start_reth_node(
331330
bitfinity_evm_url: Option<String>,
332331
import_data: Option<ImportData>,
333-
) -> (
334-
EthJsonRpcClient<ReqwestClient>,
335-
NodeHandle<
336-
NodeAdapter<
337-
FullNodeTypesAdapter<
338-
EthereumNode,
339-
Arc<TempDatabase<DatabaseEnv>>,
340-
BlockchainProvider<
341-
NodeTypesWithDBAdapter<EthereumNode, Arc<TempDatabase<DatabaseEnv>>>,
342-
>,
343-
>,
344-
Components<
345-
FullNodeTypesAdapter<
346-
EthereumNode,
347-
Arc<TempDatabase<DatabaseEnv>>,
348-
BlockchainProvider<
349-
NodeTypesWithDBAdapter<EthereumNode, Arc<TempDatabase<DatabaseEnv>>>,
350-
>,
351-
>,
352-
reth_network::EthNetworkPrimitives,
353-
Pool<
354-
TransactionValidationTaskExecutor<
355-
EthTransactionValidator<
356-
BlockchainProvider<
357-
NodeTypesWithDBAdapter<
358-
EthereumNode,
359-
Arc<TempDatabase<DatabaseEnv>>,
360-
>,
361-
>,
362-
EthPooledTransaction,
363-
>,
364-
>,
365-
CoinbaseTipOrdering<EthPooledTransaction>,
366-
DiskFileBlobStore,
367-
>,
368-
EthEvmConfig,
369-
BasicBlockExecutorProvider<EthExecutionStrategyFactory>,
370-
Arc<dyn FullConsensus>,
371-
>,
372-
>,
373-
RpcAddOns<
374-
NodeAdapter<
375-
FullNodeTypesAdapter<
376-
EthereumNode,
377-
Arc<TempDatabase<DatabaseEnv>>,
378-
BlockchainProvider<
379-
NodeTypesWithDBAdapter<EthereumNode, Arc<TempDatabase<DatabaseEnv>>>,
380-
>,
381-
>,
382-
Components<
383-
FullNodeTypesAdapter<
384-
EthereumNode,
385-
Arc<TempDatabase<DatabaseEnv>>,
386-
BlockchainProvider<
387-
NodeTypesWithDBAdapter<EthereumNode, Arc<TempDatabase<DatabaseEnv>>>,
388-
>,
389-
>,
390-
reth_network::EthNetworkPrimitives,
391-
Pool<
392-
TransactionValidationTaskExecutor<
393-
EthTransactionValidator<
394-
BlockchainProvider<
395-
NodeTypesWithDBAdapter<
396-
EthereumNode,
397-
Arc<TempDatabase<DatabaseEnv>>,
398-
>,
399-
>,
400-
EthPooledTransaction,
401-
>,
402-
>,
403-
CoinbaseTipOrdering<EthPooledTransaction>,
404-
DiskFileBlobStore,
405-
>,
406-
EthEvmConfig,
407-
BasicBlockExecutorProvider<EthExecutionStrategyFactory>,
408-
Arc<dyn FullConsensus>,
409-
>,
410-
>,
411-
EthApi<
412-
BlockchainProvider<
413-
NodeTypesWithDBAdapter<EthereumNode, Arc<TempDatabase<DatabaseEnv>>>,
414-
>,
415-
Pool<
416-
TransactionValidationTaskExecutor<
417-
EthTransactionValidator<
418-
BlockchainProvider<
419-
NodeTypesWithDBAdapter<
420-
EthereumNode,
421-
Arc<TempDatabase<DatabaseEnv>>,
422-
>,
423-
>,
424-
EthPooledTransaction,
425-
>,
426-
>,
427-
CoinbaseTipOrdering<EthPooledTransaction>,
428-
DiskFileBlobStore,
429-
>,
430-
NetworkHandle,
431-
EthEvmConfig,
432-
>,
433-
EthereumEngineValidatorBuilder,
434-
>,
435-
>,
436-
TaskManager,
437-
) {
332+
) -> (EthJsonRpcClient<ReqwestClient>, NodeHandle<NodeAdapter<FullNodeTypesAdapter<EthereumNode, Arc<TempDatabase<DatabaseEnv>>, BlockchainProvider<NodeTypesWithDBAdapter<EthereumNode, Arc<TempDatabase<DatabaseEnv>>>>>, reth_node_builder::components::Components<FullNodeTypesAdapter<EthereumNode, Arc<TempDatabase<DatabaseEnv>>, BlockchainProvider<NodeTypesWithDBAdapter<EthereumNode, Arc<TempDatabase<DatabaseEnv>>>>>, EthNetworkPrimitives, reth_transaction_pool::Pool<TransactionValidationTaskExecutor<EthTransactionValidator<BlockchainProvider<NodeTypesWithDBAdapter<EthereumNode, Arc<TempDatabase<DatabaseEnv>>>>, EthPooledTransaction>>, CoinbaseTipOrdering<EthPooledTransaction>, DiskFileBlobStore>, EthEvmConfig, BasicBlockExecutorProvider<EthEvmConfig>, Arc<(dyn FullConsensus<EthPrimitives, Error = ConsensusError> + 'static)>>>, EthereumAddOns<NodeAdapter<FullNodeTypesAdapter<EthereumNode, Arc<TempDatabase<DatabaseEnv>>, BlockchainProvider<NodeTypesWithDBAdapter<EthereumNode, Arc<TempDatabase<DatabaseEnv>>>>>, reth_node_builder::components::Components<FullNodeTypesAdapter<EthereumNode, Arc<TempDatabase<DatabaseEnv>>, BlockchainProvider<NodeTypesWithDBAdapter<EthereumNode, Arc<TempDatabase<DatabaseEnv>>>>>, EthNetworkPrimitives, reth_transaction_pool::Pool<TransactionValidationTaskExecutor<EthTransactionValidator<BlockchainProvider<NodeTypesWithDBAdapter<EthereumNode, Arc<TempDatabase<DatabaseEnv>>>>, EthPooledTransaction>>, CoinbaseTipOrdering<EthPooledTransaction>, DiskFileBlobStore>, EthEvmConfig, BasicBlockExecutorProvider<EthEvmConfig>, Arc<(dyn FullConsensus<EthPrimitives, Error = ConsensusError> + 'static)>>>>>, TaskManager)
333+
{
438334
let tasks = TaskManager::current();
439335

440336
// create node config
@@ -776,9 +672,9 @@ pub mod eth_server {
776672
let tx = sign_tx_with_random_key_pair(MockTransaction::legacy().with_hash(hash).into());
777673
let did_tx = did::Transaction {
778674
hash: hash.into(),
779-
r: tx.signature.r().into(),
780-
s: tx.signature.s().into(),
781-
v: (tx.signature.recid().to_byte() as u64).into(),
675+
r: tx.signature().r().into(),
676+
s: tx.signature().s().into(),
677+
v: (tx.signature().recid().to_byte() as u64).into(),
782678
..Default::default()
783679
};
784680

0 commit comments

Comments
 (0)