discv5: topic discovery spec#270
Open
srene wants to merge 19 commits into
Open
Conversation
Michal's edits
revert back to original version
Added Service discovery (disc-ng)
…; add TOPICNODES Updates the wire-format spec for DISC-NG service discovery to match the shape implementations are converging on, following the theory section added in 7111aa5 ("Added service discovery"). Summary of changes: - REGTOPIC (0x07) gains a `bucket` list (sender's service-table free distances) and drops the "not final" disclaimer. - The dedicated TICKET response (legacy 0x08) is removed. The ticket the registrar issues in response to REGTOPIC is now carried by REGCONFIRMATION, distinguished by an empty `ticket` field meaning "admitted". - REGCONFIRMATION (now 0x08) is redefined as the immediate response to REGTOPIC, carrying both the admit-or-wait signal (via ticket length) and the response-count for the request. - TOPICQUERY (now 0x09) gains the same `bucket` hint as REGTOPIC. - TOPICNODES (0x0A) is added as the dedicated response carrying registered advertiser ENRs from the recipient's ad cache. TOPICQUERY responses are now NODES (auxiliary routing ENRs) + TOPICNODES (matching advertisers), serving the two distinct roles. - NODES (0x04) is documented as also serving REGTOPIC and TOPICQUERY, carrying auxiliary ENRs for the requester's service table. Message type codes after REGTOPIC are shifted down by one to keep IDs sequential without gaps. The "not final" disclaimers on REGTOPIC / REGCONFIRMATION / TOPICQUERY are removed since the messages are now defined consistently with the DISC-NG theory section. Cross-references to the theory document are added for the parameters table (Freturn, Flookup), admission control, waiting-time function, and lookup-response semantics.
…CQUERY The field carries log2 distances from the topic, not bucket indices. Aligning the spec terminology with FINDNODE's `distance` parameter naming makes the meaning unambiguous and matches what the implementation actually serializes (a slice of uint distances, used by the recipient to pick aux ENRs at those distances from the topic). No wire-encoding change — RLP is positional, so the field rename is documentation-only.
discv5-wire: align REGTOPIC, REGCONFIRMATION, TOPICQUERY with DISC-NG; add TOPICNODES
…lookup responses The Lookup Responses section says the registrar "may also return additional ENRs selected from its view of the service table" but doesn't specify how the selection is made. Add a recommended algorithm: when the wire-format request carries a list of topic-distances at which the requester's service table has free space, the registrar selects at most one ENR per requested distance from the corresponding bucket of its own B(s), up to an implementation-defined total cap. One-per-distance keeps responses compact and spreads coverage across the requester's free buckets rather than overrepresenting a single distance. Companion to the wire-spec definition of the topic-distance list in REGTOPIC and TOPICQUERY.
…cations discv5-theory: document topic-distance hint and split lookup/registration responses into matches + auxiliary
Added auxiliary ENR selection algorithm and refs to wire protocol messages
…inor fixes DISC-NG -> TopDisc. Ticket contents revised. Discovery V5 co-existence section updated to use correct terms (Discovery v5 when referring to the legacy discovery protocol).
This feature protects against a single ticket being used for multiple registrations of ads. Binding the ad itself to the ticket solves this problem. + Added a new sections Advertisements to explain what an ad object incluces (topic, enr) + adDigest included in the ticket which is signed by the registrar which binds the ticket to a single ad
…covery Removed topic index and content related to the old radius-based ad search, topic queues, etc.
removed absolute pointers with the full url
include topdisc-related introductory text and pointers
+ minor edits to security goals + added a rationale section header before questions/answers
Define enr-entries/topic-discovery.md for the TopDisc topic discovery capability, with version-tagged unsigned-integer value so future non-backwards-compatible revisions can bump in place. Cross-reference the new entry from the ENR known-keys table in enr.md and from the TopDisc Capability section of discv5-theory.md.
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.
No description provided.