Ravencoin icon indicating copy to clipboard operation
Ravencoin copied to clipboard

Add bafy hashes as input metadata for Assets

Open corviato1 opened this issue 3 years ago • 6 comments

Please

corviato1 avatar Nov 22 '20 00:11 corviato1

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 0.1 ETH (54.07 USD @ $540.67/ETH) attached to it.

gitcoinbot avatar Nov 22 '20 00:11 gitcoinbot

Messaging / asset txes also support meta data.

Does this require a fork?

jeroz1 avatar Nov 22 '20 11:11 jeroz1

This would be ideal. Putting the below information in one place to show why this is a good idea.

It takes the version 0 Qm hash CID format as already supported by Ravencoin and allows ravencoin issuers to use the newer CID version 1 format to represent data. Plus the new version would automatically specify the decoding required.

When IPFS was first designed, they used base 58-encoded multihashes as the content identifiers. This is simpler but much less flexible than newer CIDs. CIDv0 is still used by default for many IPFS operations, so I wouldn't dream of removing Qm hashes from RVN. CID Version 0 and version 1 can simply refer the the same unique data after all.

If a CID is 46 characters starting with "Qm", it's a CIDv0 (for more details, check the decoding algorithm in the CID specification).

#Version 1 (v1) CID v1 contains some leading identifiers that clarify exactly which representation is used, along with the content-hash itself. These include:

  • A multibase prefix, specifying the encoding used for the remainder of the CID
  • A CID version identifier, which indicates which version of CID this is
  • A multicodec identifier, indicating the format of the target content — it helps people and software to know how to interpret that content after the content is fetched
  • These leading identifiers also provide forward-compatibility, supporting different formats to be used in future versions of CID.

You can use the first few bytes of the CID to interpret the remainder of the content address and know how to decode the content after being fetched from IPFS. For more details, check out the CID specification.

https://github.com/multiformats/cid

It includes a decoding algorithm and links to existing software implementations for decoding CIDs.

https://docs.ipfs.io/concepts/content-addressing/#identifier-formats

lsji07 avatar Jan 01 '21 12:01 lsji07

TLDR check the initial characters of the CID. If it starts with Qm, it's base58btc and is CIDv0. If it starts with b it's base32 and is CIDv1.

lsji07 avatar Jan 01 '21 12:01 lsji07

still need this done? i can submit a plan & start working on the issue

verbose-void avatar Feb 18 '21 08:02 verbose-void

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Workers have applied to start work.

These users each claimed they can complete the work by 265 years, 5 months from now. Please review their action plans below:

1) mehulkpr has applied to start work (Funders only: approve worker | reject worker).

proficient in C++. will help you with this if explained more about the issue

Learn more on the Gitcoin Issue Details page.

gitcoinbot avatar Jun 08 '21 14:06 gitcoinbot