Skip to content

fix(snp): lower witness quorum for partial transcripts#128

Merged
jacderida merged 2 commits into
rc-2026.6.2from
fix/snp-partial-witness-quorum
Jun 17, 2026
Merged

fix(snp): lower witness quorum for partial transcripts#128
jacderida merged 2 commits into
rc-2026.6.2from
fix/snp-partial-witness-quorum

Conversation

@mickvandijke

@mickvandijke mickvandijke commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Semver: patch

Summary:

  • warn when SNP witnessed close-group transcripts are missing responder views
  • lower the SNP witness quorum by one for each missing K-close responder view, clamped to at least one
  • apply the adjusted quorum consistently to candidate selection, median-issuer support, and PUT peer ordering
  • fetch SNP witnessed quotes concurrently with an exact 7-quote in-flight window: start with the closest 7 candidates, and launch the next closest fallback only when an in-flight peer fails or reports already-stored
  • share per-peer quote request/result handling between SNP and Merkle preflight quote collection

Testing:

  • cargo test -p ant-core witnessed_ -- --nocapture
  • cargo test --locked -p ant-core witnessed_ -- --nocapture
  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings

@dirvine

dirvine commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Quick safety review from Hermes (requested from Slack):

Verdict: looks safe to merge once maintainers are happy. I did not find a blocking issue.

Checked:

  • SNP/witnessed quote collection now keeps an exact CLOSE_GROUP_SIZE in-flight/success window: initial launch is the closest 7; fallback peers are only launched after a failed / unusable / already-stored outcome, not after a successful quote.
  • Successful quote completion order does not define proof selection: quotes are still sorted/selected by XOR-distance and median-issuer voter support after collection.
  • The 2 * CLOSE_GROUP_SIZE fault-tolerant path remains isolated to Merkle preflight / already-stored probing, not SNP SingleNodePayment proof construction.
  • Adjusted quorum is applied consistently to candidate selection, paid-median support, and PUT peer ordering.
  • Existing bad quote-binding filtering remains preserved via the shared request/result helper.

Local checks run on PR head 883f9043ff39a19a2b42b4eaf16f2e03ee07c431:

  • cargo test -p ant-core witnessed_ --lib --no-fail-fast — pass (8 tests)
  • cargo fmt --all -- --check — pass
  • cargo test -p ant-core witnessed_quote_launch_budget_keeps_exact_quote_window --lib --no-fail-fast — pass
  • cargo test -p ant-core quote_query_counts_keep_single_node_close_group_only --lib --no-fail-fast — pass

GitHub checks are green across build, unit, clippy, format, docs, security audit, E2E and Merkle E2E on the current run.

One note: I intentionally treated extra deterministic scheduler coverage as non-blocking here because the implementation is small/bounded and the key launch-window invariant has direct unit coverage.

@jacderida jacderida merged commit 0ea6687 into rc-2026.6.2 Jun 17, 2026
12 checks passed
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