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 flake: global_acceptance_depends_on_block_announcement #5733

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

kantai
Copy link
Member

@kantai kantai commented Jan 22, 2025

This tries to fix test flakiness in signer::v0::global_acceptance_depends_on_block_announcement.

I believe the issue was that poor timing in the CI could cause the checks at the end to work like this:

  1. info_before is checked with stacks height N.
  2. next_block_and() issues a bitcoin block B+1
  3. Before processing B+1, the signers upload stacks block N+1 (because the test directives are all reset). This happens without a new proposal being sent out.
  4. next_block_and() finishes successfully because N+1 advances the stacks tip
  5. info_after is set at N+1, which has consensus hash for Bitcoin Block B (not B+1)
  6. The search for the sister proposal fails because no new proposals are submitted for Block B.

This test corrects this by making step 2 wait for a new stacks block to be produced in B+1's tenure.

@kantai kantai requested a review from a team as a code owner January 22, 2025 18:38
Copy link
Contributor

@hstove hstove left a comment

Choose a reason for hiding this comment

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

LGTM! Nice catch.

testnet/stacks-node/src/tests/signer/v0.rs Show resolved Hide resolved
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.

👏

@kantai kantai added this pull request to the merge queue Jan 22, 2025
Merged via the queue into develop with commit bc56d9e Jan 22, 2025
181 checks passed
@kantai kantai deleted the test/flaky-global-acceptance-depends branch January 22, 2025 21:51
@blockstack-devops
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Jan 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants