Skip to content

kad: expose API to save and restore local provider state across restarts#544

Open
WilliamNwoke wants to merge 1 commit intoparitytech:masterfrom
WilliamNwoke:kademlia_provider
Open

kad: expose API to save and restore local provider state across restarts#544
WilliamNwoke wants to merge 1 commit intoparitytech:masterfrom
WilliamNwoke:kademlia_provider

Conversation

@WilliamNwoke
Copy link
Copy Markdown

closes #493

Adds save/restore support for local Kademlia provider state to prevent full republish waves on node restart. Introduces KademliaHandle::resume_providing(key, quorum, next_refresh_at) to reinsert providers without immediately republishing and schedule refreshes based on the persisted next refresh time, and KademliaHandle::local_providers() to asynchronously retrieve a snapshot of active providers with their next scheduled refresh Instant for persistence before shutdown. This extends the store to track per-key refresh instants, adds corresponding commands and events (ResumeProviding, GetLocalProviders, LocalProviders), and wires them into the Kademlia event loop, enabling efficient restart behavior without unnecessary network traffic.

@dmitry-markin
Copy link
Copy Markdown
Collaborator

Hi @WilliamNwoke and thanks for looking into this! To understand the priority of reviewing, is this functionality something you need, or you are just fixing an issue in litep2p repo? Asking, because #493 is not high priority for Parity now.

@WilliamNwoke
Copy link
Copy Markdown
Author

Hi @WilliamNwoke and thanks for looking into this! To understand the priority of reviewing, is this functionality something you need, or you are just fixing an issue in litep2p repo? Asking, because #493 is not high priority for Parity now.

It caught my attention and I'm just trying to fix it. Are there any high priority issues for parity here please?

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.

Expose API to save/restore the state of Kademlia provider refresh

2 participants