Electra `BlobSidecar` for EIP-7688

This commit is contained in:
Etan Kissling 2024-07-26 04:03:42 +02:00
parent 48c3761530
commit 6e80561080
No known key found for this signature in database
GPG Key ID: B21DA824C5A3D03D
13 changed files with 143 additions and 35 deletions

View File

@ -562,7 +562,9 @@ proc new*(T: type BeaconChainDB,
var blobs: array[BlobFork, KvStoreRef]
if cfg.DENEB_FORK_EPOCH != FAR_FUTURE_EPOCH:
blobs[BlobFork.Deneb] = kvStore db.openKvStore("deneb_blobs").expectDb()
static: doAssert BlobFork.high == BlobFork.Deneb
if cfg.ELECTRA_FORK_EPOCH != FAR_FUTURE_EPOCH:
blobs[BlobFork.Electra] = kvStore db.openKvStore("electra_blobs").expectDb()
static: doAssert BlobFork.high == BlobFork.Electra
# Versions prior to 1.4.0 (altair) stored validators in `immutable_validators`
# which stores validator keys in compressed format - this is

View File

@ -399,7 +399,9 @@ template withForkyBlckAndBlobs(
# > type mismatch: got 'BlobFork' for 'blobFork`gensym15'
# but expected 'BlobSidecars'
# https://github.com/nim-lang/Nim/issues/23893
when blobFork == BlobFork.Deneb:
when blobFork == BlobFork.Electra:
var fBlobs: electra.BlobSidecars
elif blobFork == BlobFork.Deneb:
var fBlobs: deneb.BlobSidecars
for blob in blobs.get:
doAssert blob.kind == blobFork,
@ -407,7 +409,9 @@ template withForkyBlckAndBlobs(
fBlobs.add blob.forky(blobFork)
Opt.some fBlobs
else:
when blobFork == BlobFork.Deneb:
when blobFork == BlobFork.Electra:
Opt.none electra.BlobSidecars
elif blobFork == BlobFork.Deneb:
Opt.none deneb.BlobSidecars
else:
doAssert blobs.isNone, "Blobs are not supported before Deneb"

View File

@ -140,6 +140,11 @@ proc installConfigApiHandlers*(router: var RestRouter, node: BeaconNode) =
KZG_COMMITMENT_INCLUSION_PROOF_DEPTH:
Base10.toString(uint64(KZG_COMMITMENT_INCLUSION_PROOF_DEPTH)),
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/electra/p2p-interface.md#custom-types
KZG_COMMITMENT_INCLUSION_PROOF_DEPTH_ELECTRA:
Base10.toString(uint64(
KZG_COMMITMENT_INCLUSION_PROOF_DEPTH_ELECTRA)),
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/configs/mainnet.yaml
PRESET_BASE:
cfg.PRESET_BASE,

View File

@ -51,6 +51,10 @@ type
Blob* = array[
BYTES_PER_FIELD_ELEMENT * deneb_preset.FIELD_ELEMENTS_PER_BLOB, byte]
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/deneb/p2p-interface.md#custom-types
KzgCommitmentInclusionProof* =
array[KZG_COMMITMENT_INCLUSION_PROOF_DEPTH, Eth2Digest]
# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/deneb/p2p-interface.md#blobsidecar
BlobSidecar* = object
index*: BlobIndex
@ -60,8 +64,7 @@ type
kzg_proof*: KzgProof
## Allows for quick verification of kzg_commitment
signed_block_header*: SignedBeaconBlockHeader
kzg_commitment_inclusion_proof*:
array[KZG_COMMITMENT_INCLUSION_PROOF_DEPTH, Eth2Digest]
kzg_commitment_inclusion_proof*: KzgCommitmentInclusionProof
BlobSidecars* = seq[ref BlobSidecar]
# https://github.com/ethereum/beacon-APIs/blob/4882aa0803b622b75bab286b285599d70b7a2429/apis/eventstream/index.yaml#L138-L142

View File

@ -16,7 +16,8 @@
{.experimental: "notnil".}
import
std/typetraits,
std/[sequtils, strutils, typetraits],
stew/bitops2,
chronicles,
json_serialization,
ssz_serialization/[merkleization, proofs],
@ -34,7 +35,8 @@ from ./bellatrix import BloomLogs, ExecutionAddress, Transaction
from ./capella import
ExecutionBranch, HistoricalSummary, SignedBLSToExecutionChangeList,
Withdrawal, EXECUTION_PAYLOAD_GINDEX
from ./deneb import Blobs, BlobsBundle, KzgCommitments, KzgProofs
from ./deneb import
Blob, BlobIndex, Blobs, BlobsBundle, KzgCommitments, KzgProofs, shortLog
export json_serialization, stable, kzg4844
@ -90,6 +92,22 @@ type
attestation_1*: TrustedIndexedAttestation # Modified in Electra:EIP7549]
attestation_2*: TrustedIndexedAttestation # Modified in Electra:EIP7549]
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/electra/p2p-interface.md#custom-types
KzgCommitmentInclusionProof* =
array[KZG_COMMITMENT_INCLUSION_PROOF_DEPTH_ELECTRA, Eth2Digest]
# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/deneb/p2p-interface.md#blobsidecar
BlobSidecar* = object
index*: BlobIndex
## Index of blob in block
blob*: Blob
kzg_commitment*: KzgCommitment
kzg_proof*: KzgProof
## Allows for quick verification of kzg_commitment
signed_block_header*: SignedBeaconBlockHeader
kzg_commitment_inclusion_proof*: KzgCommitmentInclusionProof
BlobSidecars* = seq[ref BlobSidecar]
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/electra/beacon-chain.md#executionpayload
ExecutionPayload* {.sszProfile: StableExecutionPayload.} = object
# Execution block header fields
@ -628,6 +646,22 @@ func shortLog*(v: SomeBeaconBlock): auto =
blob_kzg_commitments_len: v.body.blob_kzg_commitments.len(),
)
func shortLog*(v: BlobSidecar): auto =
(
index: v.index,
blob: shortLog(v.blob),
bloblen: v.blob.len(),
block_header: shortLog(v.signed_block_header.message),
kzg_commitment: shortLog(v.kzg_commitment),
kzg_proof: shortLog(v.kzg_proof),
)
func shortLog*(v: seq[BlobSidecar]): auto =
"[" & v.mapIt(shortLog(it)).join(", ") & "]"
func shortLog*(v: seq[ref BlobSidecar]): auto =
"[" & v.mapIt(shortLog(it[])).join(", ") & "]"
func shortLog*(v: SomeSignedBeaconBlock): auto =
(
blck: shortLog(v.message),
@ -654,6 +688,31 @@ func shortLog*(v: ExecutionPayload): auto =
excess_blob_gas: $(v.excess_blob_gas)
)
func kzg_commitment_inclusion_proof_gindex*(
index: BlobIndex): GeneralizedIndex =
# This index is rooted in `BeaconBlockBody`.
# The first member (`randao_reveal`) is 128, subsequent members +1 each.
# If there are ever more than 64 members in `BeaconBlockBody`, indices change!
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/ssz/merkle-proofs.md
const
# blob_kzg_commitments
BLOB_KZG_COMMITMENTS_GINDEX =
139.GeneralizedIndex
# List + 0 = items, + 1 = len
BLOB_KZG_COMMITMENTS_BASE_GINDEX =
(BLOB_KZG_COMMITMENTS_GINDEX shl 1) + 0
# List depth
BLOB_KZG_COMMITMENTS_PROOF_DEPTH =
log2trunc(nextPow2(KzgCommitments.maxLen.uint64))
# First item
BLOB_KZG_COMMITMENTS_FIRST_GINDEX =
(BLOB_KZG_COMMITMENTS_BASE_GINDEX shl BLOB_KZG_COMMITMENTS_PROOF_DEPTH)
static: doAssert(
log2trunc(BLOB_KZG_COMMITMENTS_FIRST_GINDEX) ==
KZG_COMMITMENT_INCLUSION_PROOF_DEPTH_ELECTRA)
BLOB_KZG_COMMITMENTS_FIRST_GINDEX + index
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/electra/light-client/fork.md#normalize_merkle_branch
func normalize_merkle_branch*[N](
branch: array[N, Eth2Digest],

View File

@ -248,6 +248,7 @@ RestJson.useDefaultSerializationFor(
electra.BeaconBlock,
electra.BeaconState,
electra.BeaconBlockBody,
electra.BlobSidecar,
electra.BlockContents,
electra.ExecutionPayload,
electra.ExecutionPayloadHeader,

View File

@ -275,16 +275,21 @@ type
ForkyTrustedSignedBeaconBlock
BlobFork* {.pure.} = enum
Deneb
Deneb,
Electra
ForkyBlobSidecar* =
deneb.BlobSidecar
deneb.BlobSidecar |
electra.BlobSidecar
ForkyBlobSidecars* =
deneb.BlobSidecars
deneb.BlobSidecars |
electra.BlobSidecars
ForkedBlobSidecar* = object
case kind*: BlobFork
of BlobFork.Electra:
electraData*: ref electra.BlobSidecar
of BlobFork.Deneb:
denebData*: ref deneb.BlobSidecar
@ -834,39 +839,58 @@ static:
template kind*(x: typedesc[deneb.BlobSidecar]): BlobFork =
BlobFork.Deneb
template kind*(x: typedesc[electra.BlobSidecar]): BlobFork =
BlobFork.Electra
template kzg_commitment_inclusion_proof_gindex*(
kind: static BlobFork, index: BlobIndex): GeneralizedIndex =
when kind == BlobFork.Deneb:
when kind == BlobFork.Electra:
electra.kzg_commitment_inclusion_proof_gindex(index)
elif kind == BlobFork.Deneb:
deneb.kzg_commitment_inclusion_proof_gindex(index)
else:
{.error: "kzg_commitment_inclusion_proof_gindex does not support " & $kind.}
template BlobSidecar*(kind: static BlobFork): auto =
when kind == BlobFork.Deneb:
when kind == BlobFork.Electra:
typedesc[electra.BlobSidecar]
elif kind == BlobFork.Deneb:
typedesc[deneb.BlobSidecar]
else:
{.error: "BlobSidecar does not support " & $kind.}
template BlobSidecars*(kind: static BlobFork): auto =
when kind == BlobFork.Deneb:
when kind == BlobFork.Electra:
typedesc[electra.BlobSidecars]
elif kind == BlobFork.Deneb:
typedesc[deneb.BlobSidecars]
else:
{.error: "BlobSidecars does not support " & $kind.}
template withAll*(x: typedesc[BlobFork], body: untyped): untyped =
static: doAssert BlobFork.high == BlobFork.Deneb
static: doAssert BlobFork.high == BlobFork.Electra
block:
const blobFork {.inject, used.} = BlobFork.Electra
body
block:
const blobFork {.inject, used.} = BlobFork.Deneb
body
template withBlobFork*(x: BlobFork, body: untyped): untyped =
case x
of BlobFork.Electra:
const blobFork {.inject, used.} = BlobFork.Electra
body
of BlobFork.Deneb:
const blobFork {.inject, used.} = BlobFork.Deneb
body
template withForkyBlob*(x: ForkedBlobSidecar, body: untyped): untyped =
case x.kind
of BlobFork.Electra:
const blobFork {.inject, used.} = BlobFork.Electra
template forkyBlob: untyped {.inject, used.} = x.electraData
body
of BlobFork.Deneb:
const blobFork {.inject, used.} = BlobFork.Deneb
template forkyBlob: untyped {.inject, used.} = x.denebData
@ -876,13 +900,17 @@ func init*(
x: typedesc[ForkedBlobSidecar],
forkyData: ref ForkyBlobSidecar): ForkedBlobSidecar =
const kind = typeof(forkyData[]).kind
when kind == BlobFork.Deneb:
when kind == BlobFork.Electra:
ForkedBlobSidecar(kind: kind, electraData: forkyData)
elif kind == BlobFork.Deneb:
ForkedBlobSidecar(kind: kind, denebData: forkyData)
else:
{.error: "ForkedBlobSidecar.init does not support " & $kind.}
template forky*(x: ForkedBlobSidecar, kind: static BlobFork): untyped =
when kind == BlobFork.Deneb:
when kind == BlobFork.Electra:
x.electraData
elif kind == BlobFork.Deneb:
x.denebData
else:
{.error: "ForkedBlobSidecar.forky does not support " & $kind.}
@ -890,11 +918,15 @@ template forky*(x: ForkedBlobSidecar, kind: static BlobFork): untyped =
func shortLog*[T: ForkedBlobSidecar](x: T): auto =
type ResultType = object
case kind: BlobFork
of BlobFork.Electra:
electraData: typeof(x.electraData.shortLog())
of BlobFork.Deneb:
denebData: typeof(x.denebData.shortLog())
let xKind = x.kind # https://github.com/nim-lang/Nim/issues/23762
case xKind
of BlobFork.Electra:
ResultType(kind: xKind, electraData: x.electraData.shortLog())
of BlobFork.Deneb:
ResultType(kind: xKind, denebData: x.denebData.shortLog())
@ -1409,8 +1441,10 @@ func forkVersion*(cfg: RuntimeConfig, consensusFork: ConsensusFork): Version =
of ConsensusFork.Electra: cfg.ELECTRA_FORK_VERSION
func blobForkAtConsensusFork*(consensusFork: ConsensusFork): Opt[BlobFork] =
static: doAssert BlobFork.high == BlobFork.Deneb
if consensusFork >= ConsensusFork.Deneb:
static: doAssert BlobFork.high == BlobFork.Electra
if consensusFork >= ConsensusFork.Electra:
Opt.some BlobFork.Electra
elif consensusFork >= ConsensusFork.Deneb:
Opt.some BlobFork.Deneb
else:
Opt.none BlobFork

View File

@ -15,21 +15,6 @@ import
from ../consensus_object_pools/block_pools_types import VerifierError
export block_pools_types.VerifierError
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/electra/light-client/sync-protocol.md#is_valid_normalized_merkle_branch
func is_valid_normalized_merkle_branch[N](
leaf: Eth2Digest,
branch: array[N, Eth2Digest],
gindex: static GeneralizedIndex,
root: Eth2Digest): bool =
const
depth = log2trunc(gindex)
index = get_subtree_index(gindex)
num_extra = branch.len - depth
for i in 0 ..< num_extra:
if not branch[i].isZero:
return false
is_valid_merkle_branch(leaf, branch[num_extra .. ^1], depth, index, root)
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/altair/light-client/sync-protocol.md#initialize_light_client_store
func initialize_light_client_store*(
trusted_block_root: Eth2Digest,

View File

@ -53,3 +53,8 @@ const
# ---------------------------------------------------------------
# 2**3 ( = 8) pending withdrawals
MAX_PENDING_PARTIALS_PER_WITHDRAWALS_SWEEP* = 8
# Misc
# ---------------------------------------------------------------
# `floorlog2(get_generalized_index(BeaconBlockBody, 'blob_kzg_commitments')) + 1 + ceillog2(MAX_BLOB_COMMITMENTS_PER_BLOCK)` = 7 + 1 + 12 = 20
KZG_COMMITMENT_INCLUSION_PROOF_DEPTH_ELECTRA* = 20

View File

@ -53,3 +53,8 @@ const
# ---------------------------------------------------------------
# 2**3 ( = 8) pending withdrawals
MAX_PENDING_PARTIALS_PER_WITHDRAWALS_SWEEP* = 8
# Misc
# ---------------------------------------------------------------
# `floorlog2(get_generalized_index(BeaconBlockBody, 'blob_kzg_commitments')) + 1 + ceillog2(MAX_BLOB_COMMITMENTS_PER_BLOCK)` = 7 + 1 + 12 = 20
KZG_COMMITMENT_INCLUSION_PROOF_DEPTH_ELECTRA* = 20

View File

@ -53,3 +53,8 @@ const
# ---------------------------------------------------------------
# 2**0 ( = 1) pending withdrawals
MAX_PENDING_PARTIALS_PER_WITHDRAWALS_SWEEP* = 1
# Misc
# ---------------------------------------------------------------
# `floorlog2(get_generalized_index(BeaconBlockBody, 'blob_kzg_commitments')) + 1 + ceillog2(MAX_BLOB_COMMITMENTS_PER_BLOCK)` = 7 + 1 + 4 = 12
KZG_COMMITMENT_INCLUSION_PROOF_DEPTH_ELECTRA* = 12

View File

@ -4012,7 +4012,7 @@
"response": {
"status": {"operator": "equals", "value": "200"},
"headers": [{"key": "Content-Type", "value": "application/json", "operator": "equals"}],
"body": [{"operator": "jstructcmps", "start": ["data"], "value": {"MAX_COMMITTEES_PER_SLOT":"","TARGET_COMMITTEE_SIZE":"","MAX_VALIDATORS_PER_COMMITTEE":"","SHUFFLE_ROUND_COUNT":"","HYSTERESIS_QUOTIENT":"","HYSTERESIS_DOWNWARD_MULTIPLIER":"","HYSTERESIS_UPWARD_MULTIPLIER":"","MIN_DEPOSIT_AMOUNT":"","MAX_EFFECTIVE_BALANCE":"","EFFECTIVE_BALANCE_INCREMENT":"","MIN_ATTESTATION_INCLUSION_DELAY":"","SLOTS_PER_EPOCH":"","MIN_SEED_LOOKAHEAD":"","MAX_SEED_LOOKAHEAD":"","EPOCHS_PER_ETH1_VOTING_PERIOD":"","SLOTS_PER_HISTORICAL_ROOT":"","MIN_EPOCHS_TO_INACTIVITY_PENALTY":"","EPOCHS_PER_HISTORICAL_VECTOR":"","EPOCHS_PER_SLASHINGS_VECTOR":"","HISTORICAL_ROOTS_LIMIT":"","VALIDATOR_REGISTRY_LIMIT":"","BASE_REWARD_FACTOR":"","WHISTLEBLOWER_REWARD_QUOTIENT":"","PROPOSER_REWARD_QUOTIENT":"","INACTIVITY_PENALTY_QUOTIENT":"","MIN_SLASHING_PENALTY_QUOTIENT":"","PROPORTIONAL_SLASHING_MULTIPLIER":"","MAX_PROPOSER_SLASHINGS":"","MAX_ATTESTER_SLASHINGS":"","MAX_ATTESTATIONS":"","MAX_DEPOSITS":"","MAX_VOLUNTARY_EXITS":"","INACTIVITY_PENALTY_QUOTIENT_ALTAIR":"","MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR":"","PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR":"","SYNC_COMMITTEE_SIZE":"","EPOCHS_PER_SYNC_COMMITTEE_PERIOD":"","MIN_SYNC_COMMITTEE_PARTICIPANTS":"","UPDATE_TIMEOUT":"","INACTIVITY_PENALTY_QUOTIENT_BELLATRIX":"","MIN_SLASHING_PENALTY_QUOTIENT_BELLATRIX":"","PROPORTIONAL_SLASHING_MULTIPLIER_BELLATRIX":"","MAX_BYTES_PER_TRANSACTION":"","MAX_TRANSACTIONS_PER_PAYLOAD":"","BYTES_PER_LOGS_BLOOM":"","MAX_EXTRA_DATA_BYTES":"","MAX_BLS_TO_EXECUTION_CHANGES":"","MAX_WITHDRAWALS_PER_PAYLOAD":"","MAX_VALIDATORS_PER_WITHDRAWALS_SWEEP":"","PRESET_BASE":"","CONFIG_NAME":"","TERMINAL_TOTAL_DIFFICULTY":"","TERMINAL_BLOCK_HASH":"","TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH":"","MIN_GENESIS_ACTIVE_VALIDATOR_COUNT":"","MIN_GENESIS_TIME":"","GENESIS_FORK_VERSION":"","GENESIS_DELAY":"","ALTAIR_FORK_VERSION":"","ALTAIR_FORK_EPOCH":"","BELLATRIX_FORK_VERSION":"","BELLATRIX_FORK_EPOCH":"","CAPELLA_FORK_VERSION":"","CAPELLA_FORK_EPOCH":"","DENEB_FORK_VERSION":"","DENEB_FORK_EPOCH":"","SECONDS_PER_SLOT":"","SECONDS_PER_ETH1_BLOCK":"","MIN_VALIDATOR_WITHDRAWABILITY_DELAY":"","FIELD_ELEMENTS_PER_BLOB":"","MAX_BLOB_COMMITMENTS_PER_BLOCK":"","MAX_BLOBS_PER_BLOCK":"","KZG_COMMITMENT_INCLUSION_PROOF_DEPTH":"","SHARD_COMMITTEE_PERIOD":"","ETH1_FOLLOW_DISTANCE":"","INACTIVITY_SCORE_BIAS":"","INACTIVITY_SCORE_RECOVERY_RATE":"","EJECTION_BALANCE":"","MIN_PER_EPOCH_CHURN_LIMIT":"","CHURN_LIMIT_QUOTIENT":"","MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT":"","PROPOSER_SCORE_BOOST":"","REORG_HEAD_WEIGHT_THRESHOLD":"","REORG_PARENT_WEIGHT_THRESHOLD":"","REORG_MAX_EPOCHS_SINCE_FINALIZATION":"","DEPOSIT_CHAIN_ID":"","DEPOSIT_NETWORK_ID":"","DEPOSIT_CONTRACT_ADDRESS":"","GOSSIP_MAX_SIZE":"","MAX_REQUEST_BLOCKS":"","EPOCHS_PER_SUBNET_SUBSCRIPTION":"","MIN_EPOCHS_FOR_BLOCK_REQUESTS":"","MAX_CHUNK_SIZE":"","TTFB_TIMEOUT":"","RESP_TIMEOUT":"","ATTESTATION_PROPAGATION_SLOT_RANGE":"","MAXIMUM_GOSSIP_CLOCK_DISPARITY":"","MESSAGE_DOMAIN_INVALID_SNAPPY":"","MESSAGE_DOMAIN_VALID_SNAPPY":"","SUBNETS_PER_NODE":"","ATTESTATION_SUBNET_COUNT":"","ATTESTATION_SUBNET_EXTRA_BITS":"","ATTESTATION_SUBNET_PREFIX_BITS":"","MAX_REQUEST_BLOCKS_DENEB":"","MAX_REQUEST_BLOB_SIDECARS":"","MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS":"","BLOB_SIDECAR_SUBNET_COUNT":"","BLS_WITHDRAWAL_PREFIX":"","ETH1_ADDRESS_WITHDRAWAL_PREFIX":"","DOMAIN_BEACON_PROPOSER":"","DOMAIN_BEACON_ATTESTER":"","DOMAIN_RANDAO":"","DOMAIN_DEPOSIT":"","DOMAIN_VOLUNTARY_EXIT":"","DOMAIN_SELECTION_PROOF":"","DOMAIN_AGGREGATE_AND_PROOF":"","TIMELY_SOURCE_FLAG_INDEX":"","TIMELY_TARGET_FLAG_INDEX":"","TIMELY_HEAD_FLAG_INDEX":"","TIMELY_SOURCE_WEIGHT":"","TIMELY_TARGET_WEIGHT":"","TIMELY_HEAD_WEIGHT":"","SYNC_REWARD_WEIGHT":"","PROPOSER_WEIGHT":"","WEIGHT_DENOMINATOR":"","DOMAIN_SYNC_COMMITTEE":"","DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF":"","DOMAIN_CONTRIBUTION_AND_PROOF":"","DOMAIN_BLS_TO_EXECUTION_CHANGE":"","TARGET_AGGREGATORS_PER_COMMITTEE":"","TARGET_AGGREGATORS_PER_SYNC_SUBCOMMITTEE":"","SYNC_COMMITTEE_SUBNET_COUNT":""}}]
"body": [{"operator": "jstructcmps", "start": ["data"], "value": {"MAX_COMMITTEES_PER_SLOT":"","TARGET_COMMITTEE_SIZE":"","MAX_VALIDATORS_PER_COMMITTEE":"","SHUFFLE_ROUND_COUNT":"","HYSTERESIS_QUOTIENT":"","HYSTERESIS_DOWNWARD_MULTIPLIER":"","HYSTERESIS_UPWARD_MULTIPLIER":"","MIN_DEPOSIT_AMOUNT":"","MAX_EFFECTIVE_BALANCE":"","EFFECTIVE_BALANCE_INCREMENT":"","MIN_ATTESTATION_INCLUSION_DELAY":"","SLOTS_PER_EPOCH":"","MIN_SEED_LOOKAHEAD":"","MAX_SEED_LOOKAHEAD":"","EPOCHS_PER_ETH1_VOTING_PERIOD":"","SLOTS_PER_HISTORICAL_ROOT":"","MIN_EPOCHS_TO_INACTIVITY_PENALTY":"","EPOCHS_PER_HISTORICAL_VECTOR":"","EPOCHS_PER_SLASHINGS_VECTOR":"","HISTORICAL_ROOTS_LIMIT":"","VALIDATOR_REGISTRY_LIMIT":"","BASE_REWARD_FACTOR":"","WHISTLEBLOWER_REWARD_QUOTIENT":"","PROPOSER_REWARD_QUOTIENT":"","INACTIVITY_PENALTY_QUOTIENT":"","MIN_SLASHING_PENALTY_QUOTIENT":"","PROPORTIONAL_SLASHING_MULTIPLIER":"","MAX_PROPOSER_SLASHINGS":"","MAX_ATTESTER_SLASHINGS":"","MAX_ATTESTATIONS":"","MAX_DEPOSITS":"","MAX_VOLUNTARY_EXITS":"","INACTIVITY_PENALTY_QUOTIENT_ALTAIR":"","MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR":"","PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR":"","SYNC_COMMITTEE_SIZE":"","EPOCHS_PER_SYNC_COMMITTEE_PERIOD":"","MIN_SYNC_COMMITTEE_PARTICIPANTS":"","UPDATE_TIMEOUT":"","INACTIVITY_PENALTY_QUOTIENT_BELLATRIX":"","MIN_SLASHING_PENALTY_QUOTIENT_BELLATRIX":"","PROPORTIONAL_SLASHING_MULTIPLIER_BELLATRIX":"","MAX_BYTES_PER_TRANSACTION":"","MAX_TRANSACTIONS_PER_PAYLOAD":"","BYTES_PER_LOGS_BLOOM":"","MAX_EXTRA_DATA_BYTES":"","MAX_BLS_TO_EXECUTION_CHANGES":"","MAX_WITHDRAWALS_PER_PAYLOAD":"","MAX_VALIDATORS_PER_WITHDRAWALS_SWEEP":"","PRESET_BASE":"","CONFIG_NAME":"","TERMINAL_TOTAL_DIFFICULTY":"","TERMINAL_BLOCK_HASH":"","TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH":"","MIN_GENESIS_ACTIVE_VALIDATOR_COUNT":"","MIN_GENESIS_TIME":"","GENESIS_FORK_VERSION":"","GENESIS_DELAY":"","ALTAIR_FORK_VERSION":"","ALTAIR_FORK_EPOCH":"","BELLATRIX_FORK_VERSION":"","BELLATRIX_FORK_EPOCH":"","CAPELLA_FORK_VERSION":"","CAPELLA_FORK_EPOCH":"","DENEB_FORK_VERSION":"","DENEB_FORK_EPOCH":"","SECONDS_PER_SLOT":"","SECONDS_PER_ETH1_BLOCK":"","MIN_VALIDATOR_WITHDRAWABILITY_DELAY":"","FIELD_ELEMENTS_PER_BLOB":"","MAX_BLOB_COMMITMENTS_PER_BLOCK":"","MAX_BLOBS_PER_BLOCK":"","KZG_COMMITMENT_INCLUSION_PROOF_DEPTH":"","KZG_COMMITMENT_INCLUSION_PROOF_DEPTH_ELECTRA":"","SHARD_COMMITTEE_PERIOD":"","ETH1_FOLLOW_DISTANCE":"","INACTIVITY_SCORE_BIAS":"","INACTIVITY_SCORE_RECOVERY_RATE":"","EJECTION_BALANCE":"","MIN_PER_EPOCH_CHURN_LIMIT":"","CHURN_LIMIT_QUOTIENT":"","MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT":"","PROPOSER_SCORE_BOOST":"","REORG_HEAD_WEIGHT_THRESHOLD":"","REORG_PARENT_WEIGHT_THRESHOLD":"","REORG_MAX_EPOCHS_SINCE_FINALIZATION":"","DEPOSIT_CHAIN_ID":"","DEPOSIT_NETWORK_ID":"","DEPOSIT_CONTRACT_ADDRESS":"","GOSSIP_MAX_SIZE":"","MAX_REQUEST_BLOCKS":"","EPOCHS_PER_SUBNET_SUBSCRIPTION":"","MIN_EPOCHS_FOR_BLOCK_REQUESTS":"","MAX_CHUNK_SIZE":"","TTFB_TIMEOUT":"","RESP_TIMEOUT":"","ATTESTATION_PROPAGATION_SLOT_RANGE":"","MAXIMUM_GOSSIP_CLOCK_DISPARITY":"","MESSAGE_DOMAIN_INVALID_SNAPPY":"","MESSAGE_DOMAIN_VALID_SNAPPY":"","SUBNETS_PER_NODE":"","ATTESTATION_SUBNET_COUNT":"","ATTESTATION_SUBNET_EXTRA_BITS":"","ATTESTATION_SUBNET_PREFIX_BITS":"","MAX_REQUEST_BLOCKS_DENEB":"","MAX_REQUEST_BLOB_SIDECARS":"","MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS":"","BLOB_SIDECAR_SUBNET_COUNT":"","BLS_WITHDRAWAL_PREFIX":"","ETH1_ADDRESS_WITHDRAWAL_PREFIX":"","DOMAIN_BEACON_PROPOSER":"","DOMAIN_BEACON_ATTESTER":"","DOMAIN_RANDAO":"","DOMAIN_DEPOSIT":"","DOMAIN_VOLUNTARY_EXIT":"","DOMAIN_SELECTION_PROOF":"","DOMAIN_AGGREGATE_AND_PROOF":"","TIMELY_SOURCE_FLAG_INDEX":"","TIMELY_TARGET_FLAG_INDEX":"","TIMELY_HEAD_FLAG_INDEX":"","TIMELY_SOURCE_WEIGHT":"","TIMELY_TARGET_WEIGHT":"","TIMELY_HEAD_WEIGHT":"","SYNC_REWARD_WEIGHT":"","PROPOSER_WEIGHT":"","WEIGHT_DENOMINATOR":"","DOMAIN_SYNC_COMMITTEE":"","DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF":"","DOMAIN_CONTRIBUTION_AND_PROOF":"","DOMAIN_BLS_TO_EXECUTION_CHANGE":"","TARGET_AGGREGATORS_PER_COMMITTEE":"","TARGET_AGGREGATORS_PER_SYNC_SUBCOMMITTEE":"","SYNC_COMMITTEE_SUBNET_COUNT":""}}]
}
},
{

View File

@ -125,7 +125,7 @@ suite "EF - Electra - SSZ consensus objects " & preset():
of "BeaconBlockHeader": checkSSZ(BeaconBlockHeader, path, hash)
of "BeaconState": checkSSZ(electra.BeaconState, path, hash)
of "BlobIdentifier": checkSSZ(BlobIdentifier, path, hash)
of "BlobSidecar": checkSSZ(deneb.BlobSidecar, path, hash)
of "BlobSidecar": checkSSZ(electra.BlobSidecar, path, hash)
of "BLSToExecutionChange": checkSSZ(BLSToExecutionChange, path, hash)
of "Checkpoint": checkSSZ(Checkpoint, path, hash)
of "ConsolidationRequest": checkSSZ(ConsolidationRequest, path, hash)