Open
Conversation
dag-cbor adverts and entries
volmedo
approved these changes
Feb 10, 2026
Member
volmedo
left a comment
There was a problem hiding this comment.
I guess the ads not being as human-readable now can be mitigated by adding the appropriate command to debugger 🙂
Member
Author
|
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.
This PR switches the encoding for adverts and entries to
dag-cbor. The chainheadcontinues to bedag-jsonencoded by convention and due to the fact that there is no signal to determine the encoding in the word "head". Adverts and entries are both identified by CID, where the IPLD codec is specified so these can be switched.CBOR is a more compact encoding than JSON, the idea is that this should speed up chain ingestion due to having to transfer fewer bytes over the wire. This will also have a small impact on cost for egress and bandwidth.
The disadvantage is that the advert and entries are no longer as human readbale as they were before.
I have verified that the receiving end is able to use
dag-cborencoded adverts and entries. The following imports register the codec with the default registry, which is in turn used by the ingester's linksystem:https://github.com/ipni/go-libipni/blob/main/ingest/schema/types.go#L16-L18
This change should be safe to simply start using - there is no migration to perform.