Skip to content

Commit 1142cf6

Browse files
Zekun Lizekun000
authored andcommitted
[replay] make paranoid check configurable
1 parent ac4e5f5 commit 1142cf6

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

storage/db-tool/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ aptos-storage-interface = { workspace = true }
2525
aptos-temppath = { workspace = true }
2626
aptos-types = { workspace = true }
2727
aptos-vm = { workspace = true }
28+
aptos-vm-environment = { workspace = true }
2829
bcs = { workspace = true }
2930
clap = { workspace = true }
3031
itertools = { workspace = true }

storage/db-tool/src/replay_on_archive.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use aptos_types::{
2323
write_set::WriteSet,
2424
};
2525
use aptos_vm::{aptos_vm::AptosVMBlockExecutor, AptosVM, VMBlockExecutor};
26+
use aptos_vm_environment::prod_configs::set_paranoid_type_checks;
2627
use clap::Parser;
2728
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
2829
use std::{
@@ -72,6 +73,13 @@ pub struct Opt {
7273
help = "The maximum time in seconds to wait for each transaction replay"
7374
)]
7475
pub timeout_secs: Option<u64>,
76+
77+
#[clap(
78+
long,
79+
default_value_t = false,
80+
help = "Enable paranoid type checks in the Move VM"
81+
)]
82+
pub paranoid_type_checks: bool,
7583
}
7684

7785
impl Opt {
@@ -170,6 +178,7 @@ impl Verifier {
170178
// calculate a valid start and limit
171179
let (start, limit) =
172180
Self::get_start_and_limit(&arc_db, config.start_version, config.end_version)?;
181+
set_paranoid_type_checks(config.paranoid_type_checks);
173182
info!(
174183
start_version = start,
175184
limit = limit,

0 commit comments

Comments
 (0)