ConsenSysMesh / Stow-Smart-Contracts

Formerly Linnia-Smart-Contracts
https://stow-protocol.com/
MIT License
56 stars 39 forks source link

Hashes in data URIs are being stored as hex encoded strings #45

Closed libertylocked closed 6 years ago

libertylocked commented 6 years ago

Hash like 0x59742369c54039d5611d84452aa6c31b72da336b76ed4029b12c3dc5479836ba is stored as a literal string that starts with 0x, 66 bytes in total. inb4 they are 32 bytes

Also is 0x a legal data URI? Or 0x000000000000000000000000000000000000000000000000000000000000

libertylocked commented 6 years ago

also storage is quadrupled as it now requires 4 words to store a 32 byte hash

godfreyhobbs commented 6 years ago

This change is not needed at this point in the project. There is no need to optimize gas or storage until we are ready to go to mainnet, then we will likely use something like CID.