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

Conversation

terencechain
Copy link
Member

The current circuit breaker gets activated with 3 consecutive missed slots and 8 missed slots over the last 32 slots. As it turns out the checks are more relaxed than we provisioned given the validator resets the counter to 0 once the first check is triggered. So 80% of the blocks have to be missing for it to activate. Given the upcoming Capella hard fork, this PR adds a strict limit for safety that if relayer and builder mess up, we can default back to the local block builder

@terencechain terencechain requested a review from a team as a code owner March 3, 2023 16:53
Copy link
Contributor

@potuz potuz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the description of the PR is misleading, we have > signs instead of >= signs in our circuit breaker:

	highestReceivedSlot := vs.ForkFetcher.ForkChoicer().HighestReceivedBlockSlot()
	maxConsecutiveSkipSlotsAllowed := params.BeaconConfig().MaxBuilderConsecutiveMissedSlots
	diff, err := s.SafeSubSlot(highestReceivedSlot)
	if err != nil {
		return true, err
	}

	if diff > maxConsecutiveSkipSlotsAllowed {
		log.WithFields(logrus.Fields{
			"currentSlot":                    s,
			"highestReceivedSlot":            highestReceivedSlot,
			"maxConsecutiveSkipSlotsAllowed": maxConsecutiveSkipSlotsAllowed,
		}).Warn("Circuit breaker activated due to missing consecutive slot. Ignore if mev-boost is not used")
		return true, nil
	}

I recommend changing those to >= or using 2, 4 for the circuit breaker parameters.

@terencechain terencechain self-assigned this Mar 4, 2023
@terencechain terencechain added Ready For Review A pull request ready for code review OK to merge labels Mar 4, 2023
potuz
potuz previously approved these changes Mar 4, 2023
Copy link
Contributor

@potuz potuz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@prylabs-bulldozer prylabs-bulldozer bot merged commit b8a1bcd into develop Mar 5, 2023
@delete-merged-branch delete-merged-branch bot deleted the lower-max-miss-slots-epoch branch March 5, 2023 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants