mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-02 16:21:42 +00:00
Bump default gas limit (#7695)
N/A Bump the default gas limit to 45 million based on recommendation from EL teams https://x.com/vdWijden/status/1939234101631856969 and pandas https://ethpandaops.io/posts/gaslimit-scaling/
This commit is contained in:
@@ -29,7 +29,7 @@ use super::DEFAULT_TERMINAL_BLOCK;
|
|||||||
const TEST_BLOB_BUNDLE: &[u8] = include_bytes!("fixtures/mainnet/test_blobs_bundle.ssz");
|
const TEST_BLOB_BUNDLE: &[u8] = include_bytes!("fixtures/mainnet/test_blobs_bundle.ssz");
|
||||||
const TEST_BLOB_BUNDLE_V2: &[u8] = include_bytes!("fixtures/mainnet/test_blobs_bundle_v2.ssz");
|
const TEST_BLOB_BUNDLE_V2: &[u8] = include_bytes!("fixtures/mainnet/test_blobs_bundle_v2.ssz");
|
||||||
|
|
||||||
pub const DEFAULT_GAS_LIMIT: u64 = 30_000_000;
|
pub const DEFAULT_GAS_LIMIT: u64 = 45_000_000;
|
||||||
const GAS_USED: u64 = DEFAULT_GAS_LIMIT - 1;
|
const GAS_USED: u64 = DEFAULT_GAS_LIMIT - 1;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq)]
|
#[derive(Clone, Debug, PartialEq)]
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ use warp::reply::{self, Reply};
|
|||||||
use warp::{Filter, Rejection};
|
use warp::{Filter, Rejection};
|
||||||
|
|
||||||
pub const DEFAULT_FEE_RECIPIENT: Address = Address::repeat_byte(42);
|
pub const DEFAULT_FEE_RECIPIENT: Address = Address::repeat_byte(42);
|
||||||
pub const DEFAULT_GAS_LIMIT: u64 = 30_000_000;
|
pub const DEFAULT_GAS_LIMIT: u64 = 45_000_000;
|
||||||
pub const DEFAULT_BUILDER_PRIVATE_KEY: &str =
|
pub const DEFAULT_BUILDER_PRIVATE_KEY: &str =
|
||||||
"607a11b45a7219cc61a3d9c5fd08c7eebd602a6a19a977f8d3771d5711a550f2";
|
"607a11b45a7219cc61a3d9c5fd08c7eebd602a6a19a977f8d3771d5711a550f2";
|
||||||
|
|
||||||
|
|||||||
@@ -4669,7 +4669,7 @@ impl ApiTester {
|
|||||||
self.mock_builder
|
self.mock_builder
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.add_operation(Operation::GasLimit(30_000_000));
|
.add_operation(Operation::GasLimit(DEFAULT_GAS_LIMIT as usize));
|
||||||
|
|
||||||
let slot = self.chain.slot().unwrap();
|
let slot = self.chain.slot().unwrap();
|
||||||
let epoch = self.chain.epoch().unwrap();
|
let epoch = self.chain.epoch().unwrap();
|
||||||
@@ -4692,7 +4692,7 @@ impl ApiTester {
|
|||||||
|
|
||||||
let expected_fee_recipient = Address::from_low_u64_be(proposer_index);
|
let expected_fee_recipient = Address::from_low_u64_be(proposer_index);
|
||||||
assert_eq!(payload.fee_recipient(), expected_fee_recipient);
|
assert_eq!(payload.fee_recipient(), expected_fee_recipient);
|
||||||
assert_eq!(payload.gas_limit(), 30_000_000);
|
assert_eq!(payload.gas_limit(), DEFAULT_GAS_LIMIT);
|
||||||
|
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ Options:
|
|||||||
The gas limit to be used in all builder proposals for all validators
|
The gas limit to be used in all builder proposals for all validators
|
||||||
managed by this validator client. Note this will not necessarily be
|
managed by this validator client. Note this will not necessarily be
|
||||||
used if the gas limit set here moves too far from the previous block's
|
used if the gas limit set here moves too far from the previous block's
|
||||||
gas limit. [default: 36000000]
|
gas limit. [default: 45000000]
|
||||||
--genesis-state-url <URL>
|
--genesis-state-url <URL>
|
||||||
A URL of a beacon-API compatible server from which to download the
|
A URL of a beacon-API compatible server from which to download the
|
||||||
genesis state. Checkpoint sync server URLs can generally be used with
|
genesis state. Checkpoint sync server URLs can generally be used with
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ fn no_doppelganger_protection_flag() {
|
|||||||
fn no_gas_limit_flag() {
|
fn no_gas_limit_flag() {
|
||||||
CommandLineTest::new()
|
CommandLineTest::new()
|
||||||
.run()
|
.run()
|
||||||
.with_config(|config| assert!(config.validator_store.gas_limit == Some(36_000_000)));
|
.with_config(|config| assert!(config.validator_store.gas_limit == Some(45_000_000)));
|
||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
fn gas_limit_flag() {
|
fn gas_limit_flag() {
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ const SLASHING_PROTECTION_HISTORY_EPOCHS: u64 = 512;
|
|||||||
|
|
||||||
/// Currently used as the default gas limit in execution clients.
|
/// Currently used as the default gas limit in execution clients.
|
||||||
///
|
///
|
||||||
/// https://ethresear.ch/t/on-increasing-the-block-gas-limit-technical-considerations-path-forward/21225.
|
/// https://ethpandaops.io/posts/gaslimit-scaling/.
|
||||||
pub const DEFAULT_GAS_LIMIT: u64 = 36_000_000;
|
pub const DEFAULT_GAS_LIMIT: u64 = 45_000_000;
|
||||||
|
|
||||||
pub struct LighthouseValidatorStore<T, E> {
|
pub struct LighthouseValidatorStore<T, E> {
|
||||||
validators: Arc<RwLock<InitializedValidators>>,
|
validators: Arc<RwLock<InitializedValidators>>,
|
||||||
|
|||||||
@@ -388,7 +388,7 @@ pub struct ValidatorClient {
|
|||||||
#[clap(
|
#[clap(
|
||||||
long,
|
long,
|
||||||
value_name = "INTEGER",
|
value_name = "INTEGER",
|
||||||
default_value_t = 36_000_000,
|
default_value_t = 45_000_000,
|
||||||
requires = "builder_proposals",
|
requires = "builder_proposals",
|
||||||
help = "The gas limit to be used in all builder proposals for all validators managed \
|
help = "The gas limit to be used in all builder proposals for all validators managed \
|
||||||
by this validator client. Note this will not necessarily be used if the gas limit \
|
by this validator client. Note this will not necessarily be used if the gas limit \
|
||||||
|
|||||||
Reference in New Issue
Block a user