Skip to content

Commit bc45e87

Browse files
committed
fix: chunk block hash assertion
1 parent f41a99d commit bc45e87

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

crates/types/chunk/src/execute.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ pub fn execute(witness: ChunkWitness) -> Result<ChunkInfo, String> {
2828
},
2929
);
3030

31-
let state_commit_mode = witness.state_commit_mode.clone();
32-
println!("state_commit_mode: {:?}", state_commit_mode);
33-
3431
let VerifyResult {
3532
blocks,
3633
pre_state_root,
@@ -40,7 +37,6 @@ pub fn execute(witness: ChunkWitness) -> Result<ChunkInfo, String> {
4037
} = verifier::run(
4138
witness.blocks,
4239
chain_spec.clone(),
43-
state_commit_mode,
4440
Some(witness.compression_ratios.clone()),
4541
)
4642
.map_err(|e| format!("verify error: {e}"))?;

crates/types/chunk/src/witness.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use alloy_primitives::B256;
2+
#[allow(deprecated)]
23
use sbv_core::verifier::StateCommitMode;
34
use sbv_primitives::{U256, types::BlockWitness};
45
use std::collections::HashSet;
@@ -15,8 +16,6 @@ pub struct ChunkWitness {
1516
pub fork_name: ForkName,
1617
/// The compression ratios for each block in the chunk.
1718
pub compression_ratios: Vec<Vec<U256>>,
18-
/// The mode of state commitment for the chunk.
19-
pub state_commit_mode: StateCommitMode,
2019
}
2120

2221
/// The witness type accepted by the chunk-circuit.
@@ -40,6 +39,7 @@ pub struct LegacyChunkWitness {
4039
/// The compression ratios for each block in the chunk.
4140
pub compression_ratios: Vec<Vec<U256>>,
4241
/// The mode of state commitment for the chunk.
42+
#[allow(deprecated)]
4343
pub state_commit_mode: StateCommitMode,
4444
}
4545

@@ -89,7 +89,6 @@ impl ChunkWitness {
8989
prev_msg_queue_hash,
9090
fork_name,
9191
compression_ratios,
92-
state_commit_mode: StateCommitMode::Auto,
9392
}
9493
}
9594

@@ -129,7 +128,8 @@ impl From<ChunkWitness> for LegacyChunkWitness {
129128
prev_msg_queue_hash: value.prev_msg_queue_hash,
130129
fork_name: value.fork_name,
131130
compression_ratios: value.compression_ratios,
132-
state_commit_mode: value.state_commit_mode,
131+
#[allow(deprecated)]
132+
state_commit_mode: StateCommitMode::Auto,
133133
}
134134
}
135135
}

0 commit comments

Comments
 (0)