Skip to content

Conversation

@dmitry-markin
Copy link
Collaborator

@dmitry-markin dmitry-markin commented Sep 5, 2025

Track success of ADD_PROVIDER queries and emit AddProviderSuccess & QueryFailed events.

This PR adds tracking of the last stage of ADD_PROVIDER query: putting provider records to the target peers. Because libp2p spec doesn't have ADD_PROVIDER ACK messages, we track only that the requests were sent out to the target peers without errors. Quorum is respected when determining whether the query was successful or not.

Builds upon #430.

Copy link
Collaborator

@lexnv lexnv left a 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 🙏

Base automatically changed from dm-put-record-substream-tracking to master November 11, 2025 11:36
@dmitry-markin dmitry-markin merged commit 6780c26 into master Nov 11, 2025
8 checks passed
@dmitry-markin dmitry-markin deleted the dm-add-provider-success branch November 11, 2025 11:59
@github-project-automation github-project-automation bot moved this to Blocked ⛔️ in Networking Nov 11, 2025
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

Labels

None yet

Projects

Status: Blocked ⛔️

Development

Successfully merging this pull request may close these issues.

3 participants