Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

primitives-traits: use alloy SEPOLIA_GENESIS_HASH constant #12024

Merged
merged 3 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/chainspec/src/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use alloy_genesis::Genesis;
use alloy_primitives::{address, b256, Address, BlockNumber, B256, U256};
use derive_more::From;

use alloy_consensus::constants::{DEV_GENESIS_HASH, MAINNET_GENESIS_HASH};
use alloy_consensus::constants::{DEV_GENESIS_HASH, MAINNET_GENESIS_HASH, SEPOLIA_GENESIS_HASH};
use alloy_eips::eip1559::ETHEREUM_BLOCK_GAS_LIMIT;
use reth_ethereum_forks::{
ChainHardforks, DisplayHardforks, EthereumHardfork, EthereumHardforks, ForkCondition,
Expand All @@ -19,7 +19,7 @@ use reth_network_peers::{
sepolia_nodes, NodeRecord,
};
use reth_primitives_traits::{
constants::{EIP1559_INITIAL_BASE_FEE, HOLESKY_GENESIS_HASH, SEPOLIA_GENESIS_HASH},
constants::{EIP1559_INITIAL_BASE_FEE, HOLESKY_GENESIS_HASH},
Header, SealedHeader,
};
use reth_trie_common::root::state_root_ref_unhashed;
Expand Down
4 changes: 0 additions & 4 deletions crates/primitives-traits/src/constants/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ pub const OP_SEPOLIA_EIP1559_DEFAULT_ELASTICITY_MULTIPLIER: u128 = 6;
/// [transaction costs](https://community.optimism.io/docs/developers/build/differences/#transaction-costs) doc.
pub const BASE_SEPOLIA_EIP1559_DEFAULT_ELASTICITY_MULTIPLIER: u128 = 10;

/// Sepolia genesis hash: `0x25a5cc106eea7138acab33231d7160d69cb777ee0c2c553fcddf5138993e6dd9`
pub const SEPOLIA_GENESIS_HASH: B256 =
b256!("25a5cc106eea7138acab33231d7160d69cb777ee0c2c553fcddf5138993e6dd9");

/// Holesky genesis hash: `0xb5f7f912443c940f21fd611f12828d75b534364ed9e95ca4e307729a4661bde4`
pub const HOLESKY_GENESIS_HASH: B256 =
b256!("b5f7f912443c940f21fd611f12828d75b534364ed9e95ca4e307729a4661bde4");
Expand Down
2 changes: 1 addition & 1 deletion crates/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub use block::{
};
#[cfg(feature = "reth-codec")]
pub use compression::*;
pub use constants::{HOLESKY_GENESIS_HASH, SEPOLIA_GENESIS_HASH};
pub use constants::HOLESKY_GENESIS_HASH;
pub use receipt::{
gas_spent_by_transactions, Receipt, ReceiptWithBloom, ReceiptWithBloomRef, Receipts,
};
Expand Down
4 changes: 2 additions & 2 deletions crates/storage/db-common/src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ struct GenesisAccountWithAddress {
#[cfg(test)]
mod tests {
use super::*;
use alloy_consensus::constants::MAINNET_GENESIS_HASH;
use alloy_consensus::constants::{MAINNET_GENESIS_HASH, SEPOLIA_GENESIS_HASH};
use alloy_genesis::Genesis;
use reth_chainspec::{Chain, ChainSpec, HOLESKY, MAINNET, SEPOLIA};
use reth_db::DatabaseEnv;
Expand All @@ -592,7 +592,7 @@ mod tests {
transaction::DbTx,
Database,
};
use reth_primitives::{HOLESKY_GENESIS_HASH, SEPOLIA_GENESIS_HASH};
use reth_primitives::HOLESKY_GENESIS_HASH;
use reth_primitives_traits::IntegerList;
use reth_provider::{
test_utils::{create_test_provider_factory_with_chain_spec, MockNodeTypesWithDB},
Expand Down
Loading