Hey guys, I would like to propose to use base58 to output the service hash instead of the current base16 (hex).
base58 is used by Bitcoin and IPFS.
base16 (with 0x prefix) is used by Ethereum.
base58 is shorter than base16. 44 characters vs 64.
The same value represented in both way:
The marketplace url will look like:
mesg://marketplace/service/GR6XPNNvBrUth247vLXZ686gk7hGdx33sW14vsWekiAT // instead of mesg://marketplace/service/a07d866879f3c08676b8a7e2a86de5ddc21d0f53b0cecec62c4c04a86b017f39
In the core,
hash is a string, so there is no difference to use a base58. (but actually
hash should be of type
byte and transformed to a string when outputted).
The only counterargument is in the marketplace smart contract, hash is represent as a bytes32 that is compatible with string that start with
0x follow by the base16 value (eg:
But as most of the data of the marketplace are already transformed to there base16 representation, it will follow the same pattern: sid, manifest url, manifest protocol (everything that’s not a number) are already encoded / decoded from ascii to hex in the service marketplace.
Base58 value can be super easily encoded to base16 for the marketplace smart contract on ethereum by the marketplace service.
Let’s me know what you think