Skip to content

Commit

Permalink
Add PeerDAS config change
Browse files Browse the repository at this point in the history
  • Loading branch information
prestonvanloon committed May 3, 2024
1 parent f8556be commit a545543
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion beacon-chain/rpc/eth/config/handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ func TestGetSpec(t *testing.T) {
config.MaxAttesterSlashingsElectra = 88
config.MaxAttestationsElectra = 89
config.MaxWithdrawalRequestsPerPayload = 90
config.MaxCellsInExtendedMatrix = 91

var dbp [4]byte
copy(dbp[:], []byte{'0', '0', '0', '1'})
Expand Down Expand Up @@ -190,7 +191,7 @@ func TestGetSpec(t *testing.T) {
data, ok := resp.Data.(map[string]interface{})
require.Equal(t, true, ok)

assert.Equal(t, 152, len(data))
assert.Equal(t, 153, len(data))
for k, v := range data {
t.Run(k, func(t *testing.T) {
switch k {
Expand Down Expand Up @@ -521,6 +522,8 @@ func TestGetSpec(t *testing.T) {
assert.Equal(t, "89", v)
case "MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD":
assert.Equal(t, "90", v)
case "MAX_CELLS_IN_EXTENDED_MATRIX":
assert.Equal(t, "91", v)
default:
t.Errorf("Incorrect key: %s", k)
}
Expand Down
3 changes: 2 additions & 1 deletion config/params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ type BeaconChainConfig struct {
NodeIdBits uint64 `yaml:"NODE_ID_BITS" spec:"true"` // NodeIdBits defines the bit length of a node id.

// PeerDAS
NumberOfColumns uint64 `yaml:"NUMBER_OF_COLUMNS" spec:"true"` // NumberOfColumns in the extended data matrix.
NumberOfColumns uint64 `yaml:"NUMBER_OF_COLUMNS" spec:"true"` // NumberOfColumns in the extended data matrix.
MaxCellsInExtendedMatrix uint64 `yaml:"MAX_CELLS_IN_EXTENDED_MATRIX" spec:"true"` // MaxCellsInExtendedMatrix is the full data of one-dimensional erasure coding extended blobs (in row major format).
}

// InitializeForkSchedule initializes the schedules forks baked into the config.
Expand Down
3 changes: 2 additions & 1 deletion config/params/mainnet_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ var mainnetBeaconConfig = &BeaconChainConfig{
NodeIdBits: 256,

// PeerDAS
NumberOfColumns: 128,
NumberOfColumns: 128,
MaxCellsInExtendedMatrix: 768,
}

// MainnetTestConfig provides a version of the mainnet config that has a different name
Expand Down

0 comments on commit a545543

Please sign in to comment.