Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
raulk opened this issue Aug 18, 2019 · 9 comments

Comments

@raulk
Copy link

raulk commented Aug 18, 2019

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: libp2p/devgrants#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:

  • unit tests.
  • integration tests (start two libp2p nodes with the noise handshake – libp2p.New() – and assert they can communicate).

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
Copy link

Another 1500 EUR is being offered by the ICF for this

@mariapaulafn
Copy link

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
Copy link

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
Copy link
Author

raulk commented Aug 20, 2019

@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 raulk changed the title [BOUNTY] Community Improvement Bounty - libp2p - Noise handshake go implementation [BOUNTY] Community Improvement Bounty - libp2p - Noise handshake Golang and JavaScript implementation Aug 21, 2019
@raulk
Copy link
Author

raulk commented Aug 21, 2019

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
Copy link

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

@raulk
Copy link
Author

raulk commented Aug 22, 2019

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
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants