mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: use reth_chainspec where possible (#8891)
This commit is contained in:
@ -8,6 +8,7 @@ license.workspace = true
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
reth-chainspec.workspace = true
|
||||
reth-discv4 = { workspace = true, features = ["test-utils"] }
|
||||
reth-network = { workspace = true, features = ["test-utils"] }
|
||||
reth-network-api.workspace = true
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
use reth_primitives::{
|
||||
b256, BaseFeeParams, Chain, ChainSpec, ForkCondition, Hardfork, NodeRecord, B256,
|
||||
};
|
||||
use reth_chainspec::{net::NodeRecord, BaseFeeParams, Chain, ChainSpec, ForkCondition, Hardfork};
|
||||
use reth_primitives::{b256, B256};
|
||||
|
||||
use std::{collections::BTreeMap, sync::Arc};
|
||||
|
||||
@ -16,7 +15,7 @@ pub(crate) fn bsc_chain_spec() -> Arc<ChainSpec> {
|
||||
paris_block_and_final_difficulty: None,
|
||||
hardforks: BTreeMap::from([(Hardfork::Shanghai, ForkCondition::Timestamp(SHANGHAI_TIME))]),
|
||||
deposit_contract: None,
|
||||
base_fee_params: reth_primitives::BaseFeeParamsKind::Constant(BaseFeeParams::ethereum()),
|
||||
base_fee_params: reth_chainspec::BaseFeeParamsKind::Constant(BaseFeeParams::ethereum()),
|
||||
prune_delete_limit: 0,
|
||||
}
|
||||
.into()
|
||||
|
||||
@ -8,6 +8,7 @@ license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
reth.workspace = true
|
||||
reth-chainspec.workspace = true
|
||||
reth-node-core.workspace = true
|
||||
reth-primitives.workspace = true
|
||||
reth-node-ethereum.workspace = true
|
||||
|
||||
@ -10,9 +10,10 @@ use reth::{
|
||||
rpc::eth::EthTransactions,
|
||||
tasks::TaskManager,
|
||||
};
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_node_core::{args::RpcServerArgs, node_config::NodeConfig};
|
||||
use reth_node_ethereum::EthereumNode;
|
||||
use reth_primitives::{b256, hex, ChainSpec, Genesis};
|
||||
use reth_primitives::{b256, hex, Genesis};
|
||||
use std::sync::Arc;
|
||||
|
||||
#[tokio::main]
|
||||
|
||||
@ -7,6 +7,7 @@ license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
reth.workspace = true
|
||||
reth-chainspec.workspace = true
|
||||
reth-rpc-types.workspace = true
|
||||
reth-node-api.workspace = true
|
||||
reth-node-core.workspace = true
|
||||
|
||||
@ -38,6 +38,7 @@ use reth_basic_payload_builder::{
|
||||
BasicPayloadJobGenerator, BasicPayloadJobGeneratorConfig, BuildArguments, BuildOutcome,
|
||||
PayloadBuilder, PayloadConfig,
|
||||
};
|
||||
use reth_chainspec::{Chain, ChainSpec};
|
||||
use reth_node_api::{
|
||||
payload::{EngineApiMessageVersion, EngineObjectValidationError, PayloadOrAttributes},
|
||||
validate_version_specific_fields, EngineTypes, PayloadAttributes, PayloadBuilderAttributes,
|
||||
@ -50,7 +51,7 @@ use reth_payload_builder::{
|
||||
error::PayloadBuilderError, EthBuiltPayload, EthPayloadBuilderAttributes, PayloadBuilderHandle,
|
||||
PayloadBuilderService,
|
||||
};
|
||||
use reth_primitives::{Address, Chain, ChainSpec, Genesis, Header, Withdrawals, B256};
|
||||
use reth_primitives::{Address, Genesis, Header, Withdrawals, B256};
|
||||
use reth_rpc_types::{
|
||||
engine::{
|
||||
ExecutionPayloadEnvelopeV2, ExecutionPayloadEnvelopeV3, ExecutionPayloadEnvelopeV4,
|
||||
|
||||
@ -7,6 +7,7 @@ license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
reth.workspace = true
|
||||
reth-chainspec.workspace = true
|
||||
reth-node-api.workspace = true
|
||||
reth-node-core.workspace = true
|
||||
reth-primitives.workspace = true
|
||||
|
||||
@ -17,10 +17,11 @@ use reth::{
|
||||
},
|
||||
tasks::TaskManager,
|
||||
};
|
||||
use reth_chainspec::{Chain, ChainSpec};
|
||||
use reth_node_api::{ConfigureEvm, ConfigureEvmEnv, FullNodeTypes};
|
||||
use reth_node_core::{args::RpcServerArgs, node_config::NodeConfig};
|
||||
use reth_node_ethereum::{EthEvmConfig, EthExecutorProvider, EthereumNode};
|
||||
use reth_primitives::{Chain, ChainSpec, Genesis, Header, TransactionSigned};
|
||||
use reth_primitives::{Genesis, Header, TransactionSigned};
|
||||
use reth_tracing::{RethTracer, Tracer};
|
||||
use std::sync::Arc;
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@ license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
reth.workspace = true
|
||||
reth-chainspec.workspace = true
|
||||
reth-primitives.workspace = true
|
||||
reth-node-api.workspace = true
|
||||
reth-basic-payload-builder.workspace = true
|
||||
|
||||
@ -5,9 +5,10 @@ use reth::{
|
||||
transaction_pool::TransactionPool,
|
||||
};
|
||||
use reth_basic_payload_builder::{BasicPayloadJobGeneratorConfig, PayloadBuilder, PayloadConfig};
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_node_api::PayloadBuilderAttributes;
|
||||
use reth_payload_builder::{error::PayloadBuilderError, PayloadJobGenerator};
|
||||
use reth_primitives::{BlockNumberOrTag, Bytes, ChainSpec};
|
||||
use reth_primitives::{BlockNumberOrTag, Bytes};
|
||||
use std::sync::Arc;
|
||||
|
||||
/// The generator type that creates new jobs that builds empty blocks.
|
||||
|
||||
@ -7,6 +7,7 @@ license.workspace = true
|
||||
|
||||
|
||||
[dependencies]
|
||||
reth-chainspec.workspace = true
|
||||
reth-db.workspace = true
|
||||
reth-primitives.workspace = true
|
||||
reth-provider.workspace = true
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
use reth_chainspec::ChainSpecBuilder;
|
||||
use reth_db::open_db_read_only;
|
||||
use reth_primitives::{Address, ChainSpecBuilder, B256};
|
||||
use reth_primitives::{Address, B256};
|
||||
use reth_provider::{
|
||||
providers::StaticFileProvider, AccountReader, BlockReader, BlockSource, HeaderProvider,
|
||||
ProviderFactory, ReceiptProvider, StateProvider, TransactionsProvider,
|
||||
|
||||
@ -8,6 +8,7 @@ license.workspace = true
|
||||
[dependencies]
|
||||
# reth
|
||||
reth.workspace = true
|
||||
reth-chainspec.workspace = true
|
||||
reth-exex.workspace = true
|
||||
reth-node-api.workspace = true
|
||||
reth-node-ethereum.workspace = true
|
||||
|
||||
@ -8,13 +8,11 @@ use alloy_sol_types::{sol, SolEventInterface, SolInterface};
|
||||
use db::Database;
|
||||
use execution::execute_block;
|
||||
use once_cell::sync::Lazy;
|
||||
use reth_chainspec::{ChainSpec, ChainSpecBuilder};
|
||||
use reth_exex::{ExExContext, ExExEvent};
|
||||
use reth_node_api::FullNodeComponents;
|
||||
use reth_node_ethereum::EthereumNode;
|
||||
use reth_primitives::{
|
||||
address, Address, ChainSpec, ChainSpecBuilder, Genesis, SealedBlockWithSenders,
|
||||
TransactionSigned, U256,
|
||||
};
|
||||
use reth_primitives::{address, Address, Genesis, SealedBlockWithSenders, TransactionSigned, U256};
|
||||
use reth_provider::Chain;
|
||||
use reth_tracing::tracing::{error, info};
|
||||
use rusqlite::Connection;
|
||||
|
||||
@ -6,6 +6,7 @@ edition.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
reth-chainspec.workspace = true
|
||||
reth-primitives.workspace = true
|
||||
reth-network.workspace = true
|
||||
reth-discv4.workspace = true
|
||||
|
||||
@ -10,16 +10,15 @@ use std::time::Duration;
|
||||
|
||||
use futures::StreamExt;
|
||||
use once_cell::sync::Lazy;
|
||||
use reth_chainspec::{net::mainnet_nodes, Chain, MAINNET};
|
||||
use reth_discv4::{DiscoveryUpdate, Discv4, Discv4ConfigBuilder, DEFAULT_DISCOVERY_ADDRESS};
|
||||
use reth_ecies::stream::ECIESStream;
|
||||
use reth_eth_wire::{
|
||||
EthMessage, EthStream, HelloMessage, P2PStream, Status, UnauthedEthStream, UnauthedP2PStream,
|
||||
};
|
||||
use reth_network::config::rng_secret_key;
|
||||
use reth_network_peers::pk2id;
|
||||
use reth_primitives::{
|
||||
mainnet_nodes, Chain, Hardfork, Head, NodeRecord, MAINNET, MAINNET_GENESIS_HASH,
|
||||
};
|
||||
use reth_network_peers::{pk2id, NodeRecord};
|
||||
use reth_primitives::{Hardfork, Head, MAINNET_GENESIS_HASH};
|
||||
use secp256k1::{SecretKey, SECP256K1};
|
||||
use tokio::net::TcpStream;
|
||||
|
||||
|
||||
@ -11,6 +11,7 @@ license.workspace = true
|
||||
secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] }
|
||||
tokio.workspace = true
|
||||
reth-network.workspace = true
|
||||
reth-chainspec.workspace = true
|
||||
reth-primitives.workspace = true
|
||||
serde_json.workspace = true
|
||||
reth-tracing.workspace = true
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
use reth_primitives::{
|
||||
b256, BaseFeeParams, Chain, ChainSpec, ForkCondition, Hardfork, Head, NodeRecord, B256,
|
||||
};
|
||||
use reth_chainspec::{BaseFeeParams, Chain, ChainSpec, ForkCondition, Hardfork};
|
||||
use reth_discv4::NodeRecord;
|
||||
use reth_primitives::{b256, Head, B256};
|
||||
|
||||
use std::{collections::BTreeMap, sync::Arc};
|
||||
|
||||
@ -24,7 +24,7 @@ pub(crate) fn polygon_chain_spec() -> Arc<ChainSpec> {
|
||||
(Hardfork::Shanghai, ForkCondition::Block(SHANGAI_BLOCK)),
|
||||
]),
|
||||
deposit_contract: None,
|
||||
base_fee_params: reth_primitives::BaseFeeParamsKind::Constant(BaseFeeParams::ethereum()),
|
||||
base_fee_params: reth_chainspec::BaseFeeParamsKind::Constant(BaseFeeParams::ethereum()),
|
||||
prune_delete_limit: 0,
|
||||
}
|
||||
.into()
|
||||
|
||||
@ -9,6 +9,7 @@ license.workspace = true
|
||||
futures.workspace = true
|
||||
jsonrpsee.workspace = true
|
||||
reth.workspace = true
|
||||
reth-chainspec.workspace = true
|
||||
reth-db.workspace = true
|
||||
reth-db-api.workspace = true
|
||||
reth-node-ethereum.workspace = true
|
||||
|
||||
@ -13,13 +13,13 @@
|
||||
//! ```
|
||||
|
||||
use reth::{
|
||||
primitives::ChainSpecBuilder,
|
||||
providers::{
|
||||
providers::{BlockchainProvider, StaticFileProvider},
|
||||
ProviderFactory,
|
||||
},
|
||||
utils::db::open_db_read_only,
|
||||
};
|
||||
use reth_chainspec::ChainSpecBuilder;
|
||||
use reth_db::mdbx::DatabaseArguments;
|
||||
use reth_db_api::models::ClientVersion;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user