Skip to content

Commit

Permalink
chore: Update kona + ELF's (#162)
Browse files Browse the repository at this point in the history
* feat: upgrade kona version

* feat: fix

* new elfs with docker
  • Loading branch information
ratankaliani authored Oct 11, 2024
1 parent 7d82981 commit b75ea87
Show file tree
Hide file tree
Showing 14 changed files with 126 additions and 81 deletions.
73 changes: 45 additions & 28 deletions Cargo.lock

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

22 changes: 13 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,26 @@ op-succinct-client-utils = { path = "utils/client" }
op-succinct-host-utils = { path = "utils/host" }
op-succinct-proposer = { path = "proposer/succinct" }

# ethereum / op
alloy = { version = "0.4", default-features = false, features = ["full"] }
# Alloy
alloy = { version = "0.4.2", default-features = false, features = ["full"] }
# Uses sha3 instead of tiny-keccak. Reduces cycle count for Keccak by 50%.
alloy-primitives = { version = "0.8.4", default-features = false, features = [
"sha3-keccak",
] }
alloy-rlp = { version = "0.3.8", default-features = false }
alloy-eips = { version = "0.4", default-features = false }
alloy-eips = { version = "0.4.2", default-features = false }
revm = { version = "14.0", default-features = false, features = ["kzg-rs"] }
alloy-consensus = { version = "0.4", default-features = false }
alloy-consensus = { version = "0.4.2", default-features = false }
alloy-sol-types = { version = "0.8" }
op-alloy-consensus = { version = "0.3.3", default-features = false }
op-alloy-genesis = { version = "0.3.3", default-features = false }
op-alloy-protocol = { version = "0.3.3", default-features = false }
op-alloy-rpc-types = { version = "0.3.3", default-features = false }
op-alloy-rpc-types-engine = { version = "0.3.3", default-features = false }

# OP Alloy
op-alloy-consensus = { version = "0.4.0", default-features = false }
op-alloy-genesis = { version = "0.4.0", default-features = false, features = [
"serde",
] }
op-alloy-protocol = { version = "0.4.0", default-features = false }
op-alloy-rpc-types = { version = "0.4.0", default-features = false }
op-alloy-rpc-types-engine = { version = "0.4.0", default-features = false }

# sp1
sp1-lib = { version = "3.0.0-rc3", features = ["verify"] }
Expand Down
Binary file modified elf/aggregation-elf
Binary file not shown.
Binary file modified elf/fault-proof-elf
Binary file not shown.
Binary file modified elf/range-elf
Binary file not shown.
10 changes: 5 additions & 5 deletions programs/fault-proof/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ fn main() {
let rollup_config: RollupConfig = serde_json::from_slice(&boot_info_with_bytes_config.rollup_config_bytes).expect("failed to parse rollup config");
let boot: Arc<BootInfo> = Arc::new(BootInfo {
l1_head: boot_info_with_bytes_config.l1_head,
l2_output_root: boot_info_with_bytes_config.l2_output_root,
l2_claim: boot_info_with_bytes_config.l2_claim,
l2_claim_block: boot_info_with_bytes_config.l2_claim_block,
agreed_l2_output_root: boot_info_with_bytes_config.l2_output_root,
claimed_l2_output_root: boot_info_with_bytes_config.l2_claim,
claimed_l2_block_number: boot_info_with_bytes_config.l2_claim_block,
chain_id: boot_info_with_bytes_config.chain_id,
rollup_config,
});
Expand Down Expand Up @@ -116,8 +116,8 @@ fn main() {
// EPILOGUE //
////////////////////////////////////////////////////////////////

assert_eq!(number, boot.l2_claim_block);
assert_eq!(output_root, boot.l2_claim);
assert_eq!(number, boot.claimed_l2_block_number);
assert_eq!(output_root, boot.claimed_l2_output_root);

println!("Validated derivation and STF. Output Root: {}", output_root);
});
Expand Down
10 changes: 5 additions & 5 deletions programs/range/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ fn main() {
let rollup_config: RollupConfig = serde_json::from_slice(&boot_info_with_bytes_config.rollup_config_bytes).expect("failed to parse rollup config");
let boot: Arc<BootInfo> = Arc::new(BootInfo {
l1_head: boot_info_with_bytes_config.l1_head,
l2_output_root: boot_info_with_bytes_config.l2_output_root,
l2_claim: boot_info_with_bytes_config.l2_claim,
l2_claim_block: boot_info_with_bytes_config.l2_claim_block,
agreed_l2_output_root: boot_info_with_bytes_config.l2_output_root,
claimed_l2_output_root: boot_info_with_bytes_config.l2_claim,
claimed_l2_block_number: boot_info_with_bytes_config.l2_claim_block,
chain_id: boot_info_with_bytes_config.chain_id,
rollup_config,
});
Expand Down Expand Up @@ -144,7 +144,7 @@ fn main() {
assert_eq!(new_block_number, payload.parent.block_info.number + 1);

// Increment last_block_num and check if we have reached the claim block.
if new_block_number == boot.l2_claim_block {
if new_block_number == boot.claimed_l2_block_number {
break 'step;
}

Expand Down Expand Up @@ -194,7 +194,7 @@ fn main() {

// Note: We don't need the last_block_num == claim_block check, because it's the only way to
// exit the above loop
assert_eq!(output_root, boot.l2_claim);
assert_eq!(output_root, boot.claimed_l2_output_root);

println!("Validated derivation and STF. Output Root: {}", output_root);
});
Expand Down
5 changes: 3 additions & 2 deletions proposer/succinct/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,15 @@ fn build_zkvm_program(program: &str) {
&format!("../../programs/{}", program),
BuildArgs {
elf_name: format!("{}-elf", program),
// docker: true,
docker: true,
tag: "v3.0.0-rc3".to_string(),
..Default::default()
},
);
}

fn main() {
let programs = vec!["range"];
let programs = vec!["fault-proof", "range"];

for program in programs {
// Note: Don't comment this out, because the Docker program depends on the native program
Expand Down
5 changes: 4 additions & 1 deletion scripts/witnessgen/bin/native_host_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ async fn main() -> Result<()> {
}
}

println!("Ran host program with end block: {:?}", cfg.l2_block_number);
println!(
"Ran host program with end block: {:?}",
cfg.claimed_l2_block_number
);
std::process::exit(0);
}
Loading

0 comments on commit b75ea87

Please sign in to comment.