-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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] support for highest committed round and latest ledger info on bootstrap #10122
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
consensus/src/dag/adapter.rs
Outdated
pub struct OrderedNotifierAdapter { | ||
executor_channel: UnboundedSender<OrderedBlocks>, | ||
storage: Arc<dyn DAGStorage>, | ||
parent_block_info: Arc<RwLock<BlockInfo>>, | ||
highest_committed_anchor_round: Arc<RwLock<Round>>, |
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 can just use atomicu64 instead?
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.
But you still need the Arc because it is shared with state_sync_trigger, right?
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.
Okay, we needed to cache the ledger info as well, so I introduced LedgerInfoProvider
and a trait. New commit, lmk.
consensus/src/dag/adapter.rs
Outdated
pub struct OrderedNotifierAdapter { | ||
executor_channel: UnboundedSender<OrderedBlocks>, | ||
storage: Arc<dyn DAGStorage>, | ||
parent_block_info: Arc<RwLock<BlockInfo>>, | ||
highest_committed_anchor_round: Arc<RwLock<Round>>, |
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.
But you still need the Arc because it is shared with state_sync_trigger, right?
e7936ea
to
e3ff6a2
Compare
30a13f9
to
16677d7
Compare
71a1893
to
b43b70b
Compare
e3ff6a2
to
0a6989d
Compare
4e12b67
to
c596ce5
Compare
c596ce5
to
414ffff
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.
[dag] additional ledger info verification checks [dag] separate out highest committed round provider [dag] introduce a ledger info provider trait
414ffff
to
6baa45c
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.
✅ Forge suite
|
✅ Forge suite
|
✅ Forge suite
|
Description
This PR changes bootstrapper so that the correct latest ledger info is passed to all the DAG components. If the ledger info in storage ends the epoch, then a genesis ledger info is created and given to the different DAG components. Similarly, for the parent block info for the adapter.
Also, extracts the highest committed round from dag store and isolates it with Arc<RwLock<>>
Test Plan