mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: bump alloy 0.11.1 (#14439)
This commit is contained in:
@ -8,7 +8,7 @@ use alloy_consensus::{
|
||||
Header, SignableTransaction, Transaction as _, TxEip1559, TxReceipt, EMPTY_ROOT_HASH,
|
||||
};
|
||||
use alloy_eips::{
|
||||
eip1559::{ETHEREUM_BLOCK_GAS_LIMIT, INITIAL_BASE_FEE},
|
||||
eip1559::{ETHEREUM_BLOCK_GAS_LIMIT_30M, INITIAL_BASE_FEE},
|
||||
eip7685::Requests,
|
||||
};
|
||||
use alloy_primitives::{Address, BlockNumber, B256, U256};
|
||||
@ -146,7 +146,7 @@ impl<N: NodePrimitives> TestBlockBuilder<N> {
|
||||
parent_hash,
|
||||
gas_used: transactions.len() as u64 * MIN_TRANSACTION_GAS,
|
||||
mix_hash: B256::random(),
|
||||
gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
gas_limit: ETHEREUM_BLOCK_GAS_LIMIT_30M,
|
||||
base_fee_per_gas: Some(INITIAL_BASE_FEE),
|
||||
transactions_root: calculate_transaction_root(
|
||||
&transactions.clone().into_iter().map(|tx| tx.into_tx()).collect::<Vec<_>>(),
|
||||
|
||||
@ -231,7 +231,7 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::test_utils::{insert_headers_into_client, TestPipelineBuilder};
|
||||
use alloy_consensus::Header;
|
||||
use alloy_eips::eip1559::ETHEREUM_BLOCK_GAS_LIMIT;
|
||||
use alloy_eips::eip1559::ETHEREUM_BLOCK_GAS_LIMIT_30M;
|
||||
use alloy_primitives::{BlockNumber, B256};
|
||||
use assert_matches::assert_matches;
|
||||
use futures::poll;
|
||||
@ -271,7 +271,7 @@ mod tests {
|
||||
let client = TestFullBlockClient::default();
|
||||
let header = Header {
|
||||
base_fee_per_gas: Some(7),
|
||||
gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
gas_limit: ETHEREUM_BLOCK_GAS_LIMIT_30M,
|
||||
..Default::default()
|
||||
};
|
||||
let header = SealedHeader::seal_slow(header);
|
||||
|
||||
@ -313,7 +313,7 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::test_utils::insert_headers_into_client;
|
||||
use alloy_consensus::Header;
|
||||
use alloy_eips::eip1559::ETHEREUM_BLOCK_GAS_LIMIT;
|
||||
use alloy_eips::eip1559::ETHEREUM_BLOCK_GAS_LIMIT_30M;
|
||||
use assert_matches::assert_matches;
|
||||
use reth_chainspec::{ChainSpecBuilder, MAINNET};
|
||||
use reth_ethereum_consensus::EthBeaconConsensus;
|
||||
@ -340,7 +340,7 @@ mod tests {
|
||||
let client = TestFullBlockClient::default();
|
||||
let header = Header {
|
||||
base_fee_per_gas: Some(7),
|
||||
gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
gas_limit: ETHEREUM_BLOCK_GAS_LIMIT_30M,
|
||||
..Default::default()
|
||||
};
|
||||
let header = SealedHeader::seal_slow(header);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
use alloy_eips::eip1559::ETHEREUM_BLOCK_GAS_LIMIT;
|
||||
use alloy_eips::eip1559::ETHEREUM_BLOCK_GAS_LIMIT_30M;
|
||||
use alloy_primitives::Bytes;
|
||||
use reth_primitives_traits::constants::GAS_LIMIT_BOUND_DIVISOR;
|
||||
|
||||
@ -14,7 +14,7 @@ pub struct EthereumBuilderConfig {
|
||||
impl EthereumBuilderConfig {
|
||||
/// Create new payload builder config.
|
||||
pub const fn new(extra_data: Bytes) -> Self {
|
||||
Self { extra_data, desired_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT }
|
||||
Self { extra_data, desired_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT_30M }
|
||||
}
|
||||
|
||||
/// Set desired gas limit.
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
use crate::{cli::config::PayloadBuilderConfig, version::default_extra_data};
|
||||
use alloy_consensus::constants::MAXIMUM_EXTRA_DATA_SIZE;
|
||||
use alloy_eips::{eip1559::ETHEREUM_BLOCK_GAS_LIMIT, merge::SLOT_DURATION};
|
||||
use alloy_eips::{eip1559::ETHEREUM_BLOCK_GAS_LIMIT_30M, merge::SLOT_DURATION};
|
||||
use clap::{
|
||||
builder::{RangedU64ValueParser, TypedValueParser},
|
||||
Arg, Args, Command,
|
||||
@ -17,7 +17,7 @@ pub struct PayloadBuilderArgs {
|
||||
pub extra_data: String,
|
||||
|
||||
/// Target gas limit for built blocks.
|
||||
#[arg(long = "builder.gaslimit", default_value_t = ETHEREUM_BLOCK_GAS_LIMIT, value_name = "GAS_LIMIT")]
|
||||
#[arg(long = "builder.gaslimit", default_value_t = ETHEREUM_BLOCK_GAS_LIMIT_30M, value_name = "GAS_LIMIT")]
|
||||
pub gas_limit: u64,
|
||||
|
||||
/// The interval at which the job should build a new payload after the last.
|
||||
@ -41,7 +41,7 @@ impl Default for PayloadBuilderArgs {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
extra_data: default_extra_data(),
|
||||
gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
gas_limit: ETHEREUM_BLOCK_GAS_LIMIT_30M,
|
||||
interval: Duration::from_secs(1),
|
||||
deadline: SLOT_DURATION,
|
||||
max_payload_tasks: 3,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
//! Transaction pool arguments
|
||||
|
||||
use crate::cli::config::RethTransactionPoolConfig;
|
||||
use alloy_eips::eip1559::{ETHEREUM_BLOCK_GAS_LIMIT, MIN_PROTOCOL_BASE_FEE};
|
||||
use alloy_eips::eip1559::{ETHEREUM_BLOCK_GAS_LIMIT_30M, MIN_PROTOCOL_BASE_FEE};
|
||||
use alloy_primitives::Address;
|
||||
use clap::Args;
|
||||
use reth_cli_util::parse_duration_from_secs_or_ms;
|
||||
@ -62,7 +62,7 @@ pub struct TxPoolArgs {
|
||||
pub minimal_protocol_basefee: u64,
|
||||
|
||||
/// The default enforced gas limit for transactions entering the pool
|
||||
#[arg(long = "txpool.gas-limit", default_value_t = ETHEREUM_BLOCK_GAS_LIMIT)]
|
||||
#[arg(long = "txpool.gas-limit", default_value_t = ETHEREUM_BLOCK_GAS_LIMIT_30M)]
|
||||
pub enforced_gas_limit: u64,
|
||||
|
||||
/// Price bump percentage to replace an already existing blob transaction
|
||||
@ -122,7 +122,7 @@ impl Default for TxPoolArgs {
|
||||
max_account_slots: TXPOOL_MAX_ACCOUNT_SLOTS_PER_SENDER,
|
||||
price_bump: DEFAULT_PRICE_BUMP,
|
||||
minimal_protocol_basefee: MIN_PROTOCOL_BASE_FEE,
|
||||
enforced_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
enforced_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT_30M,
|
||||
blob_transaction_price_bump: REPLACE_BLOB_PRICE_BUMP,
|
||||
max_tx_input_bytes: DEFAULT_MAX_TX_INPUT_BYTES,
|
||||
max_cached_entries: DEFAULT_MAX_CACHED_BLOBS,
|
||||
|
||||
@ -27,7 +27,7 @@ where
|
||||
EngineApiClient::new_payload_v2(
|
||||
client,
|
||||
ExecutionPayloadInputV2 {
|
||||
execution_payload: ExecutionPayloadV1::from_block_slow::<TransactionSigned>(
|
||||
execution_payload: ExecutionPayloadV1::from_block_slow::<TransactionSigned, _>(
|
||||
&block.into_block(),
|
||||
),
|
||||
withdrawals: None,
|
||||
|
||||
@ -80,8 +80,8 @@ pub mod gas_oracle {
|
||||
|
||||
/// The default gas limit for `eth_call` and adjacent calls.
|
||||
///
|
||||
/// This is different from the default to regular 30M block gas limit `ETHEREUM_BLOCK_GAS_LIMIT`
|
||||
/// to allow for more complex calls.
|
||||
/// This is different from the default to regular 30M block gas limit
|
||||
/// `ETHEREUM_BLOCK_GAS_LIMIT_30M` to allow for more complex calls.
|
||||
pub const RPC_DEFAULT_GAS_CAP: u64 = 50_000_000;
|
||||
|
||||
/// Allowed error ratio for gas estimation
|
||||
|
||||
@ -36,7 +36,7 @@ where
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use alloy_eips::eip1559::ETHEREUM_BLOCK_GAS_LIMIT;
|
||||
use alloy_eips::eip1559::ETHEREUM_BLOCK_GAS_LIMIT_30M;
|
||||
use alloy_primitives::{Address, StorageKey, StorageValue, U256};
|
||||
use reth_chainspec::MAINNET;
|
||||
use reth_evm_ethereum::EthEvmConfig;
|
||||
@ -64,7 +64,7 @@ mod tests {
|
||||
NoopNetwork::default(),
|
||||
cache.clone(),
|
||||
GasPriceOracle::new(NoopProvider::default(), Default::default(), cache),
|
||||
ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
ETHEREUM_BLOCK_GAS_LIMIT_30M,
|
||||
DEFAULT_MAX_SIMULATE_BLOCKS,
|
||||
DEFAULT_ETH_PROOF_WINDOW,
|
||||
BlockingTaskPool::build().expect("failed to build tracing pool"),
|
||||
@ -90,7 +90,7 @@ mod tests {
|
||||
(),
|
||||
cache.clone(),
|
||||
GasPriceOracle::new(mock_provider, Default::default(), cache),
|
||||
ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
ETHEREUM_BLOCK_GAS_LIMIT_30M,
|
||||
DEFAULT_MAX_SIMULATE_BLOCKS,
|
||||
DEFAULT_ETH_PROOF_WINDOW + 1,
|
||||
BlockingTaskPool::build().expect("failed to build tracing pool"),
|
||||
|
||||
@ -56,7 +56,7 @@ where
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use alloy_eips::eip1559::ETHEREUM_BLOCK_GAS_LIMIT;
|
||||
use alloy_eips::eip1559::ETHEREUM_BLOCK_GAS_LIMIT_30M;
|
||||
use alloy_primitives::{hex_literal::hex, Bytes};
|
||||
use reth_chainspec::ChainSpecProvider;
|
||||
use reth_evm_ethereum::EthEvmConfig;
|
||||
@ -88,7 +88,7 @@ mod tests {
|
||||
noop_network_provider,
|
||||
cache.clone(),
|
||||
GasPriceOracle::new(noop_provider, Default::default(), cache.clone()),
|
||||
ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
ETHEREUM_BLOCK_GAS_LIMIT_30M,
|
||||
DEFAULT_MAX_SIMULATE_BLOCKS,
|
||||
DEFAULT_ETH_PROOF_WINDOW,
|
||||
BlockingTaskPool::build().expect("failed to build tracing pool"),
|
||||
|
||||
@ -4,7 +4,7 @@ use crate::{
|
||||
PoolSize, TransactionOrigin,
|
||||
};
|
||||
use alloy_consensus::constants::EIP4844_TX_TYPE_ID;
|
||||
use alloy_eips::eip1559::{ETHEREUM_BLOCK_GAS_LIMIT, MIN_PROTOCOL_BASE_FEE};
|
||||
use alloy_eips::eip1559::{ETHEREUM_BLOCK_GAS_LIMIT_30M, MIN_PROTOCOL_BASE_FEE};
|
||||
use alloy_primitives::Address;
|
||||
use std::{collections::HashSet, ops::Mul, time::Duration};
|
||||
|
||||
@ -84,7 +84,7 @@ impl Default for PoolConfig {
|
||||
max_account_slots: TXPOOL_MAX_ACCOUNT_SLOTS_PER_SENDER,
|
||||
price_bumps: Default::default(),
|
||||
minimal_protocol_basefee: MIN_PROTOCOL_BASE_FEE,
|
||||
gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
gas_limit: ETHEREUM_BLOCK_GAS_LIMIT_30M,
|
||||
local_transactions_config: Default::default(),
|
||||
pending_tx_listener_buffer_size: PENDING_TX_LISTENER_BUFFER_SIZE,
|
||||
new_tx_listener_buffer_size: NEW_TX_LISTENER_BUFFER_SIZE,
|
||||
|
||||
@ -17,7 +17,7 @@ use crate::{
|
||||
TransactionValidationOutcome, TransactionValidator, ValidPoolTransaction,
|
||||
};
|
||||
use alloy_eips::{
|
||||
eip1559::ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
eip1559::ETHEREUM_BLOCK_GAS_LIMIT_30M,
|
||||
eip4844::{BlobAndProofV1, BlobTransactionSidecar},
|
||||
};
|
||||
use alloy_primitives::{Address, TxHash, B256, U256};
|
||||
@ -43,7 +43,7 @@ impl TransactionPool for NoopTransactionPool {
|
||||
|
||||
fn block_info(&self) -> BlockInfo {
|
||||
BlockInfo {
|
||||
block_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
block_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT_30M,
|
||||
last_seen_block_hash: Default::default(),
|
||||
last_seen_block_number: 0,
|
||||
pending_basefee: 0,
|
||||
|
||||
@ -23,7 +23,7 @@ use alloy_consensus::constants::{
|
||||
LEGACY_TX_TYPE_ID,
|
||||
};
|
||||
use alloy_eips::{
|
||||
eip1559::{ETHEREUM_BLOCK_GAS_LIMIT, MIN_PROTOCOL_BASE_FEE},
|
||||
eip1559::{ETHEREUM_BLOCK_GAS_LIMIT_30M, MIN_PROTOCOL_BASE_FEE},
|
||||
eip4844::BLOB_TX_MIN_BLOB_GASPRICE,
|
||||
Typed2718,
|
||||
};
|
||||
@ -1832,7 +1832,7 @@ impl<T: PoolTransaction> Default for AllTransactions<T> {
|
||||
Self {
|
||||
max_account_slots: TXPOOL_MAX_ACCOUNT_SLOTS_PER_SENDER,
|
||||
minimal_protocol_basefee: MIN_PROTOCOL_BASE_FEE,
|
||||
block_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
block_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT_30M,
|
||||
by_hash: Default::default(),
|
||||
txs: Default::default(),
|
||||
tx_counter: Default::default(),
|
||||
|
||||
@ -19,7 +19,8 @@ use alloy_consensus::{
|
||||
BlockHeader,
|
||||
};
|
||||
use alloy_eips::{
|
||||
eip1559::ETHEREUM_BLOCK_GAS_LIMIT, eip4844::env_settings::EnvKzgSettings, eip7840::BlobParams,
|
||||
eip1559::ETHEREUM_BLOCK_GAS_LIMIT_30M, eip4844::env_settings::EnvKzgSettings,
|
||||
eip7840::BlobParams,
|
||||
};
|
||||
use reth_chainspec::{ChainSpecProvider, EthChainSpec, EthereumHardforks};
|
||||
use reth_primitives::{InvalidTransactionError, SealedBlock};
|
||||
@ -591,7 +592,7 @@ impl<Client> EthTransactionValidatorBuilder<Client> {
|
||||
/// - EIP-4844
|
||||
pub fn new(client: Client) -> Self {
|
||||
Self {
|
||||
block_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT.into(),
|
||||
block_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT_30M.into(),
|
||||
client,
|
||||
minimum_priority_fee: None,
|
||||
additional_tasks: 1,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
//! Transaction pool eviction tests.
|
||||
|
||||
use alloy_consensus::Transaction;
|
||||
use alloy_eips::eip1559::{ETHEREUM_BLOCK_GAS_LIMIT, MIN_PROTOCOL_BASE_FEE};
|
||||
use alloy_eips::eip1559::{ETHEREUM_BLOCK_GAS_LIMIT_30M, MIN_PROTOCOL_BASE_FEE};
|
||||
use alloy_primitives::{Address, B256};
|
||||
use rand::distributions::Uniform;
|
||||
use reth_transaction_pool::{
|
||||
@ -28,7 +28,7 @@ async fn only_blobs_eviction() {
|
||||
|
||||
let pool: TestPool = TestPoolBuilder::default().with_config(pool_config.clone()).into();
|
||||
let block_info = BlockInfo {
|
||||
block_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
block_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT_30M,
|
||||
last_seen_block_hash: B256::ZERO,
|
||||
last_seen_block_number: 0,
|
||||
pending_basefee: 10,
|
||||
@ -141,7 +141,7 @@ async fn mixed_eviction() {
|
||||
|
||||
let pool: TestPool = TestPoolBuilder::default().with_config(pool_config.clone()).into();
|
||||
let block_info = BlockInfo {
|
||||
block_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
block_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT_30M,
|
||||
last_seen_block_hash: B256::ZERO,
|
||||
last_seen_block_number: 0,
|
||||
pending_basefee: 10,
|
||||
@ -243,7 +243,7 @@ async fn nonce_gaps_eviction() {
|
||||
|
||||
let pool: TestPool = TestPoolBuilder::default().with_config(pool_config.clone()).into();
|
||||
let block_info = BlockInfo {
|
||||
block_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT,
|
||||
block_gas_limit: ETHEREUM_BLOCK_GAS_LIMIT_30M,
|
||||
last_seen_block_hash: B256::ZERO,
|
||||
last_seen_block_number: 0,
|
||||
pending_basefee: 10,
|
||||
|
||||
Reference in New Issue
Block a user