Skip to content
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(l2): prover_server/proposer state in file #1046

Draft
wants to merge 140 commits into
base: main
Choose a base branch
from

Conversation

fborello-lambda
Copy link
Contributor

@fborello-lambda fborello-lambda commented Oct 31, 2024

Motivation

Since we need to keep track of each block's zkProof and account updates, a module for creating, reading, and deleting files may be helpful for saving the blocks' state to disk.

Description

Create the module crates/l2/utils/save_prover_state.rs. Which provides the basics to perform read/write operations to files based on the type of information/state we need to store.

At the moment there are two states: Vec<AccountUpdate> and the zkProof.

The structure is the one proposed in Issue #1042:

ethereum_rust_l2/
├── 1
│   ├── account_updates_1.json
│   └── proof_1.json
└── 2
    ├── account_updates_2.json
    └── proof_2.json

The path ethereun_rust_l2 is placed under the directories::ProjectDirs::data_local_dir() (docs).

Closes #1060
Related to #1042

@fborello-lambda fborello-lambda changed the base branch from l2/prover_save_state to main November 1, 2024 16:59
@fborello-lambda fborello-lambda changed the title feat(l2): prover_client state in file feat(l2): prover_server/proposer state in file Nov 1, 2024
@fborello-lambda fborello-lambda marked this pull request as ready for review November 4, 2024 18:52
@fborello-lambda fborello-lambda requested a review from a team as a code owner November 4, 2024 18:52
@jrchatruc jrchatruc marked this pull request as draft November 7, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

L2: (utils) save in-file module
2 participants