-
Notifications
You must be signed in to change notification settings - Fork 971
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
fraud: add peer that sent an invalid fraud proof to black list #966
fraud: add peer that sent an invalid fraud proof to black list #966
Conversation
c14f5b1
to
dd7d034
Compare
4fe25b2
to
4c7e9f8
Compare
4c7e9f8
to
a7f1150
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
One last thing we should to care about is testing/mocking implementations of Proofs so that we can test network behaviours, like in this tests, without relying on a specific Proof type.
Yes, I agree. But let's make it in scope of separate PR. IMO, it's not related to this one. Will create and post here an issue. |
f470ec9
to
afc8e07
Compare
Codecov Report
@@ Coverage Diff @@
## main #966 +/- ##
==========================================
- Coverage 58.52% 58.50% -0.03%
==========================================
Files 131 132 +1
Lines 7766 7947 +181
==========================================
+ Hits 4545 4649 +104
- Misses 2747 2820 +73
- Partials 474 478 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
149fc1a
to
92071a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Further #971 should prettify things a bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks generally okay but I don't understand the reasoning behind adding the from peer.ID
param to the validator func instead of just getting the peer from the msg.ReceivedFrom
field -- what does this change?
Also need to go through tests - they are quite intense so i'm gonna do another pass through just for the test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the tests are quite long and hard to follow what's going on and why - it would be nice to clean them up a bit, reduce LOC as much as possible (for example, no need to define bServ
if it's only used in one place, just pass mdutils.Bserv()
directly as a param). The tests inside sync_test.go
are really nice to follow, for example.
|
Resolves #954