mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
primitives: use alloy EMPTY_ constants (#11852)
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -6340,6 +6340,7 @@ dependencies = [
|
||||
name = "reth-basic-payload-builder"
|
||||
version = "1.1.0"
|
||||
dependencies = [
|
||||
"alloy-consensus",
|
||||
"alloy-primitives",
|
||||
"alloy-rlp",
|
||||
"futures-core",
|
||||
|
||||
@ -2,6 +2,7 @@ pub use alloy_eips::eip1559::BaseFeeParams;
|
||||
|
||||
use alloc::{boxed::Box, sync::Arc, vec::Vec};
|
||||
use alloy_chains::{Chain, NamedChain};
|
||||
use alloy_consensus::constants::EMPTY_WITHDRAWALS;
|
||||
use alloy_genesis::Genesis;
|
||||
use alloy_primitives::{address, b256, Address, BlockNumber, B256, U256};
|
||||
use alloy_trie::EMPTY_ROOT_HASH;
|
||||
@ -18,8 +19,8 @@ use reth_network_peers::{
|
||||
};
|
||||
use reth_primitives_traits::{
|
||||
constants::{
|
||||
EIP1559_INITIAL_BASE_FEE, EMPTY_WITHDRAWALS, ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
HOLESKY_GENESIS_HASH, SEPOLIA_GENESIS_HASH,
|
||||
EIP1559_INITIAL_BASE_FEE, ETHEREUM_BLOCK_GAS_LIMIT, HOLESKY_GENESIS_HASH,
|
||||
SEPOLIA_GENESIS_HASH,
|
||||
},
|
||||
Header, SealedHeader,
|
||||
};
|
||||
|
||||
@ -26,6 +26,7 @@ reth-tasks.workspace = true
|
||||
alloy-rlp.workspace = true
|
||||
alloy-primitives.workspace = true
|
||||
revm.workspace = true
|
||||
alloy-consensus.workspace = true
|
||||
|
||||
# async
|
||||
tokio = { workspace = true, features = ["sync", "time"] }
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
|
||||
use crate::metrics::PayloadBuilderMetrics;
|
||||
use alloy_consensus::constants::EMPTY_WITHDRAWALS;
|
||||
use alloy_primitives::{Bytes, B256, U256};
|
||||
use futures_core::ready;
|
||||
use futures_util::FutureExt;
|
||||
@ -18,7 +19,7 @@ use reth_payload_builder::{
|
||||
};
|
||||
use reth_payload_primitives::{BuiltPayload, PayloadBuilderAttributes, PayloadBuilderError};
|
||||
use reth_primitives::{
|
||||
constants::{EMPTY_WITHDRAWALS, RETH_CLIENT_VERSION, SLOT_DURATION},
|
||||
constants::{RETH_CLIENT_VERSION, SLOT_DURATION},
|
||||
proofs, BlockNumberOrTag, SealedBlock, Withdrawals,
|
||||
};
|
||||
use reth_provider::{
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
//! Ethereum protocol-related constants
|
||||
|
||||
use alloy_consensus::EMPTY_ROOT_HASH;
|
||||
use alloy_primitives::{address, b256, Address, B256, U256};
|
||||
use core::time::Duration;
|
||||
|
||||
@ -112,15 +111,6 @@ pub const OP_SYSTEM_TX_FROM_ADDR: Address = address!("deaddeaddeaddeaddeaddeadde
|
||||
/// To address from Optimism system txs: `0x4200000000000000000000000000000000000015`
|
||||
pub const OP_SYSTEM_TX_TO_ADDR: Address = address!("4200000000000000000000000000000000000015");
|
||||
|
||||
/// Transactions root of empty receipts set.
|
||||
pub const EMPTY_RECEIPTS: B256 = EMPTY_ROOT_HASH;
|
||||
|
||||
/// Transactions root of empty transactions set.
|
||||
pub const EMPTY_TRANSACTIONS: B256 = EMPTY_ROOT_HASH;
|
||||
|
||||
/// Withdrawals root of empty withdrawals set.
|
||||
pub const EMPTY_WITHDRAWALS: B256 = EMPTY_ROOT_HASH;
|
||||
|
||||
/// The number of blocks to unwind during a reorg that already became a part of canonical chain.
|
||||
///
|
||||
/// In reality, the node can end up in this particular situation very rarely. It would happen only
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
//! Common conversions from alloy types.
|
||||
|
||||
use crate::{
|
||||
constants::EMPTY_TRANSACTIONS, transaction::extract_chain_id, Block, BlockBody, Signature,
|
||||
Transaction, TransactionSigned, TransactionSignedEcRecovered, TransactionSignedNoHash, TxType,
|
||||
transaction::extract_chain_id, Block, BlockBody, Signature, Transaction, TransactionSigned,
|
||||
TransactionSignedEcRecovered, TransactionSignedNoHash, TxType,
|
||||
};
|
||||
use alloc::{string::ToString, vec::Vec};
|
||||
use alloy_consensus::{Transaction as _, TxEip1559, TxEip2930, TxEip4844, TxLegacy};
|
||||
use alloy_consensus::{
|
||||
constants::EMPTY_TRANSACTIONS, Transaction as _, TxEip1559, TxEip2930, TxEip4844, TxLegacy,
|
||||
};
|
||||
use alloy_primitives::{Parity, TxKind};
|
||||
use alloy_rlp::Error as RlpError;
|
||||
use alloy_serde::WithOtherFields;
|
||||
|
||||
Reference in New Issue
Block a user