-
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
[dag] broadcast CertifiedNodeMsg with LedgerInfo #9968
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
fab0ad8
to
6dd6796
Compare
a5d3321
to
89c4dec
Compare
@@ -151,12 +155,19 @@ impl DagDriver { | |||
let signature_builder = | |||
SignatureBuilder::new(node.metadata().clone(), self.epoch_state.clone()); | |||
let cert_ack_set = CertificateAckState::new(self.epoch_state.verifier.len()); | |||
let latest_ledger_info = self |
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.
carrying a db here is a bit ugly, I was thinking about caching one in the notifier adapter and rely on callback to update it, wdyt
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 we anyhow need the StorageAdapter here right? we can just use that instead. we can cache within the storage adapter if necessary?
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.
sounds better, just expose a function on the DAGStorage?
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.
LGTM
consensus/src/dag/dag_handler.rs
Outdated
@@ -92,7 +92,7 @@ impl NetworkHandler { | |||
.map(|r| r.into()), | |||
DAGMessage::CertifiedNodeMsg(node) => node | |||
.verify(&self.epoch_state.verifier) | |||
.and_then(|_| self.dag_driver.process(node)) | |||
.and_then(|_| self.dag_driver.process(node.certified_node())) |
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.
It is a bit confusing that the node has certified_node that has a node...
Maybe change the name of the variable?
89c4dec
to
1db0e3f
Compare
1db0e3f
to
a2a16b5
Compare
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.
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.
✅ Forge suite
|
✅ Forge suite
|
✅ Forge suite
|
Description
This PR enables broadcasting latest ledger info with the CertifiedNode for state syncing. It obtains the ledger info from the storage adapter.
Test Plan
Fixed unit tests.