Skip to content

Commit

Permalink
Fix proving
Browse files Browse the repository at this point in the history
  • Loading branch information
rakanalh committed Jul 14, 2024
1 parent 541631f commit 7d1a679
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions crates/prover/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,13 +353,11 @@ where

let batch_receipt = data_to_commit.batch_receipts()[0].clone();

let signed_soft_confirmation: SignedSoftConfirmationBatch = soft_batch.clone().into();

let soft_batch_receipt = SoftBatchReceipt::<_, _, Da::Spec> {
state_root: next_state_root.as_ref().to_vec(),
phantom_data: PhantomData::<u64>,
hash: signed_soft_confirmation.hash(),
prev_hash: signed_soft_confirmation.prev_hash(),
hash: soft_batch.hash,
prev_hash: soft_batch.prev_hash,
da_slot_hash: current_l1_block.header().hash(),
da_slot_height: current_l1_block.header().height(),
da_slot_txs_commitment: current_l1_block.header().txs_commitment(),
Expand Down Expand Up @@ -475,7 +473,14 @@ where
.ledger_db
.get_l2_state_root::<Stf::StateRoot>(first_l2_height_of_l1 - 1)?
.expect("There should be a state root");
let initial_batch_hash = self.batch_hash;
let initial_batch_hash = self
.ledger_db
.get_soft_batch_by_number(&BatchNumber(first_l2_height_of_l1))?
.ok_or(anyhow!(
"Could not find soft batch at height {}",
first_l2_height_of_l1
))?
.prev_hash;

let final_state_root = self
.ledger_db
Expand Down

0 comments on commit 7d1a679

Please sign in to comment.