From e22c9eed8f9de26f14d78989d363b20009a20875 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Mon, 19 Feb 2024 13:22:19 +1100 Subject: [PATCH] Add Deneb fork epoch for Gnosis (#5242) * Add Deneb fork epoch for Gnosis * Add deneb constants * Update common/eth2_network_config/built_in_network_configs/gnosis/config.yaml Co-authored-by: realbigsean * Adjust `min_epochs_for_block_requests` * Change `MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT` * Fix chain spec `max_per_epoch_activation_churn_limit` * Fix chain spec values again --- .../built_in_network_configs/gnosis/config.yaml | 14 ++++++++++++-- consensus/types/src/chain_spec.rs | 8 ++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/common/eth2_network_config/built_in_network_configs/gnosis/config.yaml b/common/eth2_network_config/built_in_network_configs/gnosis/config.yaml index 18a08ed12..2311d6db0 100644 --- a/common/eth2_network_config/built_in_network_configs/gnosis/config.yaml +++ b/common/eth2_network_config/built_in_network_configs/gnosis/config.yaml @@ -41,7 +41,7 @@ CAPELLA_FORK_VERSION: 0x03000064 CAPELLA_FORK_EPOCH: 648704 # Deneb DENEB_FORK_VERSION: 0x04000064 -DENEB_FORK_EPOCH: 18446744073709551615 +DENEB_FORK_EPOCH: 889856 # 2024-03-11T18:30:20.000Z # Sharding SHARDING_FORK_VERSION: 0x03000064 SHARDING_FORK_EPOCH: 18446744073709551615 @@ -75,7 +75,7 @@ EJECTION_BALANCE: 16000000000 # 2**2 (= 4) MIN_PER_EPOCH_CHURN_LIMIT: 4 # 2**3 (= 8) -MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: 8 +MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: 2 # 2**12 (= 4096) CHURN_LIMIT_QUOTIENT: 4096 @@ -106,3 +106,13 @@ ATTESTATION_SUBNET_COUNT: 64 ATTESTATION_SUBNET_EXTRA_BITS: 0 ATTESTATION_SUBNET_PREFIX_BITS: 6 ATTESTATION_SUBNET_SHUFFLING_PREFIX_BITS: 3 + +# Deneb +# `2**7` (=128) +MAX_REQUEST_BLOCKS_DENEB: 128 +# MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK +MAX_REQUEST_BLOB_SIDECARS: 768 +# `2**14` (= 16384 epochs, ~15 days) +MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: 16384 +# `6` +BLOB_SIDECAR_SUBNET_COUNT: 6 diff --git a/consensus/types/src/chain_spec.rs b/consensus/types/src/chain_spec.rs index c32c67fa3..88f989d2a 100644 --- a/consensus/types/src/chain_spec.rs +++ b/consensus/types/src/chain_spec.rs @@ -809,7 +809,7 @@ impl ChainSpec { max_committees_per_slot: 64, target_committee_size: 128, min_per_epoch_churn_limit: 4, - max_per_epoch_activation_churn_limit: 8, + max_per_epoch_activation_churn_limit: 2, churn_limit_quotient: 4_096, shuffle_round_count: 90, min_genesis_active_validator_count: 4_096, @@ -944,7 +944,7 @@ impl ChainSpec { * Deneb hard fork params */ deneb_fork_version: [0x04, 0x00, 0x00, 0x64], - deneb_fork_epoch: None, + deneb_fork_epoch: Some(Epoch::new(889856)), /* * Network specific @@ -958,7 +958,7 @@ impl ChainSpec { target_aggregators_per_committee: 16, epochs_per_subnet_subscription: default_epochs_per_subnet_subscription(), gossip_max_size: default_gossip_max_size(), - min_epochs_for_block_requests: default_min_epochs_for_block_requests(), + min_epochs_for_block_requests: 33024, max_chunk_size: default_max_chunk_size(), ttfb_timeout: default_ttfb_timeout(), resp_timeout: default_resp_timeout(), @@ -975,7 +975,7 @@ impl ChainSpec { */ max_request_blocks_deneb: default_max_request_blocks_deneb(), max_request_blob_sidecars: default_max_request_blob_sidecars(), - min_epochs_for_blob_sidecars_requests: default_min_epochs_for_blob_sidecars_requests(), + min_epochs_for_blob_sidecars_requests: 16384, blob_sidecar_subnet_count: default_blob_sidecar_subnet_count(), /*