-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix/checkpoint verification in CL STF #730
Conversation
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## main #730 +/- ##
==========================================
- Coverage 54.90% 54.79% -0.11%
==========================================
Files 321 322 +1
Lines 35826 35961 +135
==========================================
+ Hits 19669 19704 +35
- Misses 16157 16257 +100
... and 21 files with indirect coverage changes 🚀 New features to boost your workflow:
|
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.
A couple of comments.
Commit: d6a005e SP1 Execution Results
|
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.
ACK ca0fc41
if receipt.proof().is_empty() { | ||
warn!(%ckpt_epoch, "Empty proof posted"); | ||
// If the proof is empty but empty proofs are not allowed, this will fail. | ||
if !params.proof_publish_mode.allow_empty() { | ||
error!(%ckpt_epoch, "Invalid checkpoint: Empty proof"); | ||
return Err(TsnError::InvalidProof); | ||
} | ||
} else { | ||
// Otherwise, verify the non-empty proof. | ||
verify_rollup_groth16_proof_receipt(&receipt, ¶ms.rollup_vk) | ||
.map_err(|e| TsnError::InvalidProof)?; | ||
} |
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 just realized that this returning an error means if a sequencer publishes an invalid checkpoint then we can never produce a new block after we receive it (without rolling back L1), since this will always fail the state transition. We should just disregard it (and print an error/warning).
Description
Type of Change
Notes to Reviewers
Checklist
Related Issues