-
Notifications
You must be signed in to change notification settings - Fork 61
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
[consensus] Concurrent Message Validation #614
base: main
Are you sure you want to change the base?
Conversation
return; | ||
} | ||
// Verify signature | ||
self.context.with_label("nullify").spawn({ |
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.
While I originally thought we should do this as a "stream wrapper", I found that the optimal approach was deep within consensus (after we filtered things we would otherwise never want to verify -> like useless notarization/finalization messages).
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.
This change isn't without tradeoffs, however. It is now possible that we may verify duplicate messages from the same user (whereas we otherwise would have updated the map upon successful processing) or verify unnecessary notarization/nullification/finalization messages (when we have already seen one).
This should only happen if messages are queued very close together but the point still stands.
@@ -268,8 +268,8 @@ impl<C: Element> Poly<C> { | |||
} | |||
|
|||
/// Returns the public key of the polynomial (constant term). | |||
pub fn public(public: &Public) -> group::Public { | |||
*public.constant() | |||
pub fn public(public: &Public) -> &group::Public { |
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 other places in the codebase, we now return a reference where it makes sense (leaving it up to the caller whether or not they should clone.
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## main #614 +/- ##
==========================================
+ Coverage 88.96% 89.01% +0.04%
==========================================
Files 137 137
Lines 35287 35418 +131
==========================================
+ Hits 31393 31526 +133
+ Misses 3894 3892 -2
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Related: #434