-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
jwk #4: jwk update quorum certification #11857
Conversation
1c7a9b9
to
b019753
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #11857 +/- ##
=========================================
- Coverage 70.1% 69.9% -0.3%
=========================================
Files 2182 2187 +5
Lines 414855 413937 -918
=========================================
- Hits 291207 289676 -1531
- Misses 123648 124261 +613 ☔ View full report in Codecov by Sentry. |
) -> AbortHandle; | ||
} | ||
|
||
pub struct RealCertifiedUpdateProducer { |
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.
nit: update the naming convention, trait starts with T, and struct removes Real
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
/// Once invoked by `JWKConsensusManager` to `start_produce`, | ||
/// it starts producing a `QuorumCertifiedUpdate` and returns an abort handle. | ||
/// Once an `QuorumCertifiedUpdate` is available, it is sent back via a channel given earlier. | ||
pub trait CertifiedUpdateProducer: Send + Sync { |
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.
I'd just call it UpdateCertifier
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
&self, | ||
epoch_state: Arc<EpochState>, | ||
payload: ProviderJWKs, | ||
qc_update_tx: Option<aptos_channel::Sender<(), QuorumCertifiedUpdate>>, |
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.
why this is Option?
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.
doesn't have to, fixed
"adding peer observation failed with mismatched view" | ||
); | ||
|
||
// Verify the quorum-cert. |
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 is to verify the signature not the quorum cert?
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.
i thought they are the same thing..
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.
quorum cert is a 2f+1 aggregate signature, here's a single signature?
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.
ah that's true.
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
|
||
// All checks passed. Aggregating. | ||
aggregator.contributors.insert(sender); | ||
let new_multi_sig = if let Some(existing) = aggregator.multi_sig.take() { |
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 looks weird, we have a PartialSignatures for building it
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
type Message = ObservedUpdateRequest; | ||
type Response = ObservedUpdateResponse; | ||
|
||
fn add( |
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.
I think the reliable broadcast may panic, if a validator has a different observation than anyone else? If the rb receives all response but does not aggregate it will panic.
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.
For fixes, either rb keeps fetching if the response is different than mine, or allow aggregation to fail and return None. In the later case the validator needs to retry rb to fetch again. Let's discuss what is better.
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.
NVM, I saw you already did the first one.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
{ | ||
return Ok(None); | ||
} | ||
let multi_sig = Signature::aggregate( |
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.
there's a verifier.aggregate_signature function
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
Description
Test Plan