Skip to content

Conversation

@ManuelBilbao
Copy link
Contributor

Motivation

Description

Closes #issue_number

ManuelBilbao and others added 7 commits October 27, 2025 15:54
**Motivation**

In a previous PR, DB checkpoints were introduced to ensure old state
availability in the current path-based fashion. Every time a batch is
sealed, a checkpoint whose state is the state of the latest block of the
sealed batch is created to be used in the next batch.

The checkpoint is needed in two different steps of the batch commitment:
for batch preparation (this is essentially building the batch) and for
witness generation. Both steps need a non-modified checkpoint, but they
both need to modify the checkpoint to be able to re-execute the batch.

As batch preparation occurs before witness generation, we opted to
create a one-time checkpoint out of the main checkpoint that can be
modified during batch preparation if needed (sometimes the batch was
already available in the DB, and there's no need to re-execute
anything); then, witness generation modifies the original checkpoint as
needed because it is no longer needed.

Once the one-time checkpoint fulfills its purpose, it is removed.
Currently, if batch preparation fails, the one-time checkpoint is not
removed, and after retrying batch preparation, there's another attempt
at creating the one-time checkpoint, which ends in an error because the
directory already exists. We need to either avoid creating the one-time
checkpoint again or to remove the existing one.

**Description**

Remove the existing one-time checkpoint if it already exists.

---------

Co-authored-by: avilagaston9 <[email protected]>
Co-authored-by: Gianbelinche <[email protected]>
Update the path to the SP1 VKs
**Motivation**

<!-- Why does this pull request exist? What are its goals? -->
OZ's upgrade tools require the variables to be set in initializers and
not in constructor/variable declaration. This should not be such a
problem as it will always be initialized as 0, but with this change we
avoid the tool error

**Description**

<!-- A clear and concise general description of the changes this PR
introduces -->

<!-- Link to issues: Resolves #111, Resolves #222 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants