Skip to content

Commit

Permalink
chore: cfg flag zkvm (#270)
Browse files Browse the repository at this point in the history
* feat: cfg zkvm precompile

* add"

---------

Co-authored-by: Ubuntu <[email protected]>
  • Loading branch information
ratankaliani and Ubuntu authored Dec 13, 2024
1 parent dc97c3c commit b203bb4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Binary file modified elf/fault-proof-elf
Binary file not shown.
Binary file modified elf/range-elf
Binary file not shown.
4 changes: 1 addition & 3 deletions programs/aggregation/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ pub fn main() {
let serialized_boot_info = bincode::serialize(&boot_info).unwrap();
let pv_digest = Sha256::digest(serialized_boot_info);

if cfg!(target_os = "zkvm") {
sp1_lib::verify::verify_sp1_proof(&agg_inputs.multi_block_vkey, &pv_digest.into());
}
sp1_lib::verify::verify_sp1_proof(&agg_inputs.multi_block_vkey, &pv_digest.into());
});

// Create a map of each l1 head in the [`BootInfoStruct`]'s to booleans
Expand Down
8 changes: 6 additions & 2 deletions utils/client/src/precompiles/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ macro_rules! create_annotated_precompile {
let precompile = $precompile.precompile();
match precompile {
Precompile::Standard(precompile) => {
println!(concat!("cycle-tracker-report-start: precompile-", $name));
if cfg!(target_os = "zkvm") {
println!(concat!("cycle-tracker-report-start: precompile-", $name));
}
let result = precompile(input, gas_limit);
println!(concat!("cycle-tracker-report-end: precompile-", $name));
if cfg!(target_os = "zkvm") {
println!(concat!("cycle-tracker-report-end: precompile-", $name));
}
result
}
_ => panic!("Annotated precompile must be a standard precompile."),
Expand Down

0 comments on commit b203bb4

Please sign in to comment.