Skip to content

fix: use direct witness support for SNP median#124

Merged
jacderida merged 1 commit into
rc-2026.6.2from
fix/snp-median-direct-witness-support
Jun 16, 2026
Merged

fix: use direct witness support for SNP median#124
jacderida merged 1 commit into
rc-2026.6.2from
fix/snp-median-direct-witness-support

Conversation

@dirvine

@dirvine dirvine commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Restore the fix: upload SNP chunks to initial witness group #122 SNP shape for testing: quote the witnessed set, PUT to the initial witness close group, sort witnessed candidates by XOR closeness first, and try the closest 7 witnessed quote peers before falling back further.
  • Fix the fix: upload SNP chunks to initial witness group #122 client-side preflight bug: median support now means direct witness recognition of the paid median issuer (voters_by_peer[median].len()), not selected_quote_issuers ∩ median_voters.
  • Add a regression test for the NAT/reachability case where the median issuer is recognised by quorum witnesses that are not themselves selected quote issuers.

Why

STG-01 showed #122 could abort before payment with:

Got 7 quotes, need 7 whose paid median issuer is recognised by at least 5 selected witness peers

The live transcript showed witnesses recognised the median issuer perfectly, but some recognised close peers were not direct responders. The old metric conflated “recognised by witnesses” with “recognised by selected quote issuers that are also witnesses”. This PR checks the intended property directly.

Target branch: rc-2026.6.2.

Verification

  • cargo test -p ant-core --lib data::client::quote -- --nocapture — 24 passed
  • cargo check -p ant-core
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check

@jacderida jacderida merged commit e8c7056 into rc-2026.6.2 Jun 16, 2026
11 of 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.

2 participants