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
P2P signing on direct send #4466
P2P signing on direct send #4466
Conversation
… the p2p network messenger - added exception in consensus interceptor to not allow messages without signature
Codecov ReportBase: 73.87% // Head: 73.94% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## feat/optimise-consensus-sigcheck #4466 +/- ##
====================================================================
+ Coverage 73.87% 73.94% +0.07%
====================================================================
Files 693 680 -13
Lines 88459 87154 -1305
====================================================================
- Hits 65349 64450 -899
+ Misses 18182 17887 -295
+ Partials 4928 4817 -111
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
buff, err := mes.Marshal() | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
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.
in libp2p there is the SignPrefix
that's being added, should we think about it here, while we construct the message?
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.
added
p2p/libp2p/directSender_test.go
Outdated
func TestNewDirectSender(t *testing.T) { | ||
t.Run("nil context", func(t *testing.T) { |
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.
t.Parallel() for main 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.
done in all tests
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.
no other comments
…irect-send # Conflicts: # p2p/libp2p/export_test.go # p2p/libp2p/netMessenger.go # p2p/libp2p/netMessenger_test.go
p2p/libp2p/directSender.go
Outdated
@@ -27,6 +27,8 @@ var _ p2p.DirectSender = (*directSender)(nil) | |||
|
|||
const timeSeenMessages = time.Second * 120 | |||
const maxMutexes = 10000 | |||
const signPrefix = "en-directsend:" |
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.
maybe use the same prefix as in libp2p so that we can treat broadcast and direct send messages similarly.
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.
fixed, reused pubsub.SignPrefix
3a50d66
Description of the reasoning behind the pull request (what feature was missing / how the problem was manifesting itself / what was the motive behind the refactoring)
Proposed Changes
Testing procedure