Skip to content

feat: switch to dag-cbor adverts and entries#81

Open
alanshaw wants to merge 1 commit intomainfrom
ash/feat/switch-to-dag-cbor-ads-and-entries
Open

feat: switch to dag-cbor adverts and entries#81
alanshaw wants to merge 1 commit intomainfrom
ash/feat/switch-to-dag-cbor-ads-and-entries

Conversation

@alanshaw
Copy link
Member

@alanshaw alanshaw commented Feb 10, 2026

This PR switches the encoding for adverts and entries to dag-cbor. The chain head continues to be dag-json encoded 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-cbor encoded 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.

@alanshaw alanshaw requested a review from volmedo as a code owner February 10, 2026 14:46
@alanshaw alanshaw changed the title feat: switch to dag-cbor adverts and entries feat: switch to dag-cbor adverts and entries Feb 10, 2026
@alanshaw alanshaw requested a review from a team February 10, 2026 14:55
Copy link
Member

@volmedo volmedo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the ads not being as human-readable now can be mitigated by adding the appropriate command to debugger 🙂

@alanshaw
Copy link
Member Author

I guess the ads not being as human-readable now can be mitigated by adding the appropriate command to debugger 🙂

storacha/debugger@63a3cc6

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.

2 participants