Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

feat: switch to raw multihashes for blocks #18

Merged
merged 3 commits into from
Jan 31, 2020

Commits on Jan 7, 2020

  1. Configuration menu
    Copy the full SHA
    11890cc View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2020

  1. Remove DsKeyToCid() and CidToDsKey(). Add DsKeyToCidV1Raw()

    We are deprecating these functions as ipfs strives to store
    multihashes directly on the datastore, rather than CIDs.
    
    Thus multiple CIDs might map to the same multihash. Making this functions
    reflect that behaviour might cause silent breakage in users. We prefer loud
    breakage.
    
    Users using CidToDsKey(c) should move to MultihashToDsKey(c.Hash()).
    
    Users using DsKeyToCid() should move to DsKeyToCidV1Raw() or DsKeyToMultihash().
    
    Note that datastore should handle migrations to replace existing CID-encoded
    keys with raw multihashes, or preserve DsKeyToCid() and CidToDsKey() in their
    own codebases.
    hsanjuan committed Jan 31, 2020
    Configuration menu
    Copy the full SHA
    48143f3 View commit details
    Browse the repository at this point in the history
  2. Replace DsKeyToCidV1Raw() with DsKeyToCidV1()

    Allow passing in whatever codec type the user wants
    hsanjuan committed Jan 31, 2020
    Configuration menu
    Copy the full SHA
    0c9f4a7 View commit details
    Browse the repository at this point in the history