-
Notifications
You must be signed in to change notification settings - Fork 66
chore(l2): remove save state module #3119
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
base: l2/remove_execute_cache
Are you sure you want to change the base?
Conversation
5d03964
to
f26f67a
Compare
Lines of code reportTotal lines added: Detailed view
|
// Check if we have a proof for this batch and prover type | ||
let prover_type = batch_proof.prover_type(); | ||
if state | ||
.rollup_store | ||
.get_proof_by_batch_and_type(batch_number, prover_type) | ||
.await? | ||
.is_some() | ||
{ | ||
info!( | ||
?batch_number, | ||
?prover_type, | ||
"A proof was received for a batch and type that is already stored" | ||
); | ||
} else { | ||
write_state(batch_number, &StateType::BatchProof(batch_proof))?; | ||
// If not, store it | ||
state | ||
.rollup_store | ||
.store_proof_by_batch_and_type(batch_number, prover_type, batch_proof) | ||
.await?; |
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.
This is just a question but is there any reason to not overwrite the proof with the new one we receive instead of checking if we already have one
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 don't think so, both options are as valid, and this was the behavior before my changes
1e7b0ee
to
5356d00
Compare
Motivation
The save state module was unnecessarily complex for what it achieved (storing incoming batch proofs). This PR replaces it with the rollup store.
Description
ethex-l2-common
becauseethrex-storage-rollup
can't depend on the prover because of cyclic dependenciesValue
type intoethrex-l2-common
becauseethrex-l2-common
can't depend onethrex-sdk