-
Notifications
You must be signed in to change notification settings - Fork 33
Description
Currently the design specifies, and implementation uses, multihash for data security and immutability. It could be that the purpose of choosing multihash is to enable IPFS file storage (i.e. IPLD).
If data will be used on-chain then only the blockchain native hashing format will be useful, and it is unnecessary to specify a hash format and bit length. If a hash will be used off-chain then it doesn’t matter what format and bit length is used because the skeptic will verify the provided content offline.
Recommendation: IPFS compatibility (the design goal) should be explicitly mentioned every time that multihash (implementation detail) is introduced.
References:
- Multihash storage is two EVM words (versus one for a SHA-256 hash):
erasure-protocol/contracts/modules/MultiHashWrapper.sol
Lines 13 to 17 in 4a3d98c
struct MultiHash { bytes32 hash; uint8 hashFunction; uint8 digestSize; } - Design specifies multihash https://github.com/erasureprotocol/erasure-protocol/blob/4a3d98ce023a264a9f3c7ba62ef77a9207bba5fe/README.md#track-record-through-posts-and-feeds