add filecoin commitment merkle root codecs

These describe roots & nodes of a merkle tree, not the underlying
data. In the case of CommP and CommD they are binary merkle trees
using sha2-256-trunc2. For CommR they are novel structure merkle
trees using poseidon-bls12_381-a2-fc1.

All nodes of the respective merkle trees could also be described
using this codec if required, all the way to base data. It is
anticipated that the primary use will be restricted to the roots.

Ref: https://github.com/multiformats/multicodec/pull/161
Closes: #161
Closes: #167
This commit is contained in:
Rod Vagg 2020-04-16 14:52:15 +10:00
parent 38ef2a3373
commit bf5c4806e7

View File

@ -432,6 +432,8 @@ skein1024-1016, multihash, 0xb3df,
skein1024-1024, multihash, 0xb3e0,
poseidon-bls12_381-a2-fc1, multihash, 0xb401, Poseidon using BLS12-381 and arity of 2 with Filecoin parameters
poseidon-bls12_381-a2-fc1-sc, multihash, 0xb402, Poseidon using BLS12-381 and arity of 2 with Filecoin parameters - high-security variant
fil-commitment-unsealed, filecoin, 0xf101, Filecoin piece or sector data commitment merkle node/root (CommP & CommD)
fil-commitment-sealed, filecoin, 0xf102, Filecoin sector data commitment merkle node/root - sealed and replicated (CommR)
holochain-adr-v0, holochain, 0x807124, Holochain v0 address + 8 R-S (63 x Base-32)
holochain-adr-v1, holochain, 0x817124, Holochain v1 address + 8 R-S (63 x Base-32)
holochain-key-v0, holochain, 0x947124, Holochain v0 public key + 8 R-S (63 x Base-32)

1 name tag code description
432 skein1024-1024 multihash 0xb3e0
433 poseidon-bls12_381-a2-fc1 multihash 0xb401 Poseidon using BLS12-381 and arity of 2 with Filecoin parameters
434 poseidon-bls12_381-a2-fc1-sc multihash 0xb402 Poseidon using BLS12-381 and arity of 2 with Filecoin parameters - high-security variant
435 fil-commitment-unsealed filecoin 0xf101 Filecoin piece or sector data commitment merkle node/root (CommP & CommD)
436 fil-commitment-sealed filecoin 0xf102 Filecoin sector data commitment merkle node/root - sealed and replicated (CommR)
437 holochain-adr-v0 holochain 0x807124 Holochain v0 address + 8 R-S (63 x Base-32)
438 holochain-adr-v1 holochain 0x817124 Holochain v1 address + 8 R-S (63 x Base-32)
439 holochain-key-v0 holochain 0x947124 Holochain v0 public key + 8 R-S (63 x Base-32)