This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
forked from matter-labs/zksync-era
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(vm-runner): add config value for the first processed batch (matte…
…r-labs#2158) ## What ❔ Adds a new config value that regulate which batch to consider as the last processed on a fresh start. Also renames config values to be more idiomatic due to several from DevOps and other people :) ## Why ❔ We don't want to wait half a year for VM to process all testnet/mainnet batches. ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [x] Documentation comments have been added / updated. - [x] Code has been formatted via `zk fmt` and `zk lint`. - [x] Spellcheck has been run via `zk spellcheck`.
- Loading branch information
Showing
9 changed files
with
47 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
use serde::Deserialize; | ||
use zksync_basic_types::L1BatchNumber; | ||
|
||
#[derive(Debug, Deserialize, Clone, PartialEq, Default)] | ||
pub struct ProtectiveReadsWriterConfig { | ||
/// Path to the RocksDB data directory that serves state cache. | ||
#[serde(default = "ProtectiveReadsWriterConfig::default_protective_reads_db_path")] | ||
pub protective_reads_db_path: String, | ||
#[serde(default = "ProtectiveReadsWriterConfig::default_db_path")] | ||
pub db_path: String, | ||
/// How many max batches should be processed at the same time. | ||
pub protective_reads_window_size: u32, | ||
pub window_size: u32, | ||
/// All batches before this one (inclusive) are always considered to be processed. | ||
pub first_processed_batch: L1BatchNumber, | ||
} | ||
|
||
impl ProtectiveReadsWriterConfig { | ||
fn default_protective_reads_db_path() -> String { | ||
fn default_db_path() -> String { | ||
"./db/protective_reads_writer".to_owned() | ||
} | ||
} |
8 changes: 5 additions & 3 deletions
8
...125cf30578457040c14fd6882c73a87fb3d6.json → ...3edbf31a923e7a45a431267e1bd9fc67b47b.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters