Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circuit breaker: lower max builder epoch missed slots to 5 #12076

Merged
merged 6 commits into from Mar 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -56,7 +56,7 @@ func (vs *Server) circuitBreakBuilder(s primitives.Slot) (bool, error) {
return true, err
}

if diff > maxConsecutiveSkipSlotsAllowed {
if diff >= maxConsecutiveSkipSlotsAllowed {
log.WithFields(logrus.Fields{
"currentSlot": s,
"highestReceivedSlot": highestReceivedSlot,
Expand All @@ -80,7 +80,7 @@ func (vs *Server) circuitBreakBuilder(s primitives.Slot) (bool, error) {
if err != nil {
return true, err
}
if diff > maxEpochSkipSlotsAllowed {
if diff >= maxEpochSkipSlotsAllowed {
log.WithFields(logrus.Fields{
"totalMissed": diff,
"maxEpochSkipSlotsAllowed": maxEpochSkipSlotsAllowed,
Expand Down
Expand Up @@ -42,7 +42,7 @@ func TestServer_circuitBreakBuilder(t *testing.T) {
st, blkRoot, err := createState(1, [32]byte{'a'}, [32]byte{}, params.BeaconConfig().ZeroHash, ojc, ofc)
require.NoError(t, err)
require.NoError(t, s.ForkFetcher.ForkChoicer().InsertNode(ctx, st, blkRoot))
b, err = s.circuitBreakBuilder(params.BeaconConfig().MaxBuilderConsecutiveMissedSlots + 1)
b, err = s.circuitBreakBuilder(params.BeaconConfig().MaxBuilderConsecutiveMissedSlots)
require.NoError(t, err)
require.Equal(t, false, b)

Expand Down Expand Up @@ -119,7 +119,7 @@ func TestServer_canUseBuilder(t *testing.T) {
require.NoError(t, proposerServer.BeaconDB.SaveRegistrationsByValidatorIDs(ctx, []primitives.ValidatorIndex{0},
[]*ethpb.ValidatorRegistrationV1{{FeeRecipient: f, Pubkey: p}}))

reg, err = proposerServer.canUseBuilder(ctx, params.BeaconConfig().MaxBuilderConsecutiveMissedSlots, 0)
reg, err = proposerServer.canUseBuilder(ctx, params.BeaconConfig().MaxBuilderConsecutiveMissedSlots-1, 0)
require.NoError(t, err)
require.Equal(t, true, reg)
}
Expand Down
2 changes: 1 addition & 1 deletion config/params/mainnet_config.go
Expand Up @@ -257,7 +257,7 @@ var mainnetBeaconConfig = &BeaconChainConfig{

// Mevboost circuit breaker
MaxBuilderConsecutiveMissedSlots: 3,
MaxBuilderEpochMissedSlots: 8,
MaxBuilderEpochMissedSlots: 5,

// Execution engine timeout value
ExecutionEngineTimeoutValue: 8, // 8 seconds default based on: https://github.com/ethereum/execution-apis/blob/main/src/engine/specification.md#core
Expand Down