fix(kademlia): align DHT message and provider limits for interop#2788
Queued
richard-ramos wants to merge 2 commits into
Queued
fix(kademlia): align DHT message and provider limits for interop#2788richard-ramos wants to merge 2 commits into
richard-ramos wants to merge 2 commits into
Conversation
vladopajic
approved these changes
Jul 8, 2026
gmelodie
approved these changes
Jul 8, 2026
Any commits made after this event will not be merged.
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.
Summary
Raises the Kademlia RPC frame limit from 4 KiB to 4 MiB so larger
/ipfs/kad/1.0.0responses, such as peer lists with multiple multiaddrs, are not rejected before decoding.Also updates the default provider record expiration interval to 48 hours and keeps stored value records independently bounded by
DefaultMaxValueSize.Service discovery now uses its own
ServiceDiscoveryMaxMsgSizeconstant, preserving the existing 4 KiB limit for those extension messages instead of inheriting the larger Kademlia RPC cap.Affected Areas
Peer Management / Discovery
Protocol Logic
Impact on Library Users
Kademlia nodes can accept larger DHT replies from go-libp2p DHT peers. Provider records are retained for 48 hours by default instead of 30 minutes.
No API migration is required for existing users.
Risk Assessment
The larger Kademlia read cap increases the maximum accepted RPC frame size. Stored value records remain separately limited by
DefaultMaxValueSize, and service discovery keeps its previous 4 KiB cap.References