centrifuge / pod

Go implementation of Centrifuge POD (Private Off-chain Data) node
https://docs.centrifuge.io/build/p2p-node/
MIT License
77 stars 35 forks source link

Incorrect Protocol Messages Testcases #837

Open lucasvo opened 5 years ago

lucasvo commented 5 years ago

This ticket is to implement four testcases with our testworld p2p simulation frame work.

Refer testworld/README.md for env setup and a small guide on how to run. testworld/park_test.go is a good starting point for any other tests you define. Copy it and define a file called incorrect_proto_test.go for your tests. Refer to #438 and the related PR to see how this can be achieved. Oskar a new node has to be defined which is not necessarily evil but has some tendency to create incorrect messages ;)

This issue has a gitcoin bounty attached to it. If you'd like to start working on it, feel free to reach out to me (lucas@centrifuge.io) directly, join our slack channel #bounties on our slack.

gitcoinbot commented 5 years ago

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


This issue now has a funding of 140.0 DAI (140.0 USD @ $1.0/DAI) attached to it as part of the Centrifuge fund.

montanaflynn commented 5 years ago

Can you point me in the right direction regarding what types / methods I could use to complete this issue? I'm a little confused as to how to even send a message between the nodes.

lucasvo commented 5 years ago

The server side is implemented here: https://github.com/centrifuge/go-centrifuge/blob/develop/p2p/receiver/handler.go#L186 and the client is implemented here: https://github.com/centrifuge/go-centrifuge/blob/develop/p2p/client.go#L216

You'd have to mock the client so you can send a header that specifies an incompatible version. If you follow the client you should see how the header is constructed and how that can be achieved.

montanaflynn commented 5 years ago

@lucasvo thanks for pointing me in the right direction!

gitcoinbot commented 5 years ago

@montanaflynn 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!

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

gitcoinbot commented 5 years ago

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


@montanaflynn 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!

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

gitcoinbot commented 5 years ago

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


Work has been started.

These users each claimed they can complete the work by 2 months, 2 weeks ago. Please review their action plans below:

1) haritha-j has been approved to start work.

Steps for completing the task -

  1. Get access to the messenger interface of the peer.
  2. Write modified methods to prepare p2p envelopes and get message signatures.
  3. write test cases for each of the 4 scenarios by calling the above methods with incorrect inputs.

Learn more on the Gitcoin Issue Details page.

gitcoinbot commented 5 years ago

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


Work for 140.0 DAI (140.0 USD @ $1.0/DAI) has been submitted by:

  1. @haritha-j

@lucasvo please take a look at the submitted work: