mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(primitives): move checkpoints under stage mod (#2906)
This commit is contained in:
@ -2,7 +2,10 @@
|
||||
use crate::dirs::{DataDirPath, MaybePlatformPath};
|
||||
use clap::Parser;
|
||||
use reth_db::{cursor::DbCursorRO, tables, transaction::DbTx};
|
||||
use reth_primitives::{stage::StageId, ChainSpec, StageCheckpoint};
|
||||
use reth_primitives::{
|
||||
stage::{StageCheckpoint, StageId},
|
||||
ChainSpec,
|
||||
};
|
||||
use reth_provider::Transaction;
|
||||
use reth_staged_sync::utils::{chainspec::genesis_value_parser, init::init_db};
|
||||
use reth_stages::{
|
||||
|
||||
@ -4,7 +4,7 @@ use futures::Stream;
|
||||
use reth_beacon_consensus::BeaconConsensusEngineEvent;
|
||||
use reth_network::{NetworkEvent, NetworkHandle};
|
||||
use reth_network_api::PeersInfo;
|
||||
use reth_primitives::{stage::StageId, StageCheckpoint};
|
||||
use reth_primitives::stage::{StageCheckpoint, StageId};
|
||||
use reth_stages::{ExecOutput, PipelineEvent};
|
||||
use std::{
|
||||
future::Future,
|
||||
|
||||
@ -4,7 +4,10 @@ use eyre::Result;
|
||||
use reth_db::{
|
||||
cursor::DbCursorRO, database::Database, table::TableImporter, tables, transaction::DbTx,
|
||||
};
|
||||
use reth_primitives::{stage::StageId, StageCheckpoint, MAINNET};
|
||||
use reth_primitives::{
|
||||
stage::{StageCheckpoint, StageId},
|
||||
MAINNET,
|
||||
};
|
||||
use reth_provider::Transaction;
|
||||
use reth_stages::{stages::ExecutionStage, Stage, UnwindInput};
|
||||
use std::{ops::DerefMut, path::PathBuf, sync::Arc};
|
||||
|
||||
@ -2,7 +2,10 @@ use super::setup;
|
||||
use crate::utils::DbTool;
|
||||
use eyre::Result;
|
||||
use reth_db::{database::Database, table::TableImporter, tables};
|
||||
use reth_primitives::{stage::StageId, BlockNumber, StageCheckpoint};
|
||||
use reth_primitives::{
|
||||
stage::{StageCheckpoint, StageId},
|
||||
BlockNumber,
|
||||
};
|
||||
use reth_provider::Transaction;
|
||||
use reth_stages::{stages::AccountHashingStage, Stage, UnwindInput};
|
||||
use std::{ops::DerefMut, path::PathBuf};
|
||||
|
||||
@ -2,7 +2,7 @@ use super::setup;
|
||||
use crate::utils::DbTool;
|
||||
use eyre::Result;
|
||||
use reth_db::{database::Database, table::TableImporter, tables};
|
||||
use reth_primitives::{stage::StageId, StageCheckpoint};
|
||||
use reth_primitives::stage::{StageCheckpoint, StageId};
|
||||
use reth_provider::Transaction;
|
||||
use reth_stages::{stages::StorageHashingStage, Stage, UnwindInput};
|
||||
use std::{ops::DerefMut, path::PathBuf};
|
||||
|
||||
@ -2,7 +2,10 @@ use super::setup;
|
||||
use crate::utils::DbTool;
|
||||
use eyre::Result;
|
||||
use reth_db::{database::Database, table::TableImporter, tables};
|
||||
use reth_primitives::{stage::StageId, BlockNumber, StageCheckpoint, MAINNET};
|
||||
use reth_primitives::{
|
||||
stage::{StageCheckpoint, StageId},
|
||||
BlockNumber, MAINNET,
|
||||
};
|
||||
use reth_provider::Transaction;
|
||||
use reth_stages::{
|
||||
stages::{
|
||||
|
||||
@ -11,7 +11,10 @@ use clap::Parser;
|
||||
use reth_beacon_consensus::BeaconConsensus;
|
||||
use reth_config::Config;
|
||||
use reth_downloaders::bodies::bodies::BodiesDownloaderBuilder;
|
||||
use reth_primitives::{stage::StageId, ChainSpec, StageCheckpoint};
|
||||
use reth_primitives::{
|
||||
stage::{StageCheckpoint, StageId},
|
||||
ChainSpec,
|
||||
};
|
||||
use reth_provider::{ShareableDatabase, Transaction};
|
||||
use reth_staged_sync::utils::{chainspec::chain_spec_value_parser, init::init_db};
|
||||
use reth_stages::{
|
||||
|
||||
@ -1043,7 +1043,9 @@ mod tests {
|
||||
transaction::DbTxMut,
|
||||
};
|
||||
use reth_interfaces::test_utils::TestConsensus;
|
||||
use reth_primitives::{proofs::EMPTY_ROOT, ChainSpecBuilder, StageCheckpoint, H256, MAINNET};
|
||||
use reth_primitives::{
|
||||
proofs::EMPTY_ROOT, stage::StageCheckpoint, ChainSpecBuilder, H256, MAINNET,
|
||||
};
|
||||
use reth_provider::{
|
||||
insert_block,
|
||||
post_state::PostState,
|
||||
|
||||
@ -992,7 +992,7 @@ mod tests {
|
||||
};
|
||||
use reth_payload_builder::test_utils::spawn_test_payload_service;
|
||||
use reth_primitives::{
|
||||
ChainSpec, ChainSpecBuilder, SealedBlockWithSenders, StageCheckpoint, H256, MAINNET,
|
||||
stage::StageCheckpoint, ChainSpec, ChainSpecBuilder, SealedBlockWithSenders, H256, MAINNET,
|
||||
};
|
||||
use reth_provider::{
|
||||
providers::BlockchainProvider, test_utils::TestExecutorFactory, ShareableDatabase,
|
||||
|
||||
@ -16,7 +16,6 @@ mod bits;
|
||||
mod block;
|
||||
pub mod bloom;
|
||||
mod chain;
|
||||
mod checkpoints;
|
||||
mod compression;
|
||||
pub mod constants;
|
||||
pub mod contract;
|
||||
@ -51,10 +50,6 @@ pub use chain::{
|
||||
AllGenesisFormats, Chain, ChainInfo, ChainSpec, ChainSpecBuilder, ForkCondition, GOERLI,
|
||||
MAINNET, SEPOLIA,
|
||||
};
|
||||
pub use checkpoints::{
|
||||
AccountHashingCheckpoint, EntitiesCheckpoint, MerkleCheckpoint, StageCheckpoint,
|
||||
StageUnitCheckpoint, StorageHashingCheckpoint,
|
||||
};
|
||||
pub use compression::*;
|
||||
pub use constants::{
|
||||
EMPTY_OMMER_ROOT, GOERLI_GENESIS, KECCAK_EMPTY, MAINNET_GENESIS, SEPOLIA_GENESIS,
|
||||
|
||||
@ -2,3 +2,9 @@
|
||||
|
||||
mod id;
|
||||
pub use id::StageId;
|
||||
|
||||
mod checkpoints;
|
||||
pub use checkpoints::{
|
||||
AccountHashingCheckpoint, EntitiesCheckpoint, MerkleCheckpoint, StageCheckpoint,
|
||||
StageUnitCheckpoint, StorageHashingCheckpoint,
|
||||
};
|
||||
|
||||
@ -3,7 +3,7 @@ use bytes::Buf;
|
||||
use reth_codecs::Compact;
|
||||
|
||||
/// Walker sub node for storing intermediate state root calculation state in the database.
|
||||
/// See [crate::MerkleCheckpoint].
|
||||
/// See [crate::stage::MerkleCheckpoint].
|
||||
#[derive(Debug, Clone, PartialEq, Default)]
|
||||
pub struct StoredSubNode {
|
||||
/// The key of the current node.
|
||||
|
||||
@ -5,7 +5,7 @@ use criterion::{
|
||||
use pprof::criterion::{Output, PProfProfiler};
|
||||
use reth_db::mdbx::{Env, WriteMap};
|
||||
use reth_interfaces::test_utils::TestConsensus;
|
||||
use reth_primitives::{stage::StageId, StageCheckpoint};
|
||||
use reth_primitives::stage::{StageCheckpoint, StageId};
|
||||
use reth_stages::{
|
||||
stages::{MerkleStage, SenderRecoveryStage, TotalDifficultyStage, TransactionLookupStage},
|
||||
test_utils::TestTransaction,
|
||||
|
||||
@ -2,7 +2,7 @@ use super::{constants, StageRange};
|
||||
use reth_db::{
|
||||
cursor::DbCursorRO, database::Database, tables, transaction::DbTx, DatabaseError as DbError,
|
||||
};
|
||||
use reth_primitives::{stage::StageId, StageCheckpoint};
|
||||
use reth_primitives::stage::{StageCheckpoint, StageId};
|
||||
use reth_stages::{
|
||||
stages::{AccountHashingStage, SeedOpts},
|
||||
test_utils::TestTransaction,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
use crate::stage::{ExecOutput, UnwindInput, UnwindOutput};
|
||||
use reth_primitives::{stage::StageId, StageCheckpoint};
|
||||
use reth_primitives::stage::{StageCheckpoint, StageId};
|
||||
|
||||
/// An event emitted by a [Pipeline][crate::Pipeline].
|
||||
///
|
||||
|
||||
@ -2,7 +2,9 @@ use crate::{error::*, ExecInput, ExecOutput, Stage, StageError, UnwindInput};
|
||||
use futures_util::Future;
|
||||
use reth_db::database::Database;
|
||||
use reth_primitives::{
|
||||
listener::EventListeners, stage::StageId, BlockNumber, StageCheckpoint, H256,
|
||||
listener::EventListeners,
|
||||
stage::{StageCheckpoint, StageId},
|
||||
BlockNumber, H256,
|
||||
};
|
||||
use reth_provider::{providers::get_stage_checkpoint, Transaction};
|
||||
use std::pin::Pin;
|
||||
|
||||
@ -3,7 +3,8 @@ use reth_metrics::{
|
||||
Metrics,
|
||||
};
|
||||
use reth_primitives::{
|
||||
stage::StageId, BlockNumber, EntitiesCheckpoint, StageCheckpoint, StageUnitCheckpoint,
|
||||
stage::{EntitiesCheckpoint, StageCheckpoint, StageId, StageUnitCheckpoint},
|
||||
BlockNumber,
|
||||
};
|
||||
use std::collections::HashMap;
|
||||
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
use crate::error::StageError;
|
||||
use async_trait::async_trait;
|
||||
use reth_db::database::Database;
|
||||
use reth_primitives::{stage::StageId, BlockNumber, StageCheckpoint};
|
||||
use reth_primitives::{
|
||||
stage::{StageCheckpoint, StageId},
|
||||
BlockNumber,
|
||||
};
|
||||
use reth_provider::Transaction;
|
||||
use std::{
|
||||
cmp::{max, min},
|
||||
|
||||
@ -11,7 +11,7 @@ use reth_interfaces::{
|
||||
consensus::Consensus,
|
||||
p2p::bodies::{downloader::BodyDownloader, response::BlockResponse},
|
||||
};
|
||||
use reth_primitives::{stage::StageId, StageCheckpoint};
|
||||
use reth_primitives::stage::{StageCheckpoint, StageId};
|
||||
use reth_provider::Transaction;
|
||||
use std::sync::Arc;
|
||||
use tracing::*;
|
||||
|
||||
@ -11,8 +11,9 @@ use reth_metrics::{
|
||||
Metrics,
|
||||
};
|
||||
use reth_primitives::{
|
||||
constants::MGAS_TO_GAS, stage::StageId, Block, BlockNumber, BlockWithSenders, StageCheckpoint,
|
||||
TransactionSigned, U256,
|
||||
constants::MGAS_TO_GAS,
|
||||
stage::{StageCheckpoint, StageId},
|
||||
Block, BlockNumber, BlockWithSenders, TransactionSigned, U256,
|
||||
};
|
||||
use reth_provider::{
|
||||
post_state::PostState, BlockExecutor, ExecutorFactory, LatestStateProviderRef, Transaction,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
use crate::{ExecInput, ExecOutput, Stage, StageError, UnwindInput, UnwindOutput};
|
||||
use reth_db::database::Database;
|
||||
use reth_primitives::{stage::StageId, StageCheckpoint};
|
||||
use reth_primitives::stage::{StageCheckpoint, StageId};
|
||||
use reth_provider::Transaction;
|
||||
|
||||
/// The finish stage.
|
||||
|
||||
@ -8,7 +8,10 @@ use reth_db::{
|
||||
transaction::{DbTx, DbTxMut},
|
||||
RawKey, RawTable,
|
||||
};
|
||||
use reth_primitives::{keccak256, stage::StageId, AccountHashingCheckpoint, StageCheckpoint};
|
||||
use reth_primitives::{
|
||||
keccak256,
|
||||
stage::{AccountHashingCheckpoint, StageCheckpoint, StageId},
|
||||
};
|
||||
use reth_provider::Transaction;
|
||||
use std::{
|
||||
cmp::max,
|
||||
@ -268,7 +271,7 @@ mod tests {
|
||||
PREV_STAGE_ID,
|
||||
};
|
||||
use assert_matches::assert_matches;
|
||||
use reth_primitives::{Account, StageUnitCheckpoint, U256};
|
||||
use reth_primitives::{stage::StageUnitCheckpoint, Account, U256};
|
||||
use test_utils::*;
|
||||
|
||||
stage_test_suite_ext!(AccountHashingTestRunner, account_hashing);
|
||||
|
||||
@ -8,7 +8,9 @@ use reth_db::{
|
||||
transaction::{DbTx, DbTxMut},
|
||||
};
|
||||
use reth_primitives::{
|
||||
keccak256, stage::StageId, StageCheckpoint, StorageEntry, StorageHashingCheckpoint,
|
||||
keccak256,
|
||||
stage::{StageCheckpoint, StageId, StorageHashingCheckpoint},
|
||||
StorageEntry,
|
||||
};
|
||||
use reth_provider::Transaction;
|
||||
use std::{collections::BTreeMap, fmt::Debug};
|
||||
@ -205,7 +207,9 @@ mod tests {
|
||||
use reth_interfaces::test_utils::generators::{
|
||||
random_block_range, random_contract_account_range,
|
||||
};
|
||||
use reth_primitives::{Address, SealedBlock, StageUnitCheckpoint, StorageEntry, H256, U256};
|
||||
use reth_primitives::{
|
||||
stage::StageUnitCheckpoint, Address, SealedBlock, StorageEntry, H256, U256,
|
||||
};
|
||||
|
||||
stage_test_suite_ext!(StorageHashingTestRunner, storage_hashing);
|
||||
|
||||
|
||||
@ -11,8 +11,8 @@ use reth_interfaces::{
|
||||
provider::ProviderError,
|
||||
};
|
||||
use reth_primitives::{
|
||||
stage::StageId, BlockHashOrNumber, BlockNumber, EntitiesCheckpoint, SealedHeader,
|
||||
StageCheckpoint, H256,
|
||||
stage::{EntitiesCheckpoint, StageCheckpoint, StageId},
|
||||
BlockHashOrNumber, BlockNumber, SealedHeader, H256,
|
||||
};
|
||||
use reth_provider::Transaction;
|
||||
use tokio::sync::watch;
|
||||
@ -358,7 +358,7 @@ mod tests {
|
||||
};
|
||||
use assert_matches::assert_matches;
|
||||
use reth_interfaces::test_utils::generators::random_header;
|
||||
use reth_primitives::{StageUnitCheckpoint, H256};
|
||||
use reth_primitives::{stage::StageUnitCheckpoint, H256};
|
||||
use test_runner::HeadersTestRunner;
|
||||
|
||||
mod test_runner {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
use crate::{ExecInput, ExecOutput, Stage, StageError, UnwindInput, UnwindOutput};
|
||||
use reth_db::database::Database;
|
||||
use reth_primitives::{stage::StageId, StageCheckpoint};
|
||||
use reth_primitives::stage::{StageCheckpoint, StageId};
|
||||
use reth_provider::Transaction;
|
||||
use std::fmt::Debug;
|
||||
use tracing::*;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
use crate::{ExecInput, ExecOutput, Stage, StageError, UnwindInput, UnwindOutput};
|
||||
use reth_db::{database::Database, models::BlockNumberAddress};
|
||||
use reth_primitives::{stage::StageId, StageCheckpoint};
|
||||
use reth_primitives::stage::{StageCheckpoint, StageId};
|
||||
use reth_provider::Transaction;
|
||||
use std::fmt::Debug;
|
||||
use tracing::*;
|
||||
|
||||
@ -7,7 +7,10 @@ use reth_db::{
|
||||
};
|
||||
use reth_interfaces::consensus;
|
||||
use reth_primitives::{
|
||||
hex, stage::StageId, trie::StoredSubNode, BlockNumber, MerkleCheckpoint, StageCheckpoint, H256,
|
||||
hex,
|
||||
stage::{MerkleCheckpoint, StageCheckpoint, StageId},
|
||||
trie::StoredSubNode,
|
||||
BlockNumber, H256,
|
||||
};
|
||||
use reth_provider::Transaction;
|
||||
use reth_trie::{IntermediateStateRootState, StateRoot, StateRootProgress};
|
||||
|
||||
@ -8,7 +8,9 @@ use reth_db::{
|
||||
RawKey, RawTable, RawValue,
|
||||
};
|
||||
use reth_primitives::{
|
||||
keccak256, stage::StageId, StageCheckpoint, TransactionSignedNoHash, TxNumber, H160,
|
||||
keccak256,
|
||||
stage::{StageCheckpoint, StageId},
|
||||
TransactionSignedNoHash, TxNumber, H160,
|
||||
};
|
||||
use reth_provider::Transaction;
|
||||
use std::fmt::Debug;
|
||||
|
||||
@ -6,7 +6,10 @@ use reth_db::{
|
||||
transaction::{DbTx, DbTxMut},
|
||||
};
|
||||
use reth_interfaces::{consensus::Consensus, provider::ProviderError};
|
||||
use reth_primitives::{stage::StageId, StageCheckpoint, U256};
|
||||
use reth_primitives::{
|
||||
stage::{StageCheckpoint, StageId},
|
||||
U256,
|
||||
};
|
||||
use reth_provider::Transaction;
|
||||
use std::sync::Arc;
|
||||
use tracing::*;
|
||||
|
||||
@ -8,8 +8,9 @@ use reth_db::{
|
||||
transaction::{DbTx, DbTxMut},
|
||||
};
|
||||
use reth_primitives::{
|
||||
rpc_utils::keccak256, stage::StageId, BlockNumber, StageCheckpoint, TransactionSignedNoHash,
|
||||
TxNumber, H256,
|
||||
rpc_utils::keccak256,
|
||||
stage::{StageCheckpoint, StageId},
|
||||
BlockNumber, TransactionSignedNoHash, TxNumber, H256,
|
||||
};
|
||||
use reth_provider::Transaction;
|
||||
use thiserror::Error;
|
||||
|
||||
@ -29,8 +29,8 @@ macro_rules! stage_test_suite {
|
||||
// Set up the runner
|
||||
let mut runner = $runner::default();
|
||||
let input = crate::stage::ExecInput {
|
||||
previous_stage: Some((crate::test_utils::PREV_STAGE_ID, reth_primitives::StageCheckpoint::new(previous_stage))),
|
||||
checkpoint: Some(reth_primitives::StageCheckpoint::new(stage_progress)),
|
||||
previous_stage: Some((crate::test_utils::PREV_STAGE_ID, reth_primitives::stage::StageCheckpoint::new(previous_stage))),
|
||||
checkpoint: Some(reth_primitives::stage::StageCheckpoint::new(stage_progress)),
|
||||
};
|
||||
let seed = runner.seed_execution(input).expect("failed to seed");
|
||||
let rx = runner.execute(input);
|
||||
@ -81,8 +81,8 @@ macro_rules! stage_test_suite {
|
||||
// Set up the runner
|
||||
let mut runner = $runner::default();
|
||||
let execute_input = crate::stage::ExecInput {
|
||||
previous_stage: Some((crate::test_utils::PREV_STAGE_ID, reth_primitives::StageCheckpoint::new(previous_stage))),
|
||||
checkpoint: Some(reth_primitives::StageCheckpoint::new(stage_progress)),
|
||||
previous_stage: Some((crate::test_utils::PREV_STAGE_ID, reth_primitives::stage::StageCheckpoint::new(previous_stage))),
|
||||
checkpoint: Some(reth_primitives::stage::StageCheckpoint::new(stage_progress)),
|
||||
};
|
||||
let seed = runner.seed_execution(execute_input).expect("failed to seed");
|
||||
|
||||
@ -103,7 +103,7 @@ macro_rules! stage_test_suite {
|
||||
// Run stage unwind
|
||||
let unwind_input = crate::stage::UnwindInput {
|
||||
unwind_to: stage_progress,
|
||||
checkpoint: reth_primitives::StageCheckpoint::new(previous_stage),
|
||||
checkpoint: reth_primitives::stage::StageCheckpoint::new(previous_stage),
|
||||
bad_block: None,
|
||||
};
|
||||
|
||||
@ -138,8 +138,8 @@ macro_rules! stage_test_suite_ext {
|
||||
// Set up the runner
|
||||
let mut runner = $runner::default();
|
||||
let input = crate::stage::ExecInput {
|
||||
previous_stage: Some((crate::test_utils::PREV_STAGE_ID, reth_primitives::StageCheckpoint::new(stage_progress))),
|
||||
checkpoint: Some(reth_primitives::StageCheckpoint::new(stage_progress)),
|
||||
previous_stage: Some((crate::test_utils::PREV_STAGE_ID, reth_primitives::stage::StageCheckpoint::new(stage_progress))),
|
||||
checkpoint: Some(reth_primitives::stage::StageCheckpoint::new(stage_progress)),
|
||||
};
|
||||
let seed = runner.seed_execution(input).expect("failed to seed");
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ use crate::{
|
||||
tables::models::*,
|
||||
};
|
||||
use reth_codecs::{main_codec, Compact};
|
||||
use reth_primitives::{trie::*, *};
|
||||
use reth_primitives::{stage::StageCheckpoint, trie::*, *};
|
||||
|
||||
/// Implements compression for Compact type.
|
||||
macro_rules! impl_compression_for_compact {
|
||||
|
||||
@ -33,9 +33,10 @@ use crate::{
|
||||
},
|
||||
};
|
||||
use reth_primitives::{
|
||||
stage::StageCheckpoint,
|
||||
trie::{BranchNodeCompact, StorageTrieEntry, StoredNibbles, StoredNibblesSubKey},
|
||||
Account, Address, BlockHash, BlockNumber, Bytecode, Header, IntegerList, Receipt,
|
||||
StageCheckpoint, StorageEntry, TransactionSignedNoHash, TxHash, TxNumber, H256,
|
||||
Account, Address, BlockHash, BlockNumber, Bytecode, Header, IntegerList, Receipt, StorageEntry,
|
||||
TransactionSignedNoHash, TxHash, TxNumber, H256,
|
||||
};
|
||||
|
||||
/// Enum for the types of tables present in libmdbx.
|
||||
|
||||
@ -8,9 +8,10 @@ use crate::{
|
||||
use reth_db::{cursor::DbCursorRO, database::Database, tables, transaction::DbTx};
|
||||
use reth_interfaces::Result;
|
||||
use reth_primitives::{
|
||||
stage::StageId, Block, BlockHash, BlockHashOrNumber, BlockNumber, ChainInfo, ChainSpec, Head,
|
||||
Header, Receipt, SealedBlock, SealedHeader, StageCheckpoint, TransactionMeta,
|
||||
TransactionSigned, TxHash, TxNumber, Withdrawal, H256, U256,
|
||||
stage::{StageCheckpoint, StageId},
|
||||
Block, BlockHash, BlockHashOrNumber, BlockNumber, ChainInfo, ChainSpec, Head, Header, Receipt,
|
||||
SealedBlock, SealedHeader, TransactionMeta, TransactionSigned, TxHash, TxNumber, Withdrawal,
|
||||
H256, U256,
|
||||
};
|
||||
use reth_revm_primitives::{
|
||||
config::revm_spec,
|
||||
|
||||
@ -12,10 +12,10 @@ use reth_interfaces::{
|
||||
Error, Result,
|
||||
};
|
||||
use reth_primitives::{
|
||||
stage::StageId, Block, BlockHash, BlockHashOrNumber, BlockId, BlockNumHash, BlockNumber,
|
||||
BlockNumberOrTag, ChainInfo, Header, Receipt, SealedBlock, SealedBlockWithSenders,
|
||||
SealedHeader, StageCheckpoint, TransactionMeta, TransactionSigned, TxHash, TxNumber,
|
||||
Withdrawal, H256, U256,
|
||||
stage::{StageCheckpoint, StageId},
|
||||
Block, BlockHash, BlockHashOrNumber, BlockId, BlockNumHash, BlockNumber, BlockNumberOrTag,
|
||||
ChainInfo, Header, Receipt, SealedBlock, SealedBlockWithSenders, SealedHeader, TransactionMeta,
|
||||
TransactionSigned, TxHash, TxNumber, Withdrawal, H256, U256,
|
||||
};
|
||||
use reth_revm_primitives::primitives::{BlockEnv, CfgEnv};
|
||||
pub use state::{
|
||||
|
||||
@ -6,6 +6,7 @@ use crate::{
|
||||
};
|
||||
use reth_interfaces::Result;
|
||||
use reth_primitives::{
|
||||
stage::{StageCheckpoint, StageId},
|
||||
Account, Address, Block, BlockHash, BlockHashOrNumber, BlockId, BlockNumber, Bytecode, Bytes,
|
||||
ChainInfo, Header, Receipt, SealedBlock, SealedHeader, StorageKey, StorageValue,
|
||||
TransactionMeta, TransactionSigned, TxHash, TxNumber, H256, KECCAK_EMPTY, U256,
|
||||
@ -279,10 +280,7 @@ impl StateProviderFactory for NoopProvider {
|
||||
}
|
||||
|
||||
impl StageCheckpointProvider for NoopProvider {
|
||||
fn get_stage_checkpoint(
|
||||
&self,
|
||||
_id: reth_primitives::stage::StageId,
|
||||
) -> Result<Option<reth_primitives::StageCheckpoint>> {
|
||||
fn get_stage_checkpoint(&self, _id: StageId) -> Result<Option<StageCheckpoint>> {
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
use reth_interfaces::Result;
|
||||
use reth_primitives::{stage::StageId, StageCheckpoint};
|
||||
use reth_primitives::stage::{StageCheckpoint, StageId};
|
||||
|
||||
/// The trait for fetching stage checkpoint related data.
|
||||
#[auto_impl::auto_impl(&, Arc)]
|
||||
|
||||
@ -20,9 +20,11 @@ use reth_db::{
|
||||
};
|
||||
use reth_interfaces::{db::DatabaseError as DbError, provider::ProviderError};
|
||||
use reth_primitives::{
|
||||
keccak256, stage::StageId, Account, Address, BlockHash, BlockNumber, ChainSpec, Hardfork,
|
||||
Header, SealedBlock, SealedBlockWithSenders, StageCheckpoint, StorageEntry, TransactionSigned,
|
||||
TransactionSignedEcRecovered, H256, U256,
|
||||
keccak256,
|
||||
stage::{StageCheckpoint, StageId},
|
||||
Account, Address, BlockHash, BlockNumber, ChainSpec, Hardfork, Header, SealedBlock,
|
||||
SealedBlockWithSenders, StorageEntry, TransactionSigned, TransactionSignedEcRecovered, H256,
|
||||
U256,
|
||||
};
|
||||
use reth_trie::{StateRoot, StateRootError};
|
||||
use std::{
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
use crate::{trie_cursor::CursorSubNode, updates::TrieUpdates};
|
||||
use reth_primitives::{
|
||||
stage::MerkleCheckpoint,
|
||||
trie::{hash_builder::HashBuilder, Nibbles},
|
||||
MerkleCheckpoint, H256,
|
||||
H256,
|
||||
};
|
||||
|
||||
/// The progress of the state root computation.
|
||||
|
||||
@ -5,7 +5,10 @@ use crate::{
|
||||
Case, Error, Suite,
|
||||
};
|
||||
use reth_db::mdbx::test_utils::create_test_rw_db;
|
||||
use reth_primitives::{stage::StageId, BlockBody, SealedBlock, StageCheckpoint};
|
||||
use reth_primitives::{
|
||||
stage::{StageCheckpoint, StageId},
|
||||
BlockBody, SealedBlock,
|
||||
};
|
||||
use reth_provider::Transaction;
|
||||
use reth_stages::{stages::ExecutionStage, ExecInput, Stage};
|
||||
use std::{collections::BTreeMap, ffi::OsStr, fs, ops::Deref, path::Path, sync::Arc};
|
||||
|
||||
Reference in New Issue
Block a user