Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
CeciliaZ030 committed Jun 5, 2024
1 parent ca25ac7 commit 1877dfc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
15 changes: 7 additions & 8 deletions core/src/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ pub struct NativeParam {
pub write_guest_input_path: Option<String>,
}



#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct NativeResponse {
pub output: GuestOutput,
Expand All @@ -31,18 +29,20 @@ impl Prover for NativeProver {
output: &GuestOutput,
config: &ProverConfig,
) -> ProverResult<Proof> {

let param = config.get("native")
let param = config
.get("native")
.map(|v| NativeParam::deserialize(v))
.ok_or( ProverError::Param(serde_json::Error::custom("native param not provided")))??;
.ok_or(ProverError::Param(serde_json::Error::custom(
"native param not provided",
)))??;

if let Some(path) = param.write_guest_input_path {
let path = Path::new(&path);
if let Some(parent) = path.parent() {
std::fs::create_dir_all(parent)?;
std::fs::create_dir_all(parent)?;
}
let json = serde_json::to_string(&input)?;
std::fs::write(path, json)?;
std::fs::write(path, json)?;
}

trace!("Running the native prover for input {input:?}");
Expand All @@ -59,4 +59,3 @@ impl Prover for NativeProver {
}))
}
}

11 changes: 7 additions & 4 deletions provers/risc0/driver/src/methods/risc0_guest.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

pub const RISC0_GUEST_ELF: &[u8] = include_bytes!("../../../guest/target/riscv32im-risc0-zkvm-elf/release/risc0-guest");
pub const RISC0_GUEST_ID: [u32; 8] = [1444642754, 3434511061, 2910616417, 2829025913, 3284452016, 1678600137, 1001540409, 1336920303];
pub const RISC0_GUEST_PATH: &str = r#"/home/ubuntu/raiko/provers/risc0/guest/target/riscv32im-risc0-zkvm-elf/release/risc0-guest"#;
pub const RISC0_GUEST_ELF: &[u8] =
include_bytes!("../../../guest/target/riscv32im-risc0-zkvm-elf/release/risc0-guest");
pub const RISC0_GUEST_ID: [u32; 8] = [
1444642754, 3434511061, 2910616417, 2829025913, 3284452016, 1678600137, 1001540409, 1336920303,
];
pub const RISC0_GUEST_PATH: &str =
r#"/home/ubuntu/raiko/provers/risc0/guest/target/riscv32im-risc0-zkvm-elf/release/risc0-guest"#;
2 changes: 1 addition & 1 deletion script/prove-block.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [ "$chain" == "ethereum" ]; then
elif [ "$chain" == "holesky" ]; then
l1_network="holesky"
elif [ "$chain" == "taiko_mainnet" ]; then
l1_network="taiko_a7"
l1_network="ethereum"
elif [ "$chain" == "taiko_a7" ]; then
l1_network="holesky"
else
Expand Down

0 comments on commit 1877dfc

Please sign in to comment.