add delay before broadcasting lc objects (#15776)

* add delay before broadcasting lc objects

* address commments

* address commments

* reduce test runtime
This commit is contained in:
Bastin
2025-10-03 15:02:46 +02:00
committed by GitHub
parent 1f89394727
commit 28eb1a4c3c
16 changed files with 117 additions and 27 deletions

View File

@@ -3,6 +3,7 @@ load("@prysm//tools/go:def.bzl", "go_library", "go_test")
go_library(
name = "go_default_library",
srcs = [
"basis_points.go",
"config.go",
"config_utils_develop.go", # keep
"config_utils_prod.go",

View File

@@ -0,0 +1,10 @@
package params
import "github.com/OffchainLabs/prysm/v6/consensus-types/primitives"
const BasisPoints = primitives.BP(10000)
// SlotBP returns the basis points for a given slot.
func SlotBP() primitives.BP {
return primitives.BP(12000)
}

View File

@@ -223,6 +223,7 @@ type BeaconChainConfig struct {
// Light client
MinSyncCommitteeParticipants uint64 `yaml:"MIN_SYNC_COMMITTEE_PARTICIPANTS" spec:"true"` // MinSyncCommitteeParticipants defines the minimum amount of sync committee participants for which the light client acknowledges the signature.
MaxRequestLightClientUpdates uint64 `yaml:"MAX_REQUEST_LIGHT_CLIENT_UPDATES" spec:"true"` // MaxRequestLightClientUpdates defines the maximum amount of light client updates that can be requested in a single request.
SyncMessageDueBPS uint64 `yaml:"SYNC_MESSAGE_DUE_BPS" spec:"true"` // SyncMessageDueBPS defines the due time for a sync message.
// Bellatrix
TerminalBlockHash common.Hash `yaml:"TERMINAL_BLOCK_HASH" spec:"true"` // TerminalBlockHash of beacon chain.

View File

@@ -64,7 +64,6 @@ var placeholderFields = []string{
"PROPOSER_SCORE_BOOST_EIP7732",
"PROPOSER_SELECTION_GAP",
"SLOT_DURATION_MS",
"SYNC_MESSAGE_DUE_BPS",
"SYNC_MESSAGE_DUE_BPS_GLOAS",
"TARGET_NUMBER_OF_PEERS",
"UPDATE_TIMEOUT",
@@ -102,6 +101,7 @@ func assertEqualConfigs(t *testing.T, name string, fields []string, expected, ac
assert.Equal(t, expected.HysteresisQuotient, actual.HysteresisQuotient, "%s: HysteresisQuotient", name)
assert.Equal(t, expected.HysteresisDownwardMultiplier, actual.HysteresisDownwardMultiplier, "%s: HysteresisDownwardMultiplier", name)
assert.Equal(t, expected.HysteresisUpwardMultiplier, actual.HysteresisUpwardMultiplier, "%s: HysteresisUpwardMultiplier", name)
assert.Equal(t, expected.SyncMessageDueBPS, actual.SyncMessageDueBPS, "%s: SyncMessageDueBPS", name)
// Validator params.
assert.Equal(t, expected.Eth1FollowDistance, actual.Eth1FollowDistance, "%s: Eth1FollowDistance", name)

View File

@@ -257,6 +257,7 @@ var mainnetBeaconConfig = &BeaconChainConfig{
// Light client
MinSyncCommitteeParticipants: 1,
MaxRequestLightClientUpdates: 128,
SyncMessageDueBPS: 3333,
// Bellatrix
TerminalBlockHashActivationEpoch: 18446744073709551615,