Skip to content

Commit

Permalink
Committed requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Nov 29, 2023
1 parent 2335a05 commit 9333344
Show file tree
Hide file tree
Showing 54 changed files with 79 additions and 152 deletions.
44 changes: 12 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions bin/reth/src/node/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ use reth_downloaders::{
bodies::bodies::BodiesDownloaderBuilder,
headers::reverse_headers::ReverseHeadersDownloaderBuilder,
};
use reth_ethereum_forks::Head;
use reth_interfaces::{
consensus::Consensus,
p2p::{
Expand All @@ -56,7 +55,7 @@ use reth_primitives::{
constants::eip4844::{LoadKzgSettingsError, MAINNET_KZG_TRUSTED_SETUP},
kzg::KzgSettings,
stage::StageId,
BlockHashOrNumber, BlockNumber, ChainSpec, DisplayHardforks, SealedHeader, B256,
BlockHashOrNumber, BlockNumber, ChainSpec, DisplayHardforks, Head, SealedHeader, B256,
};
use reth_provider::{
providers::BlockchainProvider, BlockHashReader, BlockReader, CanonStateSubscriptions,
Expand Down
1 change: 0 additions & 1 deletion crates/blockchain-tree/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ normal = [

[dependencies]
# reth
reth-ethereum-forks.workspace = true
reth-primitives.workspace = true
reth-interfaces.workspace = true
reth-db.workspace = true
Expand Down
5 changes: 2 additions & 3 deletions crates/blockchain-tree/src/blockchain_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use crate::{
AppendableChain, BlockIndices, BlockchainTreeConfig, BundleStateData, TreeExternals,
};
use reth_db::{database::Database, DatabaseError};
use reth_ethereum_forks::Hardfork;
use reth_interfaces::{
blockchain_tree::{
error::{BlockchainTreeError, CanonicalError, InsertBlockError, InsertBlockErrorKind},
Expand All @@ -19,8 +18,8 @@ use reth_interfaces::{
RethError, RethResult,
};
use reth_primitives::{
BlockHash, BlockNumHash, BlockNumber, ForkBlock, GotExpected, PruneModes, Receipt, SealedBlock,
SealedBlockWithSenders, SealedHeader, U256,
BlockHash, BlockNumHash, BlockNumber, ForkBlock, GotExpected, Hardfork, PruneModes, Receipt,
SealedBlock, SealedBlockWithSenders, SealedHeader, U256,
};
use reth_provider::{
chain::{ChainSplit, ChainSplitTarget},
Expand Down
1 change: 0 additions & 1 deletion crates/consensus/auto-seal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ description = "A consensus impl for local testing purposes"

[dependencies]
# reth
reth-ethereum-forks.workspace = true
reth-beacon-consensus.workspace = true
reth-primitives.workspace = true
reth-interfaces.workspace = true
Expand Down
1 change: 0 additions & 1 deletion crates/consensus/beacon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ repository.workspace = true

[dependencies]
# reth
reth-ethereum-forks.workspace = true
reth-consensus-common.workspace = true
reth-primitives.workspace = true
reth-interfaces.workspace = true
Expand Down
3 changes: 1 addition & 2 deletions crates/consensus/beacon/src/beacon_consensus.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
//! Consensus for ethereum network
use reth_consensus_common::validation;
use reth_ethereum_forks::Hardfork;
use reth_interfaces::consensus::{Consensus, ConsensusError};
use reth_primitives::{
constants::{ALLOWED_FUTURE_BLOCK_TIME_SECONDS, MAXIMUM_EXTRA_DATA_SIZE},
Chain, ChainSpec, Header, SealedBlock, SealedHeader, EMPTY_OMMER_ROOT_HASH, U256,
Chain, ChainSpec, Hardfork, Header, SealedBlock, SealedHeader, EMPTY_OMMER_ROOT_HASH, U256,
};
use std::{sync::Arc, time::SystemTime};

Expand Down
6 changes: 2 additions & 4 deletions crates/consensus/beacon/src/engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use crate::{
};
use futures::{Future, StreamExt};
use reth_db::database::Database;
use reth_ethereum_forks::Head;
use reth_interfaces::{
blockchain_tree::{
error::{BlockchainTreeError, CanonicalError, InsertBlockError, InsertBlockErrorKind},
Expand All @@ -23,7 +22,7 @@ use reth_interfaces::{
};
use reth_payload_builder::{PayloadBuilderAttributes, PayloadBuilderHandle};
use reth_primitives::{
constants::EPOCH_SLOTS, stage::StageId, BlockNumHash, BlockNumber, ChainSpec, Header,
constants::EPOCH_SLOTS, stage::StageId, BlockNumHash, BlockNumber, ChainSpec, Head, Header,
SealedBlock, SealedHeader, B256, U256,
};
use reth_provider::{
Expand Down Expand Up @@ -2408,12 +2407,11 @@ mod tests {

mod new_payload {
use super::*;
use reth_ethereum_forks::Hardfork;
use reth_interfaces::test_utils::{
generators,
generators::{generate_keys, random_block},
};
use reth_primitives::{public_key_to_address, Genesis, GenesisAccount, U256};
use reth_primitives::{public_key_to_address, Genesis, GenesisAccount, Hardfork, U256};
use reth_provider::test_utils::blocks::BlockChainTestData;

#[tokio::test]
Expand Down
3 changes: 1 addition & 2 deletions crates/consensus/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ homepage.workspace = true
repository.workspace = true

[dependencies]
# reth
reth-ethereum-forks.workspace = true
# reth
reth-primitives.workspace = true
reth-interfaces.workspace = true
reth-provider.workspace = true
Expand Down
3 changes: 1 addition & 2 deletions crates/consensus/common/src/calc.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use reth_ethereum_forks::Hardfork;
use reth_primitives::{constants::ETH_TO_WEI, BlockNumber, Chain, ChainSpec, U256};
use reth_primitives::{constants::ETH_TO_WEI, BlockNumber, Chain, ChainSpec, Hardfork, U256};

/// Calculates the base block reward.
///
Expand Down
3 changes: 1 addition & 2 deletions crates/consensus/common/src/validation.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
//! Collection of methods for block validation.
use reth_ethereum_forks::Hardfork;
use reth_interfaces::{consensus::ConsensusError, RethResult};
use reth_primitives::{
constants::{
self,
eip4844::{DATA_GAS_PER_BLOB, MAX_DATA_GAS_PER_BLOCK},
},
eip4844::calculate_excess_blob_gas,
BlockNumber, ChainSpec, GotExpected, Header, InvalidTransactionError, SealedBlock,
BlockNumber, ChainSpec, GotExpected, Hardfork, Header, InvalidTransactionError, SealedBlock,
SealedHeader, Transaction, TransactionSignedEcRecovered, TxEip1559, TxEip2930, TxEip4844,
TxLegacy,
};
Expand Down
Loading

0 comments on commit 9333344

Please sign in to comment.