Skip to content

Resolve flakiness#7262

Merged
brice-stacks merged 2 commits into
stacks-network:developfrom
brice-stacks:test/resolve-flakiness
Jun 2, 2026
Merged

Resolve flakiness#7262
brice-stacks merged 2 commits into
stacks-network:developfrom
brice-stacks:test/resolve-flakiness

Conversation

@brice-stacks
Copy link
Copy Markdown
Contributor

Hopefully fixes two newly identified sources of flakiness.

`get_unconfirmed_tx` returns `None` on any non-success response, including
transient RPC errors while the node is busy processing a block. Asserting on a
single request immediately after submitting `tx_high` races with that block
processing and flakes under active mining.

Poll with `wait_for` instead of asserting on a single request. This is strictly
stronger: it still requires the tx to become visible in the mempool, but
tolerates the transient window before it is queryable.
The test waited for the block-commit *count* to increase after a config change,
then asserted the last commit amount equalled the new burn fee cap. But the
miner submits an RBF commit every initiative, so an old-config commit submitted
between the snapshot and the config reload satisfies the count-based wait while
still carrying the old amount, flaking `assert_eq!(commit_amount_after, 155000)`.

Wait for a commit reflecting the new config (amount == 155000) instead.
@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 26782862059

Coverage increased (+0.04%) to 85.752%

Details

  • Coverage increased (+0.04%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 6681 coverage regressions across 120 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

6681 previously-covered lines in 120 files lost coverage.

Top 10 Files by Coverage Loss Lines Losing Coverage Coverage
stackslib/src/config/mod.rs 376 68.96%
stackslib/src/net/mod.rs 311 77.91%
stackslib/src/chainstate/stacks/index/storage.rs 284 82.27%
stackslib/src/chainstate/stacks/miner.rs 252 83.51%
clarity/src/vm/database/clarity_db.rs 245 82.18%
stackslib/src/chainstate/stacks/db/transactions.rs 222 97.16%
stackslib/src/net/inv/epoch2x.rs 215 79.84%
stackslib/src/net/chat.rs 201 93.01%
stackslib/src/chainstate/stacks/db/mod.rs 196 86.23%
stackslib/src/core/mempool.rs 193 86.44%

Coverage Stats

Coverage Status
Relevant Lines: 223466
Covered Lines: 191626
Line Coverage: 85.75%
Coverage Strength: 18915916.11 hits per line

💛 - Coveralls

@brice-stacks brice-stacks added this pull request to the merge queue Jun 2, 2026
Merged via the queue into stacks-network:develop with commit 77a49d4 Jun 2, 2026
219 checks passed
@brice-stacks brice-stacks deleted the test/resolve-flakiness branch June 2, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants