Skip to content

Switch to raw multihashes in datastores #6815

@Stebalien

Description

@Stebalien

Part of #4143.

Currently, we store blocks by CID in the datastore. However, a single block can have multiple CIDs:

  • CIDv0/CIDv1 -- blocks created as cidv0 can be referenced with v1 CIDs
  • CIDv1-*/CIDv1-raw -- we can treat any block as a "raw" block
  • CIDv1-cbor/CIDv1-dag-cbor -- theoretically, we have non-"dag" versions of our codecs.

Plan:

TODO: put this in the right spot: ipfs/fs-repo-migrations#95


2021-12-02 context on why were' doing this:

  • Helps us to move towards CIDv1 by default
  • Deduplicates data that’s stored multiple times (e.g. as CIDv0, CIDv1-DAG-PB, CIDv1-Raw)
  • Removes the technical debt and tribal knowledge around the different interfaces used by go-ipfs and anything newer (lotus, venus, estuary, …)
    • Unlocks bigger refactors around blockstores going forward
  • Enables any pinning services backed by go-ipfs to serve content for unknown IPLD codecs
    • e.g. all those CAR files filled with Bitcoin blockchain data could be stored by services that don’t have the Bitcoin codec
    • Allows for greater experimentation from groups making their own codecs even before they land their codec in go-ipfs by default

Metadata

Metadata

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions