Skip to content

test: fix flaky PoSe ban assertion in feature_llmq_simplepose#7254

Draft
thepastaclaw wants to merge 1 commit intodashpay:developfrom
thepastaclaw:fix-flaky-llmq-simplepose
Draft

test: fix flaky PoSe ban assertion in feature_llmq_simplepose#7254
thepastaclaw wants to merge 1 commit intodashpay:developfrom
thepastaclaw:fix-flaky-llmq-simplepose

Conversation

@thepastaclaw
Copy link

Summary

Fix a flaky assertion in feature_llmq_simplepose.py (line 206).

After 6 quorum rounds of penalty accumulation, the test used a bare assert check_banned() without polling. Under CPU contention, the PoSe ban state update (which happens during block validation) may not be visible via RPC immediately after mine_quorum() returns.

Change: assert check_banned(...)self.wait_until(lambda: check_banned(...), timeout=10)

This is a classic polling fix — the assertion logic is identical, it just retries for up to 10 seconds instead of failing on the first check.

Split from #7233 to allow independent review.

After mine_quorum() returns, the PoSe ban state update (which happens
during block validation) may not be visible via RPC immediately under
CPU contention. Replace the bare assert with wait_until to poll for
up to 10 seconds.

The assertion logic is identical — it just retries instead of failing
on the first check.
@github-actions
Copy link

✅ No Merge Conflicts Detected

This PR currently has no conflicts with other open PRs.

Copy link
Author

@thepastaclaw thepastaclaw left a comment

Choose a reason for hiding this comment

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

Code Review

Clean, well-scoped fix. The PR replaces a bare assert check_banned() with self.wait_until(lambda: check_banned(...), timeout=10), correctly addressing the race where PoSe ban state may not yet be visible via RPC immediately after mine_quorum() returns. The fix follows the same polling pattern used elsewhere in the test framework. No issues found.

Reviewed commit: a94ee4e

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.

1 participant