ethberlinzwei / Bounties

Get rewards for your contributions
10 stars 10 forks source link

[BOUNTY] Community Improvement Bounty - libp2p - Noise handshake Golang and JavaScript implementation #17

Open raulk opened 5 years ago

raulk commented 5 years ago

libp2p Noise handshake Golang and JavaScript implementations

Hackers, roll your sleeves up and hack for a chance to win 3500 EUR! πŸ€‘

See devgrant 4 in the libp2p/devgrants tracker: https://github.com/libp2p/devgrants/issues/4

The bounty/devgrant brief can be found here: https://github.com/libp2p/devgrants/blob/master/004-noise-handshake-implementations.md.

The technical specification of noise-libp2p can be found here: https://github.com/libp2p/specs/tree/master/noise.

How to qualify

If you intend to work on this, speak to @raulk before you start for guidance, scope setting, and a walkthrough of the spec! It's simpler than it seems 🀞

Develop a go-libp2p-noise module for go-libp2p:

  1. adhering to the specification current working draft (see Resources below) – and –
  2. conforming to the SecureTransport interface.

Develop a js-libp2p-noise module for js-libp2p:

  1. adhering to the specification current working draft (see Resources below) – and –
  2. conforming to the interface-connection interfaces, in the same way that js-libp2p-secio does.

Make sure to include:

Submit a pull request to the Golang placeholder repo, and create a new repo for the JS implementation. Both to be licensed under ASLv2 and MIT, by way of the Permissive License Stack.

Resources

πŸ‘Ύ We have a spec, we have a spec, we have a spec! πŸ˜„ \o/

https://github.com/libp2p/specs/tree/master/noise

See https://github.com/ethberlinzwei/KnowledgeBase/blob/master/resources/libp2p.md for more context, and use @raulk as a walking encyclopedia for all things libp2p.

Judging Criteria

  1. Completeness, correctness, cleanliness and maintainability of code.
  2. Unit tests, integration tests.
  3. Documentation / code comments.
  4. It actually works, and you can demo it.

Prizes

  1. 1500 EUR via the Community Improvement Bounties fund.
  2. 1500 EUR via the Interchain Foundation.
  3. 500 EUR via Protocol Labs.
ebuchman commented 5 years ago

Another 1500 EUR is being offered by the ICF for this

mariapaulafn commented 5 years ago

Thanks so much ICF and @ebuchman <3 Note - The Community Improvement Bounties are funded by the ETHBerlin fundraising efforts - if your project needs these bounties to work better with libp2p - consider helping out (as our friends at ICF are doing) . High incentives make happy hackers.

wildmolasses commented 5 years ago

I've read the awesome spec (thanks @yusefnapora) and am considering working on this. @raulk, I'm going to find you this week to discuss! If you're a hackathon participant reading this and might like to hack together, I'm at @wildmolasses on twitter / telegram / github.

raulk commented 5 years ago

@wildmolasses cool. Let's coordinate with @noot who also wants to hack on this ;-) Given the extra incoming cash (thanks to @ebuchman and ICF, as well as some extra amount we'll chip in from PL), we want to expand the scope to add a javascript implementation.

raulk commented 5 years ago

Protocol Labs is chipping in an extra 500 EUR! (besides our sponsorship of ETHBerlinZwei) And given the extra incentives, we're expanding the scope to include a JS implementation too. We encourage this not to be a competitive effort. Find co-hackers and build a multi-lingual team to deliver both Go and JS!

πŸŽ‰

wildmolasses commented 5 years ago

hey @raulk, shall the js implementation be written with async/await instead of pull-streams? Thanks.

raulk commented 5 years ago

hey @raulk, shall the js implementation be written with async/await instead of pull-streams? Thanks.

@wildmolasses summoning @vasco-santos to answer this question, who will help out with js-libp2p from our end ;-)

vasco-santos commented 5 years ago

Hey @wildmolasses

Thanks for your interest in the js implementation!

We are currently on the way to migrate from pull-streams / callbacks to async iterators / async/await. However, considering the codebase in this context, js-libp2p-secio is not migrated yet and interface-connection is in a discussion stage for the new API.

In spite of being great to have it written with async, I believe that you would be more comfortable with an implementation with the same stage as js-libp2p-secio and interface-connection, as it can be immediately plugged in js-libp2p.

I think the ideal solution here would be to use pull-streams and the API callback based (as js-libp2p-secio), but using promisify-es6 for the API with the internal codebase already using promises. As a result, it will be really easy and straightforward to refactor this to the async iterators / async/await way. Also, tests can already be using the promise way.

Feel free to ping me with this :)

wildmolasses commented 5 years ago

Here's our devpost submission: go-libp2p-noise. Thanks so much for your help @vasco-santos and @raulk