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

Test: fix some test flake in partial_tenure_forking #5769

Merged
merged 2 commits into from
Jan 30, 2025

Conversation

kantai
Copy link
Member

@kantai kantai commented Jan 29, 2025

This should fix (some, but perhaps not all) flakiness in partial_tenure_forking.

I think what happened in a particular run of this test is that miner 2 won the first testing tenure of the test. This, by itself, should be okay, but the problem is that the timing of the block commit pausing/unpausing and block processing are such that miner 2's first commit is actually a fork! This is because the CI runner builds the next bitcoin block before miner 2 has a chance to RBF their commit with one that points at miner 1's tenure. I solve this particular flakiness with a new Counters variable, but like my last PR that added a Counters variable, this is a kind of check we do in a lot of places. For now, trying to refactor all of the tests to be better about this is a pretty big undertaking, but its something worth keeping in mind (I'll open a refactoring issue for this).

Copy link
Collaborator

@jferrant jferrant left a comment

Choose a reason for hiding this comment

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

Ah good find.

Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

Nice!

@kantai kantai added this pull request to the merge queue Jan 30, 2025
Merged via the queue into develop with commit 7e8f2a3 Jan 30, 2025
181 of 182 checks passed
@kantai kantai deleted the test/partial-tenure-flake branch January 30, 2025 21:48
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.

3 participants