General-grants-program: Create a re-usable Substrate IPFS runtime module

Created on 11 Jun 2019  Â·  32Comments  Â·  Source: w3f/General-Grants-Program

The goal of this task is to create a Substrate runtime module that will be used for integrating any Substrate runtime with IPFS as the storage component.
The runtime module should contain utility functions and types for interacting with the IPFS multi-hash standard. It should be reusable and provide a nice interface similar to the already existing Balances module. The end result should be a minimal but feature complete runtime module which will facilitate the storing of IPFS content hashes on a Substrate chain into a registry and retrieving these hashes. The module should be able to be used from other modules to use the IPFS registry as needed.

An example of the end user flow would be for the current Substratekitties example to be able to import this IPFS module, add a new field for metadata on the kitty, and then allow for input of IPFS hashes into the registry and retrieval thereof with minimal addition to already existing code. The module should have a detailed README that details how someone would do this.

Bounty Bounty-s

Most helpful comment

@sivo4kin do you still plan to try this one?

yes. starting to configure environment

All 32 comments

For clarification: You don't want to verify any content against these hashes and you don't want to retrieve anything from an ipfs client.
If so, why not just store IPFS hashes as a Vec<u8>?

It is not clear to me what exactly you'd like to do that needs actual multi-hash representation. Should a substrate-worker be able to retrieve contents from IPFS and verify content against the multi-hash?

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


__This issue now has a funding of 150.0 DAI (150.0 USD @ $1.0/DAI) attached to it.__

Hey @brenzi you're right that multihash verification would be an important part of this module. The substrate-worker use case is an excellent example of how this module would be used and I think that this module should be compatible with that but not dependent on it. It should be general enough for users of the module to create their own logic around fetching the content and hash and being able to verify it or store it in a registry on-chain.

Also, the module should be able to determine the hash function used for creating the content address and adapt accordingly.

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 11 months, 3 weeks from now.
Please review their action plans below:

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

Writing here to express intention implementing new feature. Will return with questions after deploying local dev environment for substrate.

Learn more on the Gitcoin Issue Details page.

@sivo4kin look forward to the questions upon deployment. We're here to help!

@sivo4kin do you still plan to try this one?

This bounty is still open for applicants

@sivo4kin do you still plan to try this one?

yes. starting to configure environment

@sivo4kin - I would love to help out with this if you could use some more eyes and hands.

any update on it. if the issue is open, i can working on it.

don't know this bounty is alive? anyone can give some feedback?

@mlnck yup all good!

@mlnck Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@gitcoinbot replying back.
@Web3Foundation gave the official acceptance 2 days ago.

So I have kicked this into high gear and should have the work submitted by the weekend. Thanks!

@mlnck Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@Web3Foundation, if possible i would like to work on this issue

@mlnck Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

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


@mlnck due to inactivity, we have escalated this issue to Gitcoin's moderation team. Let us know if you believe this has been done in error!

  • [x] reminder (3 days)
  • [x] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

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


@mlnck due to inactivity, we have escalated this issue to Gitcoin's moderation team. Let us know if you believe this has been done in error!

  • [x] reminder (3 days)
  • [x] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@mlnck never heard back from you; are you still working on this one?

@Web3Foundation Sincerest apologies... C-19 disrupted a lot. I'm about 80% finished and this week everything with the Full Time job seems to be stabilizing. Is it ok if I finalize it over the weekend? And if for any reason I'm unable to I'll remove myself from the ticket.

@mlnck no problem at all, take your time if you're still looking into it; will be glad to see where you got!

Hi, is this bounty still open? thanks!

@whalelephant it is / was; as @mlnck didn't ever comment back; you're able to apply now.

Just to clarify the scope after reading the above comments, would be great to get feedback @Web3Foundation

  • the ipfs registry pallet will allow for the storing and retrieval (by CID?) of the content hashes but will not verify them
  • there will be some function identifying the different hash functions with the fn code

@whalelephant and others, I have prepared a little document that I hope will answer some of your questions. Please feel free to contact me if there's anything else I can do to help!

Hi @danforbes. That is helpful, although I don't think that at the moment the ipld rust lib can generate CID in no_std for the wasm build of the runtime. If we can return the CID from the offchain-worker for the scope it would be more feasible. Do let me know if my understanding is correct. thanks!

@whalelephant - great question...I didn't even know what IPLD was :rocket: How difficult would it be for you to reproduce this behavior in a no_std environment that _can_ be included in a Wasm runtime? @lsaether - are we able to adjust our acceptance criteria a bit if implementing the CID calculation in a no_std environment proves to be too challenging?

hi, for another bounty actually I have forked couple of repos to compile to no_std. I have not used offchain workers before so if you guys still want to have this I am keen to try it out.

I think this is still something we'd be interested in supporting. @lsaether can you please confirm?

Yes the bounty is still open @whalelephant. Keep us updated on your progress!

Great to see progress on this! https://rs-ipfs.github.io/offchain-ipfs-manual/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EdwardAThomson picture EdwardAThomson  Â·  16Comments

EdwardAThomson picture EdwardAThomson  Â·  9Comments

EdwardAThomson picture EdwardAThomson  Â·  23Comments

jplatts12 picture jplatts12  Â·  6Comments

EdwardAThomson picture EdwardAThomson  Â·  17Comments