Skip to content
This repository was archived by the owner on Aug 3, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions core/src/interfaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,9 +532,7 @@ impl std::fmt::Display for ShastaProposal {
write!(
f,
"{}:{:?}:{}",
self.proposal_id,
self.checkpoint,
self.l1_inclusion_block_number
self.proposal_id, self.checkpoint, self.l1_inclusion_block_number
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/provider/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ pub async fn get_task_data(
.hash
.ok_or_else(|| RaikoError::RPC("No block hash for requested block".to_string()))?;
Ok((taiko_chain_spec.chain_id, blockhash))
}
}
4 changes: 2 additions & 2 deletions lib/src/manifest/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pub mod types;
pub mod codec;
pub mod types;

pub use types::*;
pub use codec::*;
pub use types::*;
5 changes: 1 addition & 4 deletions lib/src/utils/shasta_rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,7 @@ fn calc_next_shasta_base_fee(
.unwrap_or(0);

if adjustment < 1 {
return clamp_shasta_base_fee_with_min(
parent_base_fee.saturating_add(1),
min_base_fee,
);
return clamp_shasta_base_fee_with_min(parent_base_fee.saturating_add(1), min_base_fee);
}
clamp_shasta_base_fee_with_min(parent_base_fee.saturating_add(adjustment), min_base_fee)
} else {
Expand Down
289 changes: 168 additions & 121 deletions provers/risc0/driver/src/boundless.rs

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions provers/risc0/driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ use raiko_lib::{
},
libhash::hash_shasta_subproof_input,
proof_type::ProofType,
protocol_instance::validate_shasta_proof_carry_data_vec,
prover::{
IdStore, IdWrite, Proof, ProofCarryData, ProofKey, Prover, ProverConfig, ProverError,
ProverResult,
},
protocol_instance::validate_shasta_proof_carry_data_vec,
};
use risc0_zkvm::{
compute_image_id, default_prover,
Expand Down Expand Up @@ -207,7 +207,7 @@ impl Prover for Risc0Prover {
let mut id_store = id_store;
let boundless_cfg = config;
let config = Risc0Param::deserialize(config.get("risc0").unwrap()).unwrap();

if config.boundless {
// Delegate to boundless driver (agent-managed) when enabled.
return BoundlessProver::new()
Expand Down Expand Up @@ -266,7 +266,7 @@ impl Prover for Risc0Prover {
) -> ProverResult<Proof> {
let boundless_cfg = config;
let config = Risc0Param::deserialize(config.get("risc0").unwrap()).unwrap();

if config.boundless {
// Delegate to boundless driver (agent-managed) when enabled.
return BoundlessProver::new()
Expand All @@ -293,9 +293,9 @@ impl Prover for Risc0Prover {
.proofs
.iter()
.map(|proof| {
proof.extra_data
.clone()
.ok_or_else(|| ProverError::GuestError("missing shasta proof carry data".into()))
proof.extra_data.clone().ok_or_else(|| {
ProverError::GuestError("missing shasta proof carry data".into())
})
})
.collect::<Result<Vec<_>, _>>()?;
let block_inputs = build_shasta_block_inputs(&input.proofs, &proof_carry_data_vec)?;
Expand Down
9 changes: 6 additions & 3 deletions provers/risc0/driver/src/methods/boundless_aggregation.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

pub const BOUNDLESS_AGGREGATION_ELF: &[u8] = include_bytes!("../../../guest/target/riscv32im-risc0-zkvm-elf/release/boundless-aggregation.bin");
pub const BOUNDLESS_AGGREGATION_ID: [u32; 8] = [55618647, 3377036657, 1929083614, 2482855059, 120956075, 3701986409, 892553791, 4190508197];
pub const BOUNDLESS_AGGREGATION_ELF: &[u8] = include_bytes!(
"../../../guest/target/riscv32im-risc0-zkvm-elf/release/boundless-aggregation.bin"
);
pub const BOUNDLESS_AGGREGATION_ID: [u32; 8] = [
55618647, 3377036657, 1929083614, 2482855059, 120956075, 3701986409, 892553791, 4190508197,
];
8 changes: 5 additions & 3 deletions provers/risc0/driver/src/methods/boundless_batch.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

pub const BOUNDLESS_BATCH_ELF: &[u8] = include_bytes!("../../../guest/target/riscv32im-risc0-zkvm-elf/release/boundless-batch.bin");
pub const BOUNDLESS_BATCH_ID: [u32; 8] = [1921226688, 1927191714, 1973335244, 1172425234, 3004348566, 2770360705, 811501905, 3652470270];
pub const BOUNDLESS_BATCH_ELF: &[u8] =
include_bytes!("../../../guest/target/riscv32im-risc0-zkvm-elf/release/boundless-batch.bin");
pub const BOUNDLESS_BATCH_ID: [u32; 8] = [
1921226688, 1927191714, 1973335244, 1172425234, 3004348566, 2770360705, 811501905, 3652470270,
];
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

pub const BOUNDLESS_SHASTA_AGGREGATION_ELF: &[u8] = include_bytes!("../../../guest/target/riscv32im-risc0-zkvm-elf/release/boundless-shasta-aggregation.bin");
pub const BOUNDLESS_SHASTA_AGGREGATION_ID: [u32; 8] = [727175413, 2017795602, 3719875137, 1057922314, 2476225829, 2064460280, 2963810467, 798644484];
pub const BOUNDLESS_SHASTA_AGGREGATION_ELF: &[u8] = include_bytes!(
"../../../guest/target/riscv32im-risc0-zkvm-elf/release/boundless-shasta-aggregation.bin"
);
pub const BOUNDLESS_SHASTA_AGGREGATION_ID: [u32; 8] = [
727175413, 2017795602, 3719875137, 1057922314, 2476225829, 2064460280, 2963810467, 798644484,
];
2 changes: 1 addition & 1 deletion provers/risc0/driver/src/snarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ use std::{str::FromStr, sync::Arc};
use alloy_primitives::B256;
use alloy_sol_types::{sol, SolValue};
use anyhow::Result;
use hex;
use bonsai_sdk::blocking::Client;
use ethers_contract::abigen;
use ethers_core::types::H160;
use ethers_providers::{Http, Provider, RetryClient};
use hex;
use log::{error, info};
use raiko_lib::primitives::keccak::keccak;
use risc0_zkvm::{
Expand Down
4 changes: 3 additions & 1 deletion provers/sgx/prover/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ impl Prover for SgxProver {
) -> ProverResult<Proof> {
match self {
SgxProver::Local(prover) => prover.shasta_aggregate(input, output, config, store).await,
SgxProver::Remote(prover) => prover.shasta_aggregate(input, output, config, store).await,
SgxProver::Remote(prover) => {
prover.shasta_aggregate(input, output, config, store).await
}
}
}

Expand Down
5 changes: 4 additions & 1 deletion provers/sgx/prover/src/sgx_register_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ sol! {
}

fn little_endian_decode(encoded: &[u8]) -> u64 {
assert!(encoded.len() <= 8, "encoded bytes should be less than or equal to 8");
assert!(
encoded.len() <= 8,
"encoded bytes should be less than or equal to 8"
);
let mut decoded = 0;
for (i, byte) in encoded.iter().enumerate() {
let digits = *byte as u64;
Expand Down
12 changes: 5 additions & 7 deletions provers/sp1/driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ use raiko_lib::{
},
libhash::hash_shasta_subproof_input,
proof_type::ProofType,
protocol_instance::validate_shasta_proof_carry_data_vec,
prover::{
IdStore, IdWrite, Proof, ProofCarryData, ProofKey, Prover, ProverConfig, ProverError,
ProverResult,
},
protocol_instance::validate_shasta_proof_carry_data_vec,
Measurement,
};
use reth_primitives::B256;
Expand Down Expand Up @@ -481,9 +481,9 @@ impl Prover for Sp1Prover {
.proofs
.iter()
.map(|proof| {
proof.extra_data
.clone()
.ok_or_else(|| ProverError::GuestError("missing shasta proof carry data".into()))
proof.extra_data.clone().ok_or_else(|| {
ProverError::GuestError("missing shasta proof carry data".into())
})
})
.collect::<Result<Vec<_>, _>>()?;
let block_inputs = build_shasta_block_inputs(&input.proofs, &proof_carry_data_vec)?;
Expand Down Expand Up @@ -630,9 +630,7 @@ fn build_shasta_block_inputs(
let mut block_inputs = Vec::with_capacity(proofs.len());
for (idx, (proof, carry)) in proofs.iter().zip(proof_carry_data_vec).enumerate() {
let proof_input = proof.input.ok_or_else(|| {
ProverError::GuestError(
"missing public input for shasta aggregation proof".to_string(),
)
ProverError::GuestError("missing public input for shasta aggregation proof".to_string())
})?;
let expected = hash_shasta_subproof_input(carry);
if proof_input != expected {
Expand Down
Loading