-
Notifications
You must be signed in to change notification settings - Fork 26
kademlia: Track success of ADD_PROVIDER queries
#432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
+891
−91
Conversation
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
8 tasks
lexnv
reviewed
Sep 17, 2025
lexnv
reviewed
Sep 17, 2025
lexnv
reviewed
Sep 22, 2025
lexnv
approved these changes
Sep 22, 2025
Collaborator
lexnv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job here! The changes look solid to me!
Just a tiny bit more testing on the kusama validators and we are good to go and include them in a litep2p release 🙏
dmitry-markin
added a commit
that referenced
this pull request
Nov 11, 2025
## [0.12.0] - 2025-11-11 This release adds `KademliaEvent::PutRecordSuccess` & `KademliaEvent::AddProviderSuccess` events to Kademlia, allowing to track whether publishing a record or a provider was successfull. While `PutRecordSuccess` was present in the previous versions of litep2p, it was actually never emitted. Note that `AddProviderSuccess` and `QueryFailed` are also generated during automatic provider refresh, so those may be emitted for `QueryId`s not known to the client code. ### Added - kademlia: Track success of `ADD_PROVIDER` queries ([#432](#432)) - kademlia: Workaround for dealing with not implemented `PUT_VALUE` ACKs ([#430](#430)) - kademlia: Track success of `PUT_VALUE` queries ([#427](#427)) ### Fixed - Identify: gracefully close substream after sending payload ([#466](#466)) - fix: transport context polling order ([#456](#456)) ### Changed - refactor: implement builder pattern for TransportManager ([#453](#453))
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.
Track success of
ADD_PROVIDERqueries and emitAddProviderSuccess&QueryFailedevents.This PR adds tracking of the last stage of
ADD_PROVIDERquery: putting provider records to the target peers. Because libp2p spec doesn't haveADD_PROVIDERACK messages, we track only that the requests were sent out to the target peers without errors.Quorumis respected when determining whether the query was successful or not.Builds upon #430.