-
Notifications
You must be signed in to change notification settings - Fork 38
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
refactor(l2): handle not committed block #1192
Conversation
94a1a89
to
a195fe5
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.
LGTM. Left one comment.
The PR was converted into draft during the review.
crates/l2/proposer/prover_server.rs
Outdated
} | ||
Err(e) => { | ||
error!("Failed to send proof to block {block_number:#x}. Manual intervention required: {e}"); | ||
panic!("Failed to send proof to block {block_number:#x}. Manual intervention required: {e}"); |
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.
Instead of panicking here, let's just backoff, wait a while and try sending the transaction again. An error when sending the proof (or on any other request to the L1 for that matter) is something that can (and will) happen every now and then. Anywhere where we interact with L1 we should follow a pattern like this; retry after a little while, not panic.
Motivation
The
prover_server
was sending blocks to prove even if the block had not been committed. While this approach helped avoid keeping theprover
in an idle state, in practice, the prover is typically slower than the commitment process. Therefore, waiting for the block to be committed provides an additional safety measure.Description
prover_server
queries the OnChainProposer for thelastCommittedBlock
after receiving aRequest
from theprover_client
.require
statements of issue L2: Differentiaterequire
Errors in OnChainProposer Verification #1164 were added.Closes #1165
Closes #1164