Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions fault-proof/src/proposer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -913,8 +913,8 @@ where
tracing::info!("Attempting to prove game {:?}", game_address);

let game = OPSuccinctFaultDisputeGame::new(game_address, self.l1_provider.clone());
let l1_head_hash = game.l1Head().call().await?.0;
tracing::debug!("L1 head hash: {:?}", hex::encode(l1_head_hash));
let l1_head_hash: B256 = game.l1Head().call().await?.0.into();
tracing::debug!("L1 head hash: {:?}", l1_head_hash);

let ranges = self
.config
Expand All @@ -928,7 +928,7 @@ where
let this = self.clone();
async move {
tracing::info!("Generating Range Proof for blocks {start} to {end}");
let sp1_stdin = this.range_proof_stdin(start, end, l1_head_hash.into()).await?;
let sp1_stdin = this.range_proof_stdin(start, end).await?;
let (range_proof, inst_cycles, sp1_gas) =
this.prover.generate_range_proof(&sp1_stdin).await?;
Ok::<_, anyhow::Error>((idx, range_proof, inst_cycles, sp1_gas))
Expand Down Expand Up @@ -976,9 +976,7 @@ where
})
.collect::<Result<Vec<_>>>()?;

let latest_l1_head = boot_infos.last().context("No boot infos generated")?.l1Head;

let headers = match self.fetcher.get_header_preimages(&boot_infos, latest_l1_head).await {
let headers = match self.fetcher.get_header_preimages(&boot_infos, l1_head_hash).await {
Ok(headers) => headers,
Err(e) => {
tracing::error!("Failed to get header preimages: {e}");
Expand All @@ -992,7 +990,7 @@ where
boot_infos,
headers,
&self.prover.keys().range_vk,
latest_l1_head,
l1_head_hash,
self.signer.address(),
) {
Ok(s) => s,
Expand All @@ -1017,15 +1015,10 @@ where
Ok((receipt.transaction_hash, total_instruction_cycles, total_sp1_gas))
}

async fn range_proof_stdin(
&self,
start_block: u64,
end_block: u64,
l1_head_hash: B256,
) -> Result<SP1Stdin> {
async fn range_proof_stdin(&self, start_block: u64, end_block: u64) -> Result<SP1Stdin> {
let host_args = self
.host
.fetch(start_block, end_block, Some(l1_head_hash), self.config.safe_db_fallback)
.fetch(start_block, end_block, None, self.config.safe_db_fallback)
.await
.context("Failed to get host CLI args")?;

Expand Down
Loading