From 2809a84b627eac562b1139275ccb799f52ed2f6f Mon Sep 17 00:00:00 2001 From: realbigsean Date: Wed, 7 Jun 2023 19:45:52 -0400 Subject: [PATCH] add max blob commitments per block --- consensus/types/src/beacon_block_body.rs | 3 ++- consensus/types/src/eth_spec.rs | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/consensus/types/src/beacon_block_body.rs b/consensus/types/src/beacon_block_body.rs index f2174467b2..b888217155 100644 --- a/consensus/types/src/beacon_block_body.rs +++ b/consensus/types/src/beacon_block_body.rs @@ -9,7 +9,8 @@ use superstruct::superstruct; use test_random_derive::TestRandom; use tree_hash_derive::TreeHash; -pub type KzgCommitments = VariableList::MaxBlobsPerBlock>; +pub type KzgCommitments = + VariableList::MaxBlobCommitmentsPerBlock>; /// The body of a `BeaconChain` block, containing operations. /// diff --git a/consensus/types/src/eth_spec.rs b/consensus/types/src/eth_spec.rs index 6a35893cef..d2b295c963 100644 --- a/consensus/types/src/eth_spec.rs +++ b/consensus/types/src/eth_spec.rs @@ -106,6 +106,7 @@ pub trait EthSpec: * New in Deneb */ type MaxBlobsPerBlock: Unsigned + Clone + Sync + Send + Debug + PartialEq + Unpin; + type MaxBlobCommitmentsPerBlock: Unsigned + Clone + Sync + Send + Debug + PartialEq + Unpin; type FieldElementsPerBlob: Unsigned + Clone + Sync + Send + Debug + PartialEq; type BytesPerFieldElement: Unsigned + Clone + Sync + Send + Debug + PartialEq; /* @@ -300,6 +301,7 @@ impl EthSpec for MainnetEthSpec { type MinGasLimit = U5000; type MaxExtraDataBytes = U32; type MaxBlobsPerBlock = U4; + type MaxBlobCommitmentsPerBlock = U4096; type BytesPerFieldElement = U32; type FieldElementsPerBlob = U4096; type BytesPerBlob = U131072; @@ -335,6 +337,7 @@ impl EthSpec for MinimalEthSpec { type MaxWithdrawalsPerPayload = U4; type FieldElementsPerBlob = U4; //FIXME(sean) this is spec'd out currently but will likely change type BytesPerBlob = U128; //FIXME(sean) this is spec'd out currently but will likely change + type MaxBlobCommitmentsPerBlock = U16; params_from_eth_spec!(MainnetEthSpec { JustificationBitsLength, @@ -404,6 +407,7 @@ impl EthSpec for GnosisEthSpec { type MaxBlsToExecutionChanges = U16; type MaxWithdrawalsPerPayload = U8; type MaxBlobsPerBlock = U4; + type MaxBlobCommitmentsPerBlock = U4096; type FieldElementsPerBlob = U4096; type BytesPerFieldElement = U32; type BytesPerBlob = U131072;