Skip to content

fix(client): fetch witnessed quotes concurrently#125

Merged
jacderida merged 1 commit into
rc-2026.6.2from
fix/snp-concurrent-witnessed-quotes-rc-2026.6.2
Jun 17, 2026
Merged

fix(client): fetch witnessed quotes concurrently#125
jacderida merged 1 commit into
rc-2026.6.2from
fix/snp-concurrent-witnessed-quotes-rc-2026.6.2

Conversation

@mickvandijke

Copy link
Copy Markdown
Contributor

Summary

  • keep up to CLOSE_GROUP_SIZE witnessed quote requests in flight concurrently
  • launch fallback witnessed quote requests only when an in-flight peer fails to produce a usable quote
  • preserve exact CLOSE_GROUP_SIZE successful quote selection and existing Merkle preflight behavior

SemVer

  • patch: fixes SNP quote collection latency/behavior without changing public API

Tests

  • cargo fmt --all -- --check
  • cargo test -p ant-core quote --lib
  • cargo clippy --all-targets --all-features -- -D warnings

@dirvine

dirvine commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Hermes review

Verdict: looks good / ready from my review.

I reviewed the single-file change in ant-core/src/data/client/quote.rs with the SNP/witnessed quote invariants in mind.

Checks verified:

  • SNP/witnessed collection now keeps up to CLOSE_GROUP_SIZE quote requests in flight concurrently.
  • Fallback witnessed quote requests are only started after an in-flight peer fails to produce a usable quote (AlreadyStored, bad binding/protocol/network/timeout), not after a successful quote.
  • Final proof construction still returns/selects exactly CLOSE_GROUP_SIZE quotes and preserves the median-voter support requirement.
  • The 2x/fault-tolerant quote path remains isolated to Merkle preflight/probing and does not feed SNP payment proofs.
  • Completion order does not define final quote order; existing distance/median-voter selection still applies after collection.
  • Merkle preflight keeps the previous full concurrent over-query behaviour.

Validation run locally on head d1dca7c314fed59cf22ebe1444da4b3ca5b3f426:

  • cargo fmt --all -- --check
  • cargo test -p ant-core quote --lib ✅ — 32 passed
  • cargo clippy -p ant-core --all-targets --all-features -- -D warnings
  • git diff --check origin/rc-2026.6.2...HEAD

GitHub CI is also green, including unit, E2E, Merkle E2E, clippy, format, docs, build, and security audit.

Non-blocking note: deterministic unit coverage for the new refill scheduler would be nice longer-term, but I don’t see a concrete correctness risk here and the current change is small/bounded.

@jacderida jacderida merged commit 3279295 into rc-2026.6.2 Jun 17, 2026
12 checks passed
jacderida added a commit that referenced this pull request Jun 17, 2026
Revert PR #125 (fetch witnessed quotes concurrently)
jacderida added a commit to jacderida/ant-client that referenced this pull request Jun 20, 2026
…-concurrent-witnessed-quotes-rc-2026.6.2"

This reverts commit 3279295, reversing
changes made to e8c7056.
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