From 11e94f358bd7f6ef33e6392ebf8a2202622b624c Mon Sep 17 00:00:00 2001 From: eth2353 <70237279+eth2353@users.noreply.github.com> Date: Sun, 6 Apr 2025 01:07:20 +0200 Subject: [PATCH] Set `ELECTRA_FORK_EPOCH` for mainnet --- src/spec/configs/mainnet.yaml | 24 +++++++++++++++++++----- tests/spec/configs/test_spec_configs.py | 8 +------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/spec/configs/mainnet.yaml b/src/spec/configs/mainnet.yaml index 6b769d84..e4189bd5 100644 --- a/src/spec/configs/mainnet.yaml +++ b/src/spec/configs/mainnet.yaml @@ -6,7 +6,9 @@ PRESET_BASE: 'mainnet' # Free-form short name of the network that this configuration applies to - known # canonical network names include: # * 'mainnet' - there can be only one -# * 'prater' - testnet +# * 'sepolia' - testnet +# * 'holesky' - testnet +# * 'hoodi' - testnet # Must match the regex: [a-z0-9\-] CONFIG_NAME: 'mainnet' @@ -19,7 +21,6 @@ TERMINAL_BLOCK_HASH: 0x000000000000000000000000000000000000000000000000000000000 TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551615 - # Genesis # --------------------------------------------------------------- # `2**14` (= 16,384) @@ -50,6 +51,9 @@ CAPELLA_FORK_EPOCH: 194048 # April 12, 2023, 10:27:35pm UTC # Deneb DENEB_FORK_VERSION: 0x04000000 DENEB_FORK_EPOCH: 269568 # March 13, 2024, 01:55:35pm UTC +# Electra +ELECTRA_FORK_VERSION: 0x05000000 +ELECTRA_FORK_EPOCH: 364032 # May 7, 2025, 10:05:11am UTC # Time parameters @@ -104,15 +108,13 @@ DEPOSIT_CONTRACT_ADDRESS: 0x00000000219ab540356cBB839Cbe05303d7705Fa # Networking # --------------------------------------------------------------- # `10 * 2**20` (= 10485760, 10 MiB) -GOSSIP_MAX_SIZE: 10485760 +MAX_PAYLOAD_SIZE: 10485760 # `2**10` (= 1024) MAX_REQUEST_BLOCKS: 1024 # `2**8` (= 256) EPOCHS_PER_SUBNET_SUBSCRIPTION: 256 # `MIN_VALIDATOR_WITHDRAWABILITY_DELAY + CHURN_LIMIT_QUOTIENT // 2` (= 33024, ~5 months) MIN_EPOCHS_FOR_BLOCK_REQUESTS: 33024 -# `10 * 2**20` (=10485760, 10 MiB) -MAX_CHUNK_SIZE: 10485760 # 5s TTFB_TIMEOUT: 5 # 10s @@ -139,3 +141,15 @@ MAX_REQUEST_BLOB_SIDECARS: 768 MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: 4096 # `6` BLOB_SIDECAR_SUBNET_COUNT: 6 + +# Electra +# 2**7 * 10**9 (= 128,000,000,000) +MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: 128000000000 +# 2**8 * 10**9 (= 256,000,000,000) +MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT: 256000000000 +# `9` +BLOB_SIDECAR_SUBNET_COUNT_ELECTRA: 9 +# `uint64(9)` +MAX_BLOBS_PER_BLOCK_ELECTRA: 9 +# MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK_ELECTRA +MAX_REQUEST_BLOB_SIDECARS_ELECTRA: 1152 diff --git a/tests/spec/configs/test_spec_configs.py b/tests/spec/configs/test_spec_configs.py index 738839e4..97d1ef4a 100644 --- a/tests/spec/configs/test_spec_configs.py +++ b/tests/spec/configs/test_spec_configs.py @@ -1,5 +1,4 @@ import pytest -import remerkleable.core from spec.configs import Network, get_network_spec @@ -9,9 +8,4 @@ argvalues=[network for network in Network if network != Network.CUSTOM], ) def test_get_network_spec(network: Network) -> None: - if network in (Network.MAINNET,): - # Electra fork epoch not defined in config - with pytest.raises(remerkleable.core.ObjParseException): - get_network_spec(network) - else: - _ = get_network_spec(network=network) + _ = get_network_spec(network=network)