mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 19:40:37 +00:00
Misc builder fixes (#11228)
* Fix a few bugs * Fix test Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
parent
ccfc09151f
commit
8d3f474bfa
@ -317,16 +317,16 @@ func (vs *Server) circuitBreakBuilder(s types.Slot) (bool, error) {
|
||||
|
||||
// Circuit breaker is active if the missing consecutive slots greater than `MaxBuilderConsecutiveMissedSlots`.
|
||||
highestReceivedSlot := vs.ForkFetcher.ForkChoicer().HighestReceivedBlockSlot()
|
||||
fallbackSlots := params.BeaconConfig().MaxBuilderConsecutiveMissedSlots
|
||||
maxConsecutiveSkipSlotsAllowed := params.BeaconConfig().MaxBuilderConsecutiveMissedSlots
|
||||
diff, err := s.SafeSubSlot(highestReceivedSlot)
|
||||
if err != nil {
|
||||
return true, err
|
||||
}
|
||||
if diff > fallbackSlots {
|
||||
if diff > maxConsecutiveSkipSlotsAllowed {
|
||||
log.WithFields(logrus.Fields{
|
||||
"currentSlot": s,
|
||||
"highestReceivedSlot": highestReceivedSlot,
|
||||
"fallBackSkipSlots": fallbackSlots,
|
||||
"currentSlot": s,
|
||||
"highestReceivedSlot": highestReceivedSlot,
|
||||
"maxConsecutiveSkipSlotsAllowed": maxConsecutiveSkipSlotsAllowed,
|
||||
}).Warn("Builder circuit breaker activated due to missing consecutive slot")
|
||||
return true, nil
|
||||
}
|
||||
@ -341,15 +341,15 @@ func (vs *Server) circuitBreakBuilder(s types.Slot) (bool, error) {
|
||||
if err != nil {
|
||||
return true, err
|
||||
}
|
||||
fallbackSlotsLastEpoch := params.BeaconConfig().MaxBuilderEpochMissedSlots
|
||||
maxEpochSkipSlotsAllowed := params.BeaconConfig().MaxBuilderEpochMissedSlots
|
||||
diff, err = params.BeaconConfig().SlotsPerEpoch.SafeSub(receivedCount)
|
||||
if err != nil {
|
||||
return true, err
|
||||
}
|
||||
if diff > fallbackSlotsLastEpoch {
|
||||
if diff > maxEpochSkipSlotsAllowed {
|
||||
log.WithFields(logrus.Fields{
|
||||
"totalMissed": receivedCount,
|
||||
"fallBackSkipSlotsLastEpoch": fallbackSlotsLastEpoch,
|
||||
"totalMissed": diff,
|
||||
"maxEpochSkipSlotsAllowed": maxEpochSkipSlotsAllowed,
|
||||
}).Warn("Builder circuit breaker activated due to missing enough slots last epoch")
|
||||
return true, nil
|
||||
}
|
||||
|
@ -72,6 +72,8 @@ var appFlags = []cli.Flag{
|
||||
flags.TerminalBlockHashOverride,
|
||||
flags.TerminalBlockHashActivationEpochOverride,
|
||||
flags.MevRelayEndpoint,
|
||||
flags.MaxBuilderEpochMissedSlots,
|
||||
flags.MaxBuilderConsecutiveMissedSlots,
|
||||
cmd.EnableBackupWebhookFlag,
|
||||
cmd.BackupWebhookOutputDir,
|
||||
cmd.MinimalConfigFlag,
|
||||
|
@ -124,6 +124,8 @@ var appHelpFlagGroups = []flagGroup{
|
||||
flags.Eth1HeaderReqLimit,
|
||||
flags.MinPeersPerSubnet,
|
||||
flags.MevRelayEndpoint,
|
||||
flags.MaxBuilderEpochMissedSlots,
|
||||
flags.MaxBuilderConsecutiveMissedSlots,
|
||||
checkpoint.BlockPath,
|
||||
checkpoint.StatePath,
|
||||
checkpoint.RemoteURL,
|
||||
|
@ -253,8 +253,8 @@ var mainnetBeaconConfig = &BeaconChainConfig{
|
||||
DefaultBuilderGasLimit: uint64(30000000),
|
||||
|
||||
// Mevboost circuit breaker
|
||||
MaxBuilderConsecutiveMissedSlots: 4,
|
||||
MaxBuilderEpochMissedSlots: 6,
|
||||
MaxBuilderConsecutiveMissedSlots: 3,
|
||||
MaxBuilderEpochMissedSlots: 8,
|
||||
}
|
||||
|
||||
// MainnetTestConfig provides a version of the mainnet config that has a different name
|
||||
|
Loading…
Reference in New Issue
Block a user