Compare commits

...

5 Commits

Author SHA1 Message Date
satushh
10856fc373 Merge branch 'develop' into fulu-bcn-cfg 2026-01-05 21:11:04 +05:30
satushh
bb3df7415a Merge branch 'develop' into fulu-bcn-cfg 2026-01-05 20:49:27 +05:30
satushh
565a7de7bf add update timeout 2026-01-05 20:48:34 +05:30
satushh
3b2752b18c changelog 2025-12-19 18:01:56 +05:30
satushh
c51a74325e add missing fulu constants to beacon config 2025-12-19 18:00:43 +05:30
7 changed files with 39 additions and 7 deletions

View File

@@ -181,6 +181,12 @@ func prepareConfigSpec() (map[string]any, error) {
data[tag] = convertValueForJSON(val, tag)
}
// Add derived values that are computed from other config values.
data["UPDATE_TIMEOUT"] = strconv.FormatUint(
uint64(config.SlotsPerEpoch)*uint64(config.EpochsPerSyncCommitteePeriod),
10,
)
return data, nil
}

View File

@@ -168,6 +168,11 @@ func TestGetSpec(t *testing.T) {
config.BlobsidecarSubnetCount = 101
config.BlobsidecarSubnetCountElectra = 102
config.SyncMessageDueBPS = 103
config.FieldElementsPerCell = 104
config.FieldElementsPerExtBlob = 105
config.KzgCommitmentsInclusionProofDepth = 106
config.CellsPerExtBlob = 107
config.NumberOfColumns = 108
var dbp [4]byte
copy(dbp[:], []byte{'0', '0', '0', '1'})
@@ -205,7 +210,7 @@ func TestGetSpec(t *testing.T) {
require.NoError(t, json.Unmarshal(writer.Body.Bytes(), &resp))
data, ok := resp.Data.(map[string]any)
require.Equal(t, true, ok)
assert.Equal(t, 175, len(data))
assert.Equal(t, 181, len(data))
for k, v := range data {
t.Run(k, func(t *testing.T) {
switch k {
@@ -581,6 +586,18 @@ func TestGetSpec(t *testing.T) {
blobSchedule, ok := v.([]any)
assert.Equal(t, true, ok)
assert.Equal(t, 2, len(blobSchedule))
case "FIELD_ELEMENTS_PER_CELL":
assert.Equal(t, "104", v)
case "FIELD_ELEMENTS_PER_EXT_BLOB":
assert.Equal(t, "105", v)
case "KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH":
assert.Equal(t, "106", v)
case "CELLS_PER_EXT_BLOB":
assert.Equal(t, "107", v)
case "NUMBER_OF_COLUMNS":
assert.Equal(t, "108", v)
case "UPDATE_TIMEOUT":
assert.Equal(t, "1782", v) // SlotsPerEpoch (27) * EpochsPerSyncCommitteePeriod (66)
default:
t.Errorf("Incorrect key: %s", k)
}

View File

@@ -0,0 +1,3 @@
### Added
- Added missing beacon config in fulu so that the presets don't go missing in /eth/v1/config/spec beacon api.

View File

@@ -19,4 +19,6 @@ func testFieldParametersMatchConfig(t *testing.T) {
require.Equal(t, uint64(params.BeaconConfig().SlotsPerEpoch.Mul(params.BeaconConfig().MaxAttestations)), uint64(fieldparams.CurrentEpochAttestationsLength))
require.Equal(t, uint64(params.BeaconConfig().EpochsPerSlashingsVector), uint64(fieldparams.SlashingsLength))
require.Equal(t, params.BeaconConfig().SyncCommitteeSize, uint64(fieldparams.SyncCommitteeLength))
require.Equal(t, params.BeaconConfig().NumberOfColumns, uint64(fieldparams.NumberOfColumns))
require.Equal(t, params.BeaconConfig().FieldElementsPerCell, uint64(fieldparams.CellsPerBlob))
}

View File

@@ -289,6 +289,11 @@ type BeaconChainConfig struct {
MaxRequestDataColumnSidecars uint64 `yaml:"MAX_REQUEST_DATA_COLUMN_SIDECARS" spec:"true"` // MaxRequestDataColumnSidecars is the maximum number of data column sidecars in a single request
ValidatorCustodyRequirement uint64 `yaml:"VALIDATOR_CUSTODY_REQUIREMENT" spec:"true"` // ValidatorCustodyRequirement is the minimum number of custody groups an honest node with validators attached custodies and serves samples from
BalancePerAdditionalCustodyGroup uint64 `yaml:"BALANCE_PER_ADDITIONAL_CUSTODY_GROUP" spec:"true"` // BalancePerAdditionalCustodyGroup is the balance increment corresponding to one additional group to custody.
FieldElementsPerCell uint64 `yaml:"FIELD_ELEMENTS_PER_CELL" spec:"true"` // FieldElementsPerCell is the number of field elements in a cell.
FieldElementsPerExtBlob uint64 `yaml:"FIELD_ELEMENTS_PER_EXT_BLOB" spec:"true"` // FieldElementsPerExtBlob is the number of field elements in an extended blob.
KzgCommitmentsInclusionProofDepth uint64 `yaml:"KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH" spec:"true"` // KzgCommitmentsInclusionProofDepth is the depth of the KZG commitments inclusion proof.
CellsPerExtBlob uint64 `yaml:"CELLS_PER_EXT_BLOB" spec:"true"` // CellsPerExtBlob is the number of cells in an extended blob.
NumberOfColumns uint64 `yaml:"NUMBER_OF_COLUMNS" spec:"true"` // NumberOfColumns is the number of data columns in the network.
// Networking Specific Parameters
MaxPayloadSize uint64 `yaml:"MAX_PAYLOAD_SIZE" spec:"true"` // MAX_PAYLOAD_SIZE is the maximum allowed size of uncompressed payload in gossip messages and rpc chunks.

View File

@@ -29,7 +29,6 @@ var placeholderFields = []string{
"ATTESTATION_DEADLINE",
"ATTESTATION_DUE_BPS_GLOAS",
"BLOB_SIDECAR_SUBNET_COUNT_FULU",
"CELLS_PER_EXT_BLOB",
"CONTRIBUTION_DUE_BPS_GLOAS",
"EIP6110_FORK_EPOCH",
"EIP6110_FORK_VERSION",
@@ -44,25 +43,20 @@ var placeholderFields = []string{
"EIP7928_FORK_EPOCH",
"EIP7928_FORK_VERSION",
"EPOCHS_PER_SHUFFLING_PHASE",
"FIELD_ELEMENTS_PER_CELL", // Configured as a constant in config/fieldparams/mainnet.go
"FIELD_ELEMENTS_PER_EXT_BLOB", // Configured in proto/ssz_proto_library.bzl
"GLOAS_FORK_EPOCH",
"GLOAS_FORK_VERSION",
"INCLUSION_LIST_SUBMISSION_DEADLINE",
"INCLUSION_LIST_SUBMISSION_DUE_BPS",
"KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH", // Configured in proto/ssz_proto_library.bzl
"MAX_BYTES_PER_INCLUSION_LIST",
"MAX_REQUEST_BLOB_SIDECARS_FULU",
"MAX_REQUEST_INCLUSION_LIST",
"MAX_REQUEST_PAYLOADS", // Compile time constant on BeaconBlockBody.ExecutionRequests
"NUMBER_OF_COLUMNS", // Configured as a constant in config/fieldparams/mainnet.go
"PAYLOAD_ATTESTATION_DUE_BPS",
"PROPOSER_INCLUSION_LIST_CUTOFF",
"PROPOSER_INCLUSION_LIST_CUTOFF_BPS",
"PROPOSER_SELECTION_GAP",
"SYNC_MESSAGE_DUE_BPS_GLOAS",
"TARGET_NUMBER_OF_PEERS",
"UPDATE_TIMEOUT",
"VIEW_FREEZE_CUTOFF_BPS",
"VIEW_FREEZE_DEADLINE",
"WHISK_EPOCHS_PER_SHUFFLING_PHASE",

View File

@@ -328,6 +328,11 @@ var mainnetBeaconConfig = &BeaconChainConfig{
MinEpochsForDataColumnSidecarsRequest: 4096,
ValidatorCustodyRequirement: 8,
BalancePerAdditionalCustodyGroup: 32_000_000_000,
FieldElementsPerCell: 64,
FieldElementsPerExtBlob: 8192,
KzgCommitmentsInclusionProofDepth: 4,
CellsPerExtBlob: 128,
NumberOfColumns: 128,
// Values related to networking parameters.
MaxPayloadSize: 10 * 1 << 20, // 10 MiB
AttestationSubnetCount: 64,