Skip to content

Commit ceb1ad3

Browse files
committed
feat(config): update max blobs per block to 6 (#12512)
1 parent 8c142c4 commit ceb1ad3

File tree

8 files changed

+17
-11
lines changed

8 files changed

+17
-11
lines changed

WORKSPACE

+5-5
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ filegroup(
205205
url = "https://github.com/ethereum/EIPs/archive/5480440fe51742ed23342b68cf106cefd427e39d.tar.gz",
206206
)
207207

208-
consensus_spec_version = "v1.4.0-alpha.1"
208+
consensus_spec_version = "v1.4.0-alpha.2"
209209

210210
bls_test_version = "v0.1.1"
211211

@@ -221,7 +221,7 @@ filegroup(
221221
visibility = ["//visibility:public"],
222222
)
223223
""",
224-
sha256 = "1118a663be4a00ba00f0635eb20287157f2b2f993aed64335bfbcd04af424c2b",
224+
sha256 = "bfba887cbe043907adf884cf6d18f2e8a31e34e9245397b84af1f54ed22b706a",
225225
url = "https://github.com/ethereum/consensus-spec-tests/releases/download/%s/general.tar.gz" % consensus_spec_version,
226226
)
227227

@@ -237,7 +237,7 @@ filegroup(
237237
visibility = ["//visibility:public"],
238238
)
239239
""",
240-
sha256 = "acde6e10940d14f22277eda5b55b65a24623ac88e4c7a2e34134a6069f5eea82",
240+
sha256 = "9ff77bef0ca1e39bcee2769075c89f0f91fb8f89ad38a1b3e0c31cf6732650ad",
241241
url = "https://github.com/ethereum/consensus-spec-tests/releases/download/%s/minimal.tar.gz" % consensus_spec_version,
242242
)
243243

@@ -253,7 +253,7 @@ filegroup(
253253
visibility = ["//visibility:public"],
254254
)
255255
""",
256-
sha256 = "49c022f3a3478cea849ba8f877a9f7e4c1ded549edddc09993550bbc5bb192e1",
256+
sha256 = "fbcc3c9898110c675e5de9c27cb667ad7cadf930db7ebb5c6bba15d7be95bf8a",
257257
url = "https://github.com/ethereum/consensus-spec-tests/releases/download/%s/mainnet.tar.gz" % consensus_spec_version,
258258
)
259259

@@ -268,7 +268,7 @@ filegroup(
268268
visibility = ["//visibility:public"],
269269
)
270270
""",
271-
sha256 = "c3e246ff01f6b7b9e9e41939954a6ff89dfca7297415f88781809165fa83267c",
271+
sha256 = "9fff1bcdd0e5857797197800db091c3675b2c11b54f704fe4de1ba683bed7ba5",
272272
strip_prefix = "consensus-specs-" + consensus_spec_version[1:],
273273
url = "https://github.com/ethereum/consensus-specs/archive/refs/tags/%s.tar.gz" % consensus_spec_version,
274274
)

beacon-chain/db/kv/blob_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ func TestStore_verifySideCars(t *testing.T) {
232232
error string
233233
}{
234234
{name: "empty", scs: []*ethpb.BlobSidecar{}, error: "nil or empty blob sidecars"},
235-
{name: "too many sidecars", scs: generateBlobSidecars(t, fieldparams.MaxBlobsPerBlock+1), error: "too many sidecars: 5 > 4"},
235+
{name: "too many sidecars", scs: generateBlobSidecars(t, fieldparams.MaxBlobsPerBlock+1), error: "too many sidecars: 7 > 6"},
236236
{name: "invalid slot", scs: []*ethpb.BlobSidecar{{Slot: 1}, {Slot: 2}}, error: "sidecar slot mismatch: 2 != 1"},
237237
{name: "invalid proposer index", scs: []*ethpb.BlobSidecar{{ProposerIndex: 1}, {ProposerIndex: 2}}, error: "sidecar proposer index mismatch: 2 != 1"},
238238
{name: "invalid root", scs: []*ethpb.BlobSidecar{{BlockRoot: []byte{1}}, {BlockRoot: []byte{2}}}, error: "sidecar root mismatch: 02 != 01"},

beacon-chain/rpc/prysm/v1alpha1/validator/proposer_test.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ func TestProposer_ProposeBlock_OK(t *testing.T) {
721721
},
722722
{
723723
name: "deneb block has too many blobs",
724-
err: "Too many blobs in block: 5",
724+
err: "Too many blobs in block: 7",
725725
block: func(parent [32]byte) *ethpb.GenericSignedBeaconBlock {
726726
blockToPropose := util.NewBeaconBlockDeneb()
727727
blockToPropose.Block.Slot = 5
@@ -734,6 +734,8 @@ func TestProposer_ProposeBlock_OK(t *testing.T) {
734734
{Message: &ethpb.BlobSidecar{Index: 2, Slot: 5, BlockParentRoot: parent[:]}},
735735
{Message: &ethpb.BlobSidecar{Index: 3, Slot: 5, BlockParentRoot: parent[:]}},
736736
{Message: &ethpb.BlobSidecar{Index: 4, Slot: 5, BlockParentRoot: parent[:]}},
737+
{Message: &ethpb.BlobSidecar{Index: 5, Slot: 5, BlockParentRoot: parent[:]}},
738+
{Message: &ethpb.BlobSidecar{Index: 6, Slot: 5, BlockParentRoot: parent[:]}},
737739
},
738740
}}
739741
return &ethpb.GenericSignedBeaconBlock{Block: blk}

config/fieldparams/mainnet.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const (
2626
SyncCommitteeAggregationBytesLength = 16 // SyncCommitteeAggregationBytesLength defines the length of sync committee aggregate bytes.
2727
SyncAggregateSyncCommitteeBytesLength = 64 // SyncAggregateSyncCommitteeBytesLength defines the length of sync committee bytes in a sync aggregate.
2828
MaxWithdrawalsPerPayload = 16 // MaxWithdrawalsPerPayloadLength defines the maximum number of withdrawals that can be included in a payload.
29-
MaxBlobsPerBlock = 4 // MaxBlobsPerBlock defines the maximum number of blobs with respect to consensus rule can be included in a block.
29+
MaxBlobsPerBlock = 6 // MaxBlobsPerBlock defines the maximum number of blobs with respect to consensus rule can be included in a block.
3030
MaxBlobCommitmentsPerBlock = 4096 // MaxBlobCommitmentsPerBlock defines the theoretical limit of blobs can be included in a block.
3131
BlobLength = 131072 // BlobLength defines the byte length of a blob.
3232
)

config/fieldparams/minimal.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const (
2626
SyncCommitteeAggregationBytesLength = 1 // SyncCommitteeAggregationBytesLength defines the sync committee aggregate bytes.
2727
SyncAggregateSyncCommitteeBytesLength = 4 // SyncAggregateSyncCommitteeBytesLength defines the length of sync committee bytes in a sync aggregate.
2828
MaxWithdrawalsPerPayload = 4 // MaxWithdrawalsPerPayloadLength defines the maximum number of withdrawals that can be included in a payload.
29-
MaxBlobsPerBlock = 4 // MaxBlobsPerBlock defines the maximum number of blobs with respect to consensus rule can be included in a block.
29+
MaxBlobsPerBlock = 6 // MaxBlobsPerBlock defines the maximum number of blobs with respect to consensus rule can be included in a block.
3030
MaxBlobCommitmentsPerBlock = 16 // MaxBlobCommitmentsPerBlock defines the theoretical limit of blobs can be included in a block.
3131
BlobLength = 4 // BlobLength defines the byte length of a blob.
3232
)

config/params/loader_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import (
2121
// Variables defined in the placeholderFields will not be tested in `TestLoadConfigFile`.
2222
// These are variables that we don't use in Prysm. (i.e. future hardfork, light client... etc)
2323
var placeholderFields = []string{"UPDATE_TIMEOUT", "ATTESTATION_SUBNET_EXTRA_BITS", "RESP_TIMEOUT", "MAX_REQUEST_BLOCKS", "EPOCHS_PER_SUBNET_SUBSCRIPTION",
24-
"EIP6110_FORK_EPOCH", "MESSAGE_DOMAIN_INVALID_SNAPPY", "MIN_EPOCHS_FOR_BLOCK_REQUESTS", "MAXIMUM_GOSSIP_CLOCK_DISPARITY",
25-
"MESSAGE_DOMAIN_VALID_SNAPPY", "GOSSIP_MAX_SIZE", "SUBNETS_PER_NODE", "ATTESTATION_SUBNET_COUNT",
24+
"EIP6110_FORK_EPOCH", "MESSAGE_DOMAIN_INVALID_SNAPPY", "MIN_EPOCHS_FOR_BLOCK_REQUESTS", "MAXIMUM_GOSSIP_CLOCK_DISPARITY", "MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS",
25+
"MESSAGE_DOMAIN_VALID_SNAPPY", "GOSSIP_MAX_SIZE", "SUBNETS_PER_NODE", "ATTESTATION_SUBNET_COUNT", "MAX_REQUEST_BLOCKS_DENEB", "MAX_REQUEST_BLOB_SIDECARS",
2626
"MAX_CHUNK_SIZE", "ATTESTATION_PROPAGATION_SLOT_RANGE", "ATTESTATION_SUBNET_PREFIX_BITS", "EIP6110_FORK_VERSION", "TTFB_TIMEOUT"}
2727

2828
func assertEqualConfigs(t *testing.T, name string, fields []string, expected, actual *params.BeaconChainConfig) {

config/params/mainnet_config.go

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ var mainnetNetworkConfig = &NetworkConfig{
4545
MinimumPeersInSubnetSearch: 20,
4646
ContractDeploymentBlock: 11184524, // Note: contract was deployed in block 11052984 but no transactions were sent until 11184524.
4747
MinEpochsForBlobsSidecarsRequest: 4096,
48+
MaxRequestBlobSidecars: 768,
49+
MaxRequestBlocksDeneb: 128,
4850
BootstrapNodes: []string{
4951
// Teku team's bootnode
5052
"enr:-KG4QOtcP9X1FbIMOe17QNMKqDxCpm14jcX5tiOE4_TyMrFqbmhPZHK_ZPG2Gxb1GE2xdtodOfx9-cgvNtxnRyHEmC0ghGV0aDKQ9aX9QgAAAAD__________4JpZIJ2NIJpcIQDE8KdiXNlY3AyNTZrMaEDhpehBDbZjM_L9ek699Y7vhUJ-eAdMyQW_Fil522Y0fODdGNwgiMog3VkcIIjKA",

config/params/network_config.go

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ type NetworkConfig struct {
2323
MessageDomainInvalidSnappy [4]byte `yaml:"MESSAGE_DOMAIN_INVALID_SNAPPY"` // MessageDomainInvalidSnappy is the 4-byte domain for gossip message-id isolation of invalid snappy messages.
2424
MessageDomainValidSnappy [4]byte `yaml:"MESSAGE_DOMAIN_VALID_SNAPPY"` // MessageDomainValidSnappy is the 4-byte domain for gossip message-id isolation of valid snappy messages.
2525
MinEpochsForBlobsSidecarsRequest primitives.Epoch `yaml:"MIN_EPOCHS_FOR_BLOBS_SIDECARS_REQUEST"` // MinEpochsForBlobsSidecarsRequest is the minimum number of epochs the node will keep the blobs for.
26+
MaxRequestBlobSidecars uint64 `yaml:"MAX_REQUEST_BLOB_SIDECARS"` // MaxRequestBlobSidecars is the maximum number of blobs to request in a single request.
27+
MaxRequestBlocksDeneb uint64 `yaml:"MAX_REQUEST_BLOCKS_DENEB"` // MaxRequestBlocksDeneb is the maximum number of blocks in a single request after the deneb epoch.
2628

2729
// DiscoveryV5 Config
2830
ETH2Key string // ETH2Key is the ENR key of the Ethereum consensus object in an enr.

0 commit comments

Comments
 (0)