test: fix flaky PoSe ban assertion in feature_llmq_simplepose#7254
Draft
thepastaclaw wants to merge 1 commit intodashpay:developfrom
Draft
test: fix flaky PoSe ban assertion in feature_llmq_simplepose#7254thepastaclaw wants to merge 1 commit intodashpay:developfrom
thepastaclaw wants to merge 1 commit intodashpay:developfrom
Conversation
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.
✅ No Merge Conflicts DetectedThis PR currently has no conflicts with other open PRs. |
thepastaclaw
commented
Mar 26, 2026
Author
thepastaclaw
left a comment
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 aftermine_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.