Skip to content

fix(test-suite): wait for rotated quorum publication before retrying proofs - #5420

Closed
PastaPastaPasta wants to merge 1 commit into
v5.1-devfrom
fix/test-suite-quorum-publication-retry
Closed

PastaPastaPasta wants to merge 1 commit into
v5.1-devfrom
fix/test-suite-quorum-publication-retry

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

The Test Suite fails on v5.1-dev itself. On 054563c73e (run 37948485030), 2 tests failed with:

DapiClientError: no available addresses to retry, last error: Proof verification error:
context provider error: invalid quorum: Quorum not found in cache for hash: …

After a quorum rotation, Platform can return a proof signed by the new quorum before the local quorum sidecar has published that quorum's key (it refreshes every 60 s). The SDK then bans each node it tries for 60 s and runs out of addresses.

This change was originally a commit inside #5307 (c1c7b095c2, later 835f6af4bf). It doesn't depend on anything in #5307, so it's split out here to merge first; #5307 will drop the commit afterwards.

What was done?

  • createPlatformProofVerifier retries a proved read once, after 65 s, but only when it fails with the missing-quorum-key error. That gives the sidecar's 60 s refresh and the SDK's initial 60 s node bans time to expire.
  • Signature verification, node banning and transition broadcasting are unchanged. No transition is rebroadcast, and the retried read is fully verified.
  • Unit tests use fake timers to cover: delayed publication, address bans expiring, a permanent miss, affected-state proofs, and invalid signatures.

The test-suite diff is byte-identical to the original commit, and the authorship is preserved. Only the CHANGELOG entry was re-placed for v5.1-dev's "Unreleased" section.

This is a workaround. The underlying timing is fixed by #5313 (the SDK fetches a missing quorum key instead of banning every node), #5354 (dashmate reloads the local quorum list every second) and quorum-list-server v0.8.0 (dashpay/quorum-list-server#17). #5313 and #5354 are on v5.0-dev but haven't been forward-merged to v5.1-dev yet. Once they are, this retry can be removed.

How Has This Been Tested?

  • Original commit: 4 of the new regression tests failed before the fix; all 9 verifier unit tests pass after it. ESLint passes (with the unbuilt local evo-sdk import excluded).
  • On chore(platform)!: update rust-dashcore (incl secp256k1 0.33) #5307 with this change, the full Test Suite, both browser suites and the package functional tests passed (45 successful checks on c1c7b095c2).
  • I didn't run it locally on this branch; CI covers it.

Breaking Changes

None. Test-suite only.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

🤖 Generated with Claude Code

…proofs

The quorum sidecar publishes keys every 60 seconds. CI twice received a
proof signed by the next quorum before its key appeared, then exhausted
SDK addresses through the initial 60-second node bans.

Retry only a missing-cache-key proof read once after 65 seconds. Keep
signature verification, node banning, and transition broadcasting unchanged.
Cover delayed publication, expiry of address bans, permanent misses,
affected-state proofs, and invalid signatures with fake-timer tests.

Validation: 4 regression tests failed before the fix; all 9 verifier tests
pass after it. ESLint passes with the unbuilt local evo-sdk import excluded;
two pre-existing unused catch-variable warnings remain.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Codex GPT-6 <noreply@openai.com>
@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: dashpay/platform/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 09f902e1-84ba-4ddb-b763-21eda72b4992

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added this to the v5.1.0 milestone Oct 13, 2026
@PastaPastaPasta

Copy link
Copy Markdown
Member Author

Closing this in favour of the real fix. #5313 makes the SDK (including wasm) fetch a missing quorum key and verify the response again instead of banning every node, and #5354 makes dashmate reload the local quorum list every second. Both reached v5.1-dev through #5404, whose Test Suite passed without this retry. #5307 will drop the original commit.


🤖 Posted autonomously by Claude on behalf of pasta.

@PastaPastaPasta
PastaPastaPasta deleted the fix/test-suite-quorum-publication-retry branch October 13, 2026 21:01
@thepastaclaw

Copy link
Copy Markdown
Collaborator

🕓 Review not started yet because the new head is waiting for the 30-minute push debounce.

  • Request normal review — click when the PR is ready for review.
  • Request priority review — click to move this review to the front of the queue.

Commit cd557cd. Normal review starts when eligible; priority review starts as soon as a slot is available.

PastaPastaPasta added a commit that referenced this pull request Oct 13, 2026
This reverts commit 835f6af.

That commit worked around Test Suite failures after a quorum rotation:
on a "Quorum not found in cache" proof error it waited 65 seconds and
retried the proved read once. The failures were never caused by this
branch. v5.1-dev failed the same way before #5404, and the workaround
needed nothing from the rust-dashcore migration.

The causes are now fixed at the source and reach this branch through
the v5.1-dev merge (#5404):
- #5313: the SDK, including wasm-sdk, fetches a missing quorum key from
  the trusted quorum service and verifies the response again, instead of
  banning every node.
- #5354: dashmate reloads the local quorum list every second rather than
  every 60 seconds.
- quorum-list-server v0.8.0 lists every quorum Platform may still sign
  with (dashpay/quorum-list-server#16).

#5404's Test Suite passed without the retry. Keeping a fixed sleep keyed
on error text would only hide a regression of those fixes. The
standalone copy, #5420, was closed for the same reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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