Skip to content

Commit

Permalink
chore: replace raw() with bytes() in fibonacci example (#1549)
Browse files Browse the repository at this point in the history
  • Loading branch information
xJonathanLEI authored Sep 26, 2024
1 parent 21655e9 commit c9b305b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions examples/Cargo.lock

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

1 change: 1 addition & 0 deletions examples/fibonacci/script/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ default-run = "fibonacci-script"
publish = false

[dependencies]
hex = "0.4.3"
itertools = "0.12.1"
sp1-sdk = { workspace = true }
sha2 = "0.10.8"
Expand Down
8 changes: 4 additions & 4 deletions examples/fibonacci/script/bin/groth16_bn254.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ fn main() {
println!("generated proof");

// Get the public values as bytes.
let public_values = proof.public_values.raw();
println!("public values: {:?}", public_values);
let public_values = proof.public_values.as_slice();
println!("public values: 0x{}", hex::encode(public_values));

// Get the proof as bytes.
let solidity_proof = proof.raw();
println!("proof: {:?}", solidity_proof);
let solidity_proof = proof.bytes();
println!("proof: 0x{}", hex::encode(solidity_proof));

// Verify proof and public values
client.verify(&proof, &vk).expect("verification failed");
Expand Down

0 comments on commit c9b305b

Please sign in to comment.