multiformats / multiformats/js-multiformats

Proposal: CID+Block=Multiblock

Open
#37 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status/ready
Dominant language
TypeScript
Stars
268
Forks
57
PR merge metrics
No merged PRs in 30d

Description

We already have multibase, multihash that all in nutshell are metada+data. We don not however have similar thing for blocks, so it becomes impossible to derive what codec to use to decode it.

In the past when I was working on https://github.com/gozala/ipdf/ I came up with cid+block thing that I called inline blocks, so that graphs could contain encrypted and concealed sub-graphs that would only reveal themselves to the key holder.

CAR format seems to also pair CID+blocks.

And this thread https://github.com/multiformats/js-multiformats/pull/36#issuecomment-694619835 I think also illustrates lack of such abstraction.

Ironically JS Block instance also contains CID+Block but when you encoded you can no longer decode it back without additionally providing 'codec' information.

I think if we do formalize such a building block it would allow for a nice and compos-able libraries around it.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing multibase and multihash abstractions, the linked CAR format specification, the JS Block reference, and the referenced js-multiformats discussion. Done means agreeing on and formalizing a CID+block abstraction that preserves enough codec information for decoding and supports composable libraries.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.