-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
At the moment, the "IPFS Hash" defined here: https://github.com/daostack/arc/blob/master/contracts/universalSchemes/ContributionReward.sol#L22 as bytes32
This is too small to contain the default IPFS hash. This stackoverflow answer explains it in detail https://ethereum.stackexchange.com/questions/17094/how-to-store-ipfs-hash-using-bytes (we need 34 bytes).
Note that this is only the defaut scheme for IPFS. In theory, ipfs supports different hashing schemes and variable hash lengths.
This is not just in theory. The current IPFS hashing scheme will be replaced: https://github.com/ipfs/ipfs/issues/337
So: bytes32 is no good. Two possible laternatives:
- if we want to use a fixed-length schema, we can use the trick from the stackoverflow question (but note that this is not completely future proof either)
- alternative, just make it a string and get it over with. We are not storing it in permanent storage anyway, so the costs argument is not so strong.
Metadata
Metadata
Assignees
Labels
No labels