mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
refactor(primitive-traits): use alloy EPOCH_SLOTS constant (#12018)
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -6394,6 +6394,7 @@ dependencies = [
|
||||
name = "reth-beacon-consensus"
|
||||
version = "1.1.0"
|
||||
dependencies = [
|
||||
"alloy-eips",
|
||||
"alloy-genesis",
|
||||
"alloy-primitives",
|
||||
"alloy-rpc-types-engine",
|
||||
|
||||
@ -33,6 +33,7 @@ reth-chainspec = { workspace = true, optional = true }
|
||||
# ethereum
|
||||
alloy-primitives.workspace = true
|
||||
alloy-rpc-types-engine.workspace = true
|
||||
alloy-eips.workspace = true
|
||||
|
||||
# async
|
||||
tokio = { workspace = true, features = ["sync"] }
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
use alloy_eips::merge::EPOCH_SLOTS;
|
||||
use alloy_primitives::{BlockNumber, B256};
|
||||
use alloy_rpc_types_engine::{
|
||||
ExecutionPayload, ExecutionPayloadSidecar, ForkchoiceState, PayloadStatus, PayloadStatusEnum,
|
||||
@ -19,9 +20,7 @@ use reth_node_types::NodeTypesWithEngine;
|
||||
use reth_payload_builder::PayloadBuilderHandle;
|
||||
use reth_payload_primitives::{PayloadAttributes, PayloadBuilder, PayloadBuilderAttributes};
|
||||
use reth_payload_validator::ExecutionPayloadValidator;
|
||||
use reth_primitives::{
|
||||
constants::EPOCH_SLOTS, BlockNumHash, Head, Header, SealedBlock, SealedHeader,
|
||||
};
|
||||
use reth_primitives::{BlockNumHash, Head, Header, SealedBlock, SealedHeader};
|
||||
use reth_provider::{
|
||||
providers::ProviderNodeTypes, BlockIdReader, BlockReader, BlockSource, CanonChainTracker,
|
||||
ChainSpecProvider, ProviderError, StageCheckpointReader,
|
||||
|
||||
@ -9,9 +9,6 @@ pub use gas_units::{GIGAGAS, KILOGAS, MEGAGAS};
|
||||
/// The client version: `reth/v{major}.{minor}.{patch}`
|
||||
pub const RETH_CLIENT_VERSION: &str = concat!("reth/v", env!("CARGO_PKG_VERSION"));
|
||||
|
||||
/// An EPOCH is a series of 32 slots.
|
||||
pub const EPOCH_SLOTS: u64 = 32;
|
||||
|
||||
/// The default block nonce in the beacon consensus
|
||||
pub const BEACON_NONCE: u64 = 0u64;
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ use crate::{
|
||||
providers::{state::macros::delegate_provider_impls, StaticFileProvider},
|
||||
AccountReader, BlockHashReader, ProviderError, StateProvider, StateRootProvider,
|
||||
};
|
||||
use alloy_eips::merge::EPOCH_SLOTS;
|
||||
use alloy_primitives::{
|
||||
map::{HashMap, HashSet},
|
||||
Address, BlockNumber, Bytes, StorageKey, StorageValue, B256,
|
||||
@ -13,7 +14,7 @@ use reth_db_api::{
|
||||
table::Table,
|
||||
transaction::DbTx,
|
||||
};
|
||||
use reth_primitives::{constants::EPOCH_SLOTS, Account, Bytecode, StaticFileSegment};
|
||||
use reth_primitives::{Account, Bytecode, StaticFileSegment};
|
||||
use reth_storage_api::{StateProofProvider, StorageRootProvider};
|
||||
use reth_storage_errors::provider::ProviderResult;
|
||||
use reth_trie::{
|
||||
|
||||
Reference in New Issue
Block a user