Skip to content

Commit b6a5c18

Browse files
authored
chore: add Deneb configs (#768)
1 parent c5df49a commit b6a5c18

File tree

7 files changed

+116
-7
lines changed

7 files changed

+116
-7
lines changed

config/networks/mainnet/config.yaml

+38-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,16 @@ CAPELLA_FORK_VERSION: 0x03000000
4646
CAPELLA_FORK_EPOCH: 194048 # April 12, 2023, 10:27:35pm UTC
4747
# Deneb
4848
DENEB_FORK_VERSION: 0x04000000
49-
DENEB_FORK_EPOCH: 18446744073709551615
49+
DENEB_FORK_EPOCH: 269568 # March 13, 2024, 01:55:35pm UTC
50+
# EIP6110
51+
EIP6110_FORK_VERSION: 0x05000000 # temporary stub
52+
EIP6110_FORK_EPOCH: 18446744073709551615
53+
# EIP7002
54+
EIP7002_FORK_VERSION: 0x05000000 # temporary stub
55+
EIP7002_FORK_EPOCH: 18446744073709551615
56+
# WHISK
57+
WHISK_FORK_VERSION: 0x06000000 # temporary stub
58+
WHISK_FORK_EPOCH: 18446744073709551615
5059

5160
# Time parameters
5261
# ---------------------------------------------------------------
@@ -73,11 +82,19 @@ EJECTION_BALANCE: 16000000000
7382
MIN_PER_EPOCH_CHURN_LIMIT: 4
7483
# 2**16 (= 65,536)
7584
CHURN_LIMIT_QUOTIENT: 65536
85+
# [New in Deneb:EIP7514] 2**3 (= 8)
86+
MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: 8
7687

7788
# Fork choice
7889
# ---------------------------------------------------------------
7990
# 40%
8091
PROPOSER_SCORE_BOOST: 40
92+
# 20%
93+
REORG_HEAD_WEIGHT_THRESHOLD: 20
94+
# 160%
95+
REORG_PARENT_WEIGHT_THRESHOLD: 160
96+
# `2` epochs
97+
REORG_MAX_EPOCHS_SINCE_FINALIZATION: 2
8198

8299
# Deposit contract
83100
# ---------------------------------------------------------------
@@ -114,3 +131,23 @@ ATTESTATION_SUBNET_COUNT: 64
114131
ATTESTATION_SUBNET_EXTRA_BITS: 0
115132
# ceillog2(ATTESTATION_SUBNET_COUNT) + ATTESTATION_SUBNET_EXTRA_BITS
116133
ATTESTATION_SUBNET_PREFIX_BITS: 6
134+
135+
# Deneb
136+
# `2**7` (=128)
137+
MAX_REQUEST_BLOCKS_DENEB: 128
138+
# MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK
139+
MAX_REQUEST_BLOB_SIDECARS: 768
140+
# `2**12` (= 4096 epochs, ~18 days)
141+
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: 4096
142+
# `6`
143+
BLOB_SIDECAR_SUBNET_COUNT: 6
144+
145+
# Whisk
146+
# `Epoch(2**8)`
147+
WHISK_EPOCHS_PER_SHUFFLING_PHASE: 256
148+
# `Epoch(2)`
149+
WHISK_PROPOSER_SELECTION_GAP: 2
150+
151+
# EIP7594
152+
EIP7594_FORK_VERSION: 0x06000001
153+
EIP7594_FORK_EPOCH: 18446744073709551615

config/networks/minimal/config.yaml

+38-2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ CAPELLA_FORK_EPOCH: 18446744073709551615
4646
# DENEB
4747
DENEB_FORK_VERSION: 0x04000001
4848
DENEB_FORK_EPOCH: 18446744073709551615
49+
# EIP6110
50+
EIP6110_FORK_VERSION: 0x05000001
51+
EIP6110_FORK_EPOCH: 18446744073709551615
52+
# EIP7002
53+
EIP7002_FORK_VERSION: 0x05000001
54+
EIP7002_FORK_EPOCH: 18446744073709551615
55+
# WHISK
56+
WHISK_FORK_VERSION: 0x06000001
57+
WHISK_FORK_EPOCH: 18446744073709551615
4958

5059
# Time parameters
5160
# ---------------------------------------------------------------
@@ -68,15 +77,24 @@ INACTIVITY_SCORE_BIAS: 4
6877
INACTIVITY_SCORE_RECOVERY_RATE: 16
6978
# 2**4 * 10**9 (= 16,000,000,000) Gwei
7079
EJECTION_BALANCE: 16000000000
71-
# 2**2 (= 4)
72-
MIN_PER_EPOCH_CHURN_LIMIT: 4
80+
# [customized] more easily demonstrate the difference between this value and the activation churn limit
81+
# TODO: 1. update code to latest spec; 2. bump spectest version; 3. update this value
82+
MIN_PER_EPOCH_CHURN_LIMIT: 4 # 2
7383
# [customized] scale queue churn at much lower validator counts for testing
7484
CHURN_LIMIT_QUOTIENT: 32
85+
# [New in Deneb:EIP7514] [customized]
86+
MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: 4
7587

7688
# Fork choice
7789
# ---------------------------------------------------------------
7890
# 40%
7991
PROPOSER_SCORE_BOOST: 40
92+
# 20%
93+
REORG_HEAD_WEIGHT_THRESHOLD: 20
94+
# 160%
95+
REORG_PARENT_WEIGHT_THRESHOLD: 160
96+
# `2` epochs
97+
REORG_MAX_EPOCHS_SINCE_FINALIZATION: 2
8098

8199
# Deposit contract
82100
# ---------------------------------------------------------------
@@ -114,3 +132,21 @@ ATTESTATION_SUBNET_COUNT: 64
114132
ATTESTATION_SUBNET_EXTRA_BITS: 0
115133
# ceillog2(ATTESTATION_SUBNET_COUNT) + ATTESTATION_SUBNET_EXTRA_BITS
116134
ATTESTATION_SUBNET_PREFIX_BITS: 6
135+
136+
# Deneb
137+
# `2**7` (=128)
138+
MAX_REQUEST_BLOCKS_DENEB: 128
139+
# MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK
140+
MAX_REQUEST_BLOB_SIDECARS: 768
141+
# `2**12` (= 4096 epochs, ~18 days)
142+
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: 4096
143+
# `6`
144+
BLOB_SIDECAR_SUBNET_COUNT: 6
145+
146+
# Whisk
147+
WHISK_EPOCHS_PER_SHUFFLING_PHASE: 4
148+
WHISK_PROPOSER_SELECTION_GAP: 1
149+
150+
# EIP7594
151+
EIP7594_FORK_VERSION: 0x06000001
152+
EIP7594_FORK_EPOCH: 18446744073709551615

config/networks/sepolia/config.yaml

+15-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551615
3131
CAPELLA_FORK_VERSION: 0x90000072
3232
CAPELLA_FORK_EPOCH: 56832
3333

34-
# Sharding
35-
SHARDING_FORK_VERSION: 0x04001020
36-
SHARDING_FORK_EPOCH: 18446744073709551615
34+
# Deneb
35+
DENEB_FORK_VERSION: 0x90000073
36+
DENEB_FORK_EPOCH: 132608
3737

3838
# Time parameters
3939
# ---------------------------------------------------------------
@@ -60,6 +60,8 @@ EJECTION_BALANCE: 16000000000
6060
MIN_PER_EPOCH_CHURN_LIMIT: 4
6161
# 2**16 (= 65,536)
6262
CHURN_LIMIT_QUOTIENT: 65536
63+
# [New in Deneb:EIP7514] 2**3 (= 8)
64+
MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: 8
6365

6466
# Fork choice
6567
# ---------------------------------------------------------------
@@ -100,3 +102,13 @@ ATTESTATION_SUBNET_COUNT: 64
100102
ATTESTATION_SUBNET_EXTRA_BITS: 0
101103
# ceillog2(ATTESTATION_SUBNET_COUNT) + ATTESTATION_SUBNET_EXTRA_BITS
102104
ATTESTATION_SUBNET_PREFIX_BITS: 6
105+
106+
# Deneb
107+
# `2**7` (=128)
108+
MAX_REQUEST_BLOCKS_DENEB: 128
109+
# MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK
110+
MAX_REQUEST_BLOB_SIDECARS: 768
111+
# `2**12` (= 4096 epochs, ~18 days)
112+
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: 4096
113+
# `6`
114+
BLOB_SIDECAR_SUBNET_COUNT: 6

config/presets/gnosis/deneb.yaml

Whitespace-only changes.

config/presets/mainnet/deneb.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Mainnet preset - Deneb
2+
3+
# Misc
4+
# ---------------------------------------------------------------
5+
# `uint64(4096)`
6+
FIELD_ELEMENTS_PER_BLOB: 4096
7+
# `uint64(2**12)` (= 4096)
8+
MAX_BLOB_COMMITMENTS_PER_BLOCK: 4096
9+
# `uint64(6)`
10+
MAX_BLOBS_PER_BLOCK: 6
11+
# `floorlog2(get_generalized_index(BeaconBlockBody, 'blob_kzg_commitments')) + 1 + ceillog2(MAX_BLOB_COMMITMENTS_PER_BLOCK)` = 4 + 1 + 12 = 17
12+
KZG_COMMITMENT_INCLUSION_PROOF_DEPTH: 17

config/presets/minimal/deneb.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Minimal preset - Deneb
2+
3+
# Misc
4+
# ---------------------------------------------------------------
5+
# `uint64(4096)`
6+
FIELD_ELEMENTS_PER_BLOB: 4096
7+
# [customized]
8+
MAX_BLOB_COMMITMENTS_PER_BLOCK: 16
9+
# `uint64(6)`
10+
MAX_BLOBS_PER_BLOCK: 6
11+
# [customized] `floorlog2(get_generalized_index(BeaconBlockBody, 'blob_kzg_commitments')) + 1 + ceillog2(MAX_BLOB_COMMITMENTS_PER_BLOCK)` = 4 + 1 + 4 = 9
12+
KZG_COMMITMENT_INCLUSION_PROOF_DEPTH: 9

lib/utils/config.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ defmodule ConfigUtils do
22
@moduledoc """
33
Utilities for parsing configs and presets.
44
"""
5-
@forks ["phase0", "altair", "bellatrix", "capella"]
5+
@forks ["phase0", "altair", "bellatrix", "capella", "deneb"]
66

77
def load_config_from_file!(path) do
88
path

0 commit comments

Comments
 (0)