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

Add locks to forkchoice spec tests #12165

Merged
merged 5 commits into from
Mar 21, 2023

Conversation

terencechain
Copy link
Member

What type of PR is this?

Fix test flakeyness

What does this PR do? Why is it needed?

Add locking to fork choice spec tests to reduce test flakiness and isolate production bugs with flakiness

@@ -144,9 +157,9 @@ func (bb *Builder) Check(t testing.TB, c *Check) {
}
if c.ProposerBoostRoot != nil {
want := fmt.Sprintf("%#x", common.FromHex(*c.ProposerBoostRoot))
bb.service.ForkChoiceStore().RLock()
Copy link
Member Author

Choose a reason for hiding this comment

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

Why is there a ForkChoiceStore and ForkChoicer?

Copy link
Contributor

Choose a reason for hiding this comment

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

You can remove one, they are exactly the same method defined in the same file. I do not know from where they are. We should in fact try to remove them both and only export locked wrappers to forkchoice

@prylabs-bulldozer prylabs-bulldozer bot merged commit 79da486 into develop Mar 21, 2023
@delete-merged-branch delete-merged-branch bot deleted the add-forkchoice-spec-test-locks branch March 21, 2023 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants