chore(release): promote rc-2026.6.2#137
Merged
Merged
Conversation
This reverts commit 60108a4.
This reverts commit 313cb57.
feat(dht): add witnessed close-group lookup
Move quorum, vote counting, and final candidate policy out of saorsa-core. The DHT layer now returns the initial close group plus each responder's trusted self-inclusive closest-K node view so downstream clients can apply their own fallback and payment policy. BREAKING CHANGE: WitnessedCloseGroup no longer exposes quorum, vote_counts, consensus, or is_complete, and ResponderView::closest now contains DHTNode records instead of PeerId values.
…olicy feat(dht)!: return witnessed close-group transcripts
…c-2026.6.2 feat(dht): support separate witnessed view counts
Contributor
There was a problem hiding this comment.
Pull request overview
Promotes rc-2026.6.2 to the saorsa-core 0.26.0 release while also updating DHT lookup behavior and adding a new witnessed close-group transcript API in the DHT network manager.
Changes:
- Bumps crate version to
0.26.0and regeneratesCargo.lock. - Adds a witnessed close-group transcript API (
WitnessedCloseGroup/ResponderView) and exports it fromsrc/lib.rs. - Refactors parts of FIND_NODE lookup/transcript handling and simplifies related integration tests.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
tests/two_node_messaging.rs |
Removes/adjusts DHT local-lookup tests; leaves only the self-inclusive XOR-lookup smoke test. |
src/lib.rs |
Re-exports new witnessed close-group transcript types. |
src/dht_network_manager.rs |
Implements witnessed close-group transcript capture/requery, adjusts local lookup reliability stamping, and adds unit tests. |
Cargo.toml |
Bumps saorsa-core version to 0.26.0. |
Cargo.lock |
Updates lockfile for the 0.26.0 release. |
Comment on lines
+2416
to
+2420
| peer_id: node.id, | ||
| address_types: node.address_types, | ||
| addresses: node.addresses, | ||
| distance: encode_publish_seq_distance(publish_seq), | ||
| reliability: SELF_RELIABILITY_SCORE, |
Comment on lines
+2956
to
+2975
| for (index, node) in nodes.into_iter().enumerate() { | ||
| let node = self | ||
| .gossiped_node_with_trusted_addresses(node, transport_source) | ||
| .await; | ||
| if self.is_local_peer_id(&node.peer_id) { | ||
| continue; | ||
| } | ||
|
|
||
| let is_candidate_node = index < candidate_limit; | ||
| let is_transcript_node = index < transcript_limit; | ||
| match (is_candidate_node, is_transcript_node) { | ||
| (true, true) => { | ||
| candidate_nodes.push(node.clone()); | ||
| transcript_nodes.push(node); | ||
| } | ||
| (true, false) => candidate_nodes.push(node), | ||
| (false, true) => transcript_nodes.push(node), | ||
| (false, false) => {} | ||
| } | ||
| } |
Comment on lines
+2949
to
+2955
| let processing_limit = candidate_limit.max(transcript_limit); | ||
| nodes.sort_by(|a, b| Self::compare_node_distance(a, b, key)); | ||
| nodes.truncate(processing_limit); | ||
|
|
||
| let mut candidate_nodes = Vec::with_capacity(candidate_limit.min(nodes.len())); | ||
| let mut transcript_nodes = Vec::with_capacity(transcript_limit.min(nodes.len())); | ||
|
|
Comment on lines
+2155
to
+2176
| /// Find a quorum-witnessed close group for a target key. | ||
| /// | ||
| /// This is a specialised close-group authority API. It does not change | ||
| /// regular FIND_NODE semantics: | ||
| /// | ||
| /// 1. Perform the normal iterative pure-XOR lookup and keep the closest K | ||
| /// remote responders. | ||
| /// 2. Reuse each initial responder's closest-K view from the iterative | ||
| /// lookup transcript when available; query only responders whose view | ||
| /// was not captured during convergence. | ||
| /// 3. Make each responder view self-inclusive, so a responder that belongs | ||
| /// in its own local close group recognises itself even though standard | ||
| /// FIND_NODE responses omit the responder. | ||
| /// 4. Return the trusted, self-inclusive closest-K view for each responder. | ||
| /// Callers decide quorum, fallback, and payment policy from that | ||
| /// transcript. | ||
| /// | ||
| /// The returned [`WitnessedCloseGroup`] is a validated DHT transcript. It | ||
| /// can be inconclusive when some initial responders do not provide views; | ||
| /// callers that require a complete or quorum-backed close group should | ||
| /// evaluate that before performing irreversible work such as payment. | ||
| pub async fn find_witnessed_close_group( |
Comment on lines
321
to
324
| assert!( | ||
| (node_b_entry.reliability - NEUTRAL_TRUST).abs() < 1e-9, | ||
| "expected neutral trust {NEUTRAL_TRUST}, got {}", | ||
| node_b_entry.reliability | ||
| nodes.into_iter().any(|n| n.peer_id == peer_b), | ||
| "node_b should appear in node_a's self-inclusive XOR-only selection" | ||
| ); |
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.
Promotes
rc-2026.6.2to release version(s): 0.26.0.-rc.*from[package].versionCargo.lockOnce merged, the release tag will be pushed to fire the publish workflow.