mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
primitives: use alloy MAXIMUM_EXTRA_DATA_SIZE constant (#11881)
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -7886,6 +7886,7 @@ dependencies = [
|
||||
name = "reth-node-core"
|
||||
version = "1.1.0"
|
||||
dependencies = [
|
||||
"alloy-consensus",
|
||||
"alloy-primitives",
|
||||
"alloy-rpc-types-engine",
|
||||
"clap",
|
||||
|
||||
@ -19,6 +19,7 @@ reth-consensus.workspace = true
|
||||
# ethereum
|
||||
alloy-primitives.workspace = true
|
||||
revm-primitives.workspace = true
|
||||
alloy-consensus.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
reth-storage-api.workspace = true
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
//! Collection of methods for block validation.
|
||||
|
||||
use alloy_consensus::constants::MAXIMUM_EXTRA_DATA_SIZE;
|
||||
use reth_chainspec::{EthChainSpec, EthereumHardforks};
|
||||
use reth_consensus::ConsensusError;
|
||||
use reth_primitives::{
|
||||
constants::{
|
||||
eip4844::{DATA_GAS_PER_BLOB, MAX_DATA_GAS_PER_BLOCK},
|
||||
MAXIMUM_EXTRA_DATA_SIZE,
|
||||
},
|
||||
constants::eip4844::{DATA_GAS_PER_BLOB, MAX_DATA_GAS_PER_BLOCK},
|
||||
EthereumHardfork, GotExpected, Header, SealedBlock, SealedHeader,
|
||||
};
|
||||
use revm_primitives::calc_excess_blob_gas;
|
||||
|
||||
@ -39,6 +39,7 @@ reth-stages-types.workspace = true
|
||||
# ethereum
|
||||
alloy-primitives.workspace = true
|
||||
alloy-rpc-types-engine = { workspace = true, features = ["jwt"] }
|
||||
alloy-consensus.workspace = true
|
||||
|
||||
# misc
|
||||
eyre.workspace = true
|
||||
@ -76,9 +77,7 @@ tokio.workspace = true
|
||||
tempfile.workspace = true
|
||||
|
||||
[features]
|
||||
optimism = [
|
||||
"reth-primitives/optimism"
|
||||
]
|
||||
optimism = ["reth-primitives/optimism"]
|
||||
# Features for vergen to generate correct env vars
|
||||
jemalloc = []
|
||||
asm-keccak = []
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
use crate::{cli::config::PayloadBuilderConfig, version::default_extradata};
|
||||
use alloy_consensus::constants::MAXIMUM_EXTRA_DATA_SIZE;
|
||||
use clap::{
|
||||
builder::{RangedU64ValueParser, TypedValueParser},
|
||||
Arg, Args, Command,
|
||||
};
|
||||
use reth_cli_util::{parse_duration_from_secs, parse_duration_from_secs_or_ms};
|
||||
use reth_primitives::constants::{
|
||||
ETHEREUM_BLOCK_GAS_LIMIT, MAXIMUM_EXTRA_DATA_SIZE, SLOT_DURATION,
|
||||
};
|
||||
use reth_primitives::constants::{ETHEREUM_BLOCK_GAS_LIMIT, SLOT_DURATION};
|
||||
use std::{borrow::Cow, ffi::OsStr, time::Duration};
|
||||
|
||||
/// Parameters for configuring the Payload Builder
|
||||
|
||||
@ -13,9 +13,6 @@ pub const RETH_CLIENT_VERSION: &str = concat!("reth/v", env!("CARGO_PKG_VERSION"
|
||||
/// The first four bytes of the call data for a function call specifies the function to be called.
|
||||
pub const SELECTOR_LEN: usize = 4;
|
||||
|
||||
/// Maximum extra data size in a block after genesis
|
||||
pub const MAXIMUM_EXTRA_DATA_SIZE: usize = 32;
|
||||
|
||||
/// An EPOCH is a series of 32 slots.
|
||||
pub const EPOCH_SLOTS: u64 = 32;
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
//! Standalone Conversion Functions for Handling Different Versions of Execution Payloads in
|
||||
//! Ethereum's Engine
|
||||
|
||||
use alloy_consensus::EMPTY_OMMER_ROOT_HASH;
|
||||
use alloy_consensus::{constants::MAXIMUM_EXTRA_DATA_SIZE, EMPTY_OMMER_ROOT_HASH};
|
||||
use alloy_eips::eip2718::{Decodable2718, Encodable2718};
|
||||
use alloy_primitives::{B256, U256};
|
||||
use alloy_rpc_types_engine::{
|
||||
@ -10,7 +10,6 @@ use alloy_rpc_types_engine::{
|
||||
ExecutionPayloadV4, PayloadError,
|
||||
};
|
||||
use reth_primitives::{
|
||||
constants::MAXIMUM_EXTRA_DATA_SIZE,
|
||||
proofs::{self},
|
||||
Block, BlockBody, Header, Request, SealedBlock, TransactionSigned, Withdrawals,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user