Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add iroh-hashseq codec #347

Merged
merged 2 commits into from
Apr 29, 2024
Merged

Conversation

cameronfyfe
Copy link
Contributor

This adds a codec for hash sequence blobs used by Iroh.

Docs describing hash sequence blobs: https://iroh.computer/docs/layers/blobs#collections

@vmx
Copy link
Member

vmx commented Apr 25, 2024

To make sure I understand it correctly: This is a list of 32-byte long BLAKE3 hashes. One could say it's an IPLD Codec, as you could use it to build DAGs (you'd make CIDs with raw as Codec and blake3 as Multihash out of each hash).

What about giving it a more general name then, something like blake3-32-seq or so? Similar to what we've done at #343).

BTW: a maybe more permanent link to the spec is https://github.com/n0-computer/iroh.computer/blob/030f0b8104898327ca172ed5d1d84479d83208ad/src/app/docs/layers/blobs/page.mdx#collections

@cameronfyfe
Copy link
Contributor Author

Thanks for the quick response.

Yes, my mental map of the codec was mapping to list<link> with pre-defined hash/codec as you described.

I can see the argument for making it more general. What about just blake3-hashseq? I could see any variation of {blake3|blake3-32|blake3-256}{hashseq|seq} making sense but that's my first choice.

@vmx
Copy link
Member

vmx commented Apr 25, 2024

blake3-hashseq sounds good to me. @rvagg what do you think?

Copy link
Member

@rvagg rvagg left a comment

Choose a reason for hiding this comment

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

sgtm

@vmx vmx merged commit c954a78 into multiformats:master Apr 29, 2024
1 check passed
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.

3 participants