-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat(consensus): update sync when decision_reached #2925
Conversation
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @asmaastarkware)
crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs
line 346 at r1 (raw file):
.decision_reached(DecisionReachedInput { proposal_id }) .await .unwrap()
expect
Code quote:
.unwrap()
crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs
line 365 at r1 (raw file):
.await .expect("Failed to add new block.") });
Suggestion:
let transaction_hashes =
transactions.iter().map(|tx| tx.tx_hash()).collect::<Vec<TransactionHash>>();
let sync_block =
SyncBlock { block_number: BlockNumber(height), state_diff, transaction_hashes };
let state_sync_client = self.state_sync_client.clone();
// `add_new_block` returns immediately, it doesn't wait for sync to fully process the block.
state_sync_client
.add_new_block(BlockNumber(height), sync_block)
.await
.expect("Failed to add new block.");
1ca198e
to
a4bd794
Compare
3567937
to
bdf3383
Compare
Artifacts upload workflows: |
39684f3
to
9477a68
Compare
4b5235f
to
748c777
Compare
748c777
to
f29b499
Compare
f29b499
to
8f5e8e7
Compare
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.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @asmaastarkware)
No description provided.