Skip to content

Commit 02c9360

Browse files
committed
fix issue in guest rc.6
1 parent 467d5f8 commit 02c9360

File tree

4 files changed

+25
-38
lines changed

4 files changed

+25
-38
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ edition = "2021"
1414
homepage = "https://scroll.io"
1515
readme = "README.md"
1616
repository = "https://github.com/scroll-tech/scroll"
17-
version = "4.5.47"
17+
version = "4.6.3"
1818

1919
[workspace.dependencies]
2020
scroll-zkvm-prover = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "360f364" }

crates/libzkp/src/tasks/batch.rs

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use scroll_zkvm_types::{
77
BatchHeaderValidium, BatchInfo, BatchWitness, Envelope, EnvelopeV6, EnvelopeV7, EnvelopeV8,
88
LegacyBatchWitness, ReferenceHeader, N_BLOB_BYTES,
99
},
10+
chunk::ChunkInfo,
1011
public_inputs::{ForkName, Version},
1112
task::ProvingTask,
1213
utils::{to_rkyv_bytes, RancorError},
@@ -234,15 +235,28 @@ impl BatchProvingTask {
234235
}
235236
};
236237

238+
// patch: ensure block_hash field is ZERO for scroll domain
239+
let chunk_infos = self
240+
.chunk_proofs
241+
.iter()
242+
.map(|p|
243+
if version.domain == Domain::Scroll {
244+
ChunkInfo {
245+
prev_blockhash: B256::ZERO,
246+
post_blockhash: B256::ZERO,
247+
..p.metadata.chunk_info.clone()
248+
}
249+
} else {
250+
p.metadata.chunk_info.clone()
251+
}
252+
).collect();
253+
254+
237255
BatchWitness {
238256
version: version.as_version_byte(),
239257
fork_name: version.fork,
240258
chunk_proofs: self.chunk_proofs.iter().map(|proof| proof.into()).collect(),
241-
chunk_infos: self
242-
.chunk_proofs
243-
.iter()
244-
.map(|p| p.metadata.chunk_info.clone())
245-
.collect(),
259+
chunk_infos,
246260
blob_bytes: self.blob_bytes.clone(),
247261
reference_header,
248262
point_eval_witness,

crates/libzkp/src/tasks/chunk.rs

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -33,34 +33,7 @@ impl TryFromWithInterpreter<ChunkTask> for ChunkProvingTask {
3333
) -> Result<Self> {
3434
let mut block_witnesses = Vec::new();
3535
for block_hash in value.block_hashes {
36-
let mut witness =
37-
interpreter.try_fetch_block_witness(block_hash, block_witnesses.last())?;
38-
if witness.header.number == 1 {
39-
use std::str::FromStr;
40-
let hacked_state_root = match witness.chain_id {
41-
// cloak-xen-sequencer.sepolia
42-
5343513301 => Some(B256::from_str(
43-
"0x0711f02d6f85b0597c4705298e01ee27159fdd8bd8bdeda670ae8b9073091246",
44-
)?),
45-
// cloak-etherfi-sequencer.sepolia
46-
5343513302 => Some(B256::from_str(
47-
"0x7b44ea23770dda8810801779eb6847d56be0399e35de7c56465ccf8b7578ddf6",
48-
)?),
49-
// cloak-shiga-sequencer.sepolia
50-
5343513303 => Some(B256::from_str(
51-
"0x05973227854ac82c22f164ed3d4510b7df516a0eecdfd9bed5f2446efc9994b9",
52-
)?),
53-
// cloak-xen-sequencer.mainnet
54-
5343523301 => Some(B256::from_str(
55-
"0x8da1aaf41660ddf7870ab5ff4f6a3ab4b2e652568d341ede87ada56aad5fb097",
56-
)?),
57-
_ => None,
58-
};
59-
if let Some(hacked_state_root) = hacked_state_root {
60-
witness.prev_state_root = hacked_state_root;
61-
tracing::warn!("hack genesis state root {:?} for cloak testnet to work around a wrong gensis configuration", witness.prev_state_root);
62-
}
63-
}
36+
let witness = interpreter.try_fetch_block_witness(block_hash, block_witnesses.last())?;
6437
block_witnesses.push(witness);
6538
}
6639

0 commit comments

Comments
 (0)