Skip to content

Commit

Permalink
Fix beacon chain config. (#14017)
Browse files Browse the repository at this point in the history
  • Loading branch information
nalepae authored and nisdas committed Jun 19, 2024
1 parent 701e69f commit 8cccce9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions config/params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ type BeaconChainConfig struct {
SamplesPerSlot uint64 `yaml:"SAMPLES_PER_SLOT"` // SamplesPerSlot refers to the humber of random samples a node queries per slot.
CustodyRequirement uint64 `yaml:"CUSTODY_REQUIREMENT"` // CustodyRequirement refers to the minimum amount of subnets a peer must custody and serve samples from.
MinEpochsForDataColumnSidecarsRequest primitives.Epoch `yaml:"MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS"` // MinEpochsForDataColumnSidecarsRequest is the minimum number of epochs the node will keep the data columns for.
MaxCellsInExtendMatrix uint64 `yaml:"MAX_CELLS_IN_EXTENDED_MATRIX"` // MaxCellsInExtendMatrix is the maximum number of cells 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).
NumberOfColumns uint64 `yaml:"NUMBER_OF_COLUMNS" spec:"true"` // NumberOfColumns in the extended data matrix.

// Networking Specific Parameters
GossipMaxSize uint64 `yaml:"GOSSIP_MAX_SIZE" spec:"true"` // GossipMaxSize is the maximum allowed size of uncompressed gossip messages.
Expand All @@ -275,10 +276,6 @@ type BeaconChainConfig struct {
AttestationSubnetPrefixBits uint64 `yaml:"ATTESTATION_SUBNET_PREFIX_BITS" spec:"true"` // AttestationSubnetPrefixBits is defined as (ceillog2(ATTESTATION_SUBNET_COUNT) + ATTESTATION_SUBNET_EXTRA_BITS).
SubnetsPerNode uint64 `yaml:"SUBNETS_PER_NODE" spec:"true"` // SubnetsPerNode is the number of long-lived subnets a beacon node should be subscribed to.
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.
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
7 changes: 2 additions & 5 deletions config/params/mainnet_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ var mainnetBeaconConfig = &BeaconChainConfig{
SamplesPerSlot: 8,
CustodyRequirement: 1,
MinEpochsForDataColumnSidecarsRequest: 4096,
MaxCellsInExtendMatrix: 768,
NumberOfColumns: 128,
MaxCellsInExtendedMatrix: 768,

// Values related to networking parameters.
GossipMaxSize: 10 * 1 << 20, // 10 MiB
Expand All @@ -315,10 +316,6 @@ var mainnetBeaconConfig = &BeaconChainConfig{
AttestationSubnetPrefixBits: 6,
SubnetsPerNode: 2,
NodeIdBits: 256,

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

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

0 comments on commit 8cccce9

Please sign in to comment.