Skip to content

Commit

Permalink
feat: bump l1_head by 20 blocks (#246)
Browse files Browse the repository at this point in the history
* feat: bump the incremented l1 block by 20

* add

---------

Co-authored-by: Ubuntu <[email protected]>
  • Loading branch information
ratankaliani and Ubuntu authored Nov 30, 2024
1 parent 20a72ac commit 73ad784
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 7 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified elf/fault-proof-elf
Binary file not shown.
Binary file modified elf/range-elf
Binary file not shown.
10 changes: 9 additions & 1 deletion programs/fault-proof/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ homepage.workspace = true
[dependencies]
cfg-if.workspace = true
serde_json.workspace = true
tracing.workspace = true
anyhow.workspace = true

# workspace (ethereum)
alloy-consensus.workspace = true
Expand All @@ -27,4 +29,10 @@ op-succinct-client-utils.workspace = true

# op-alloy
op-alloy-genesis.workspace = true
op-alloy-rpc-types-engine.workspace = true
op-alloy-rpc-types-engine.workspace = true

# `tracing-subscriber` feature dependencies
tracing-subscriber = { workspace = true, optional = true }

[features]
tracing-subscriber = ["dep:tracing-subscriber"]
17 changes: 15 additions & 2 deletions programs/fault-proof/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ cfg_if! {
}

fn main() {
#[cfg(feature = "tracing-subscriber")]
{
use anyhow::anyhow;
use tracing::Level;

let subscriber = tracing_subscriber::fmt()
.with_max_level(Level::INFO)
.finish();
tracing::subscriber::set_global_default(subscriber)
.map_err(|e| anyhow!(e))
.unwrap();
}

op_succinct_client_utils::block_on(async move {
////////////////////////////////////////////////////////////////
// PROLOGUE //
Expand Down Expand Up @@ -117,12 +130,12 @@ fn main() {
);
let mut driver = Driver::new(cursor, executor, pipeline);

println!("cycle-tracker-start: produce-output");
println!("cycle-tracker-start: advance-to-target");
let (number, output_root) = driver
.advance_to_target(&boot.rollup_config, boot.claimed_l2_block_number)
.await
.unwrap();
println!("cycle-tracker-end: produce-output");
println!("cycle-tracker-end: advance-to-target");

////////////////////////////////////////////////////////////////
// EPILOGUE //
Expand Down
6 changes: 5 additions & 1 deletion scripts/prove/bin/single.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@ struct Args {
/// Generate proof.
#[arg(short, long)]
prove: bool,

/// Environment file.
#[arg(short, long, default_value = ".env")]
env_file: String,
}

/// Execute the OP Succinct program for a single block.
#[tokio::main]
async fn main() -> Result<()> {
dotenv::dotenv().ok();
let args = Args::parse();
dotenv::from_path(&args.env_file)?;
utils::setup_logger();

let data_fetcher = OPSuccinctDataFetcher::new_with_rollup_config()
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/bin/cost_estimator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fn split_range(
start: current_start,
end: current_end,
});
current_start = current_end + 1;
current_start = current_end;
}

ranges
Expand Down
4 changes: 2 additions & 2 deletions utils/host/src/fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,8 @@ impl OPSuccinctDataFetcher {

let (_, l1_head_number) = self.get_l1_head(l2_end_block).await?;

// FIXME: Investigate requirement for L1 head offset beyond batch posting block with safe head > L2 end block
let l1_head_number = l1_head_number + 7;
// FIXME: Investigate requirement for L1 head offset beyond batch posting block with safe head > L2 end block.
let l1_head_number = l1_head_number + 20;
let header = self.get_l1_header(l1_head_number.into()).await?;
let l1_head_hash = header.hash_slow();

Expand Down

0 comments on commit 73ad784

Please sign in to comment.