From 7ae631987ad2a8d75566572dc36452622be2ddfb Mon Sep 17 00:00:00 2001 From: CeciliaZ030 Date: Mon, 24 Jun 2024 21:29:19 +0000 Subject: [PATCH] x = sha256(sha256(blob), kzg_commit(blob)) sha256(blob) -- inside kzg_commit(blob) -- ouside sha256(sha256(blob), kzg_commit(blob)) -- inside -> PI --- core/src/interfaces.rs | 34 ++++++----------- core/src/lib.rs | 3 -- core/src/preflight.rs | 6 +-- lib/src/builder/execute.rs | 17 ++++----- lib/src/builder/finalize.rs | 28 ++++---------- lib/src/builder/initialize.rs | 37 ++++-------------- lib/src/input.rs | 8 ++-- lib/src/lib.rs | 68 ++++++++++++++++++++++++++++++++- lib/src/primitives/eip4844.rs | 52 +++++++++++-------------- lib/src/protocol_instance.rs | 19 ++++++++- provers/risc0/driver/src/lib.rs | 4 +- provers/risc0/guest/src/main.rs | 3 -- provers/sp1/guest/src/main.rs | 3 -- 13 files changed, 148 insertions(+), 134 deletions(-) diff --git a/core/src/interfaces.rs b/core/src/interfaces.rs index 04f6d598..92d22180 100644 --- a/core/src/interfaces.rs +++ b/core/src/interfaces.rs @@ -125,7 +125,7 @@ impl ProofType { pub async fn run_prover( &self, input: GuestInput, - output: &mut GuestOutput, + output: &GuestOutput, config: &Value, ) -> RaikoResult { match self { @@ -133,37 +133,25 @@ impl ProofType { .await .map_err(|e| e.into()), ProofType::Sp1 => { + #[cfg(feature = "sp1")] - { - output.proof_of_equivalence = proof_of_equivalence(input); - return sp1_driver::Sp1Prover::run(input, output, config) - .await - .map_err(|e| e.into()); - } - #[cfg(not(feature = "sp1"))] + return sp1_driver::Sp1Prover::run(input, output, config) + .await + .map_err(|e| e.into()); Err(RaikoError::FeatureNotSupportedError(self.clone())) } ProofType::Risc0 => { #[cfg(feature = "risc0")] - { - output.proof_of_equivalence = proof_of_equivalence(input); - return risc0_driver::Risc0Prover::run(input, output, config) - .await - .map_err(|e| e.into()); - } - #[cfg(not(feature = "risc0"))] + return risc0_driver::Risc0Prover::run(input, output, config) + .await + .map_err(|e| e.into()); Err(RaikoError::FeatureNotSupportedError(self.clone())) } ProofType::Sgx => { #[cfg(feature = "sgx")] - { - // Sgx guest runs proof_of_version_hash - output.proof_of_equivalence = None; - return sgx_prover::SgxProver::run(input, output, config) - .await - .map_err(|e| e.into()); - } - #[cfg(not(feature = "sgx"))] + return sgx_prover::SgxProver::run(input, output, config) + .await + .map_err(|e| e.into()); Err(RaikoError::FeatureNotSupportedError(self.clone())) } } diff --git a/core/src/lib.rs b/core/src/lib.rs index 164068b6..f03b285d 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -118,12 +118,9 @@ impl Raiko { &input.block_hash_reference, "block hash unexpected", )?; - - // proof_of_equivalence is generated depending on prover type let output = GuestOutput { header, hash: pi, - proof_of_equivalence: None, }; Ok(output) diff --git a/core/src/preflight.rs b/core/src/preflight.rs index 80cc2599..c10f91a7 100644 --- a/core/src/preflight.rs +++ b/core/src/preflight.rs @@ -275,7 +275,7 @@ async fn prepare_taiko_chain_input( .await?; // Fetch the tx data from either calldata or blobdata - let (tx_data, tx_blob_hash, kzg_settings) = if proposal_event.meta.blobUsed { + let (tx_data, blob_commitment, kzg_settings) = if proposal_event.meta.blobUsed { debug!("blob active"); // Get the blob hashes attached to the propose tx let blob_hashes = proposal_tx.blob_versioned_hashes.unwrap_or_default(); @@ -298,7 +298,7 @@ async fn prepare_taiko_chain_input( eip4844::get_kzg_proof_commitment(&blob, &kzg_settings).map_err(|e| anyhow!(e))?; set_commitment_proof(&proof, &commitment).map_err(|e| anyhow!(e))?; - (blob, Some(blob_hash), Some(kzg_settings)) + (blob, Some(commitment), Some(kzg_settings)) } else { // Get the tx list data directly from the propose transaction data let proposal_call = proposeBlockCall::abi_decode(&proposal_tx.input, false) @@ -324,7 +324,7 @@ async fn prepare_taiko_chain_input( l1_header: to_header(&l1_state_block.header), tx_data, anchor_tx: serde_json::to_string(&anchor_tx).map_err(RaikoError::Serde)?, - tx_blob_hash, + blob_commitment, kzg_settings, block_proposed: proposal_event, prover_data, diff --git a/lib/src/builder/execute.rs b/lib/src/builder/execute.rs index ccf06367..baa1a72b 100644 --- a/lib/src/builder/execute.rs +++ b/lib/src/builder/execute.rs @@ -177,16 +177,13 @@ impl TxExecStrategy for TkoTxExecStrategy { let num_transactions = transactions.len(); for (tx_no, tx) in take(&mut transactions).into_iter().enumerate() { if !is_optimistic { - cfg_if::cfg_if! { - if #[cfg(all(all(target_os = "zkvm", target_vendor = "succinct"), feature = "sp1-cycle-tracker"))]{ - println!( - "{:?}", - &format!("\rprocessing tx {tx_no}/{num_transactions}...") - ); - } else { - inplace_print(&format!("\rprocessing tx {tx_no}/{num_transactions}...")); - } - } + CycleTracker::println(|| { + println!( + "{:?}", + &format!("\rprocessing tx {tx_no}/{num_transactions}...") + ); + }); + inplace_print(&format!("\rprocessing tx {tx_no}/{num_transactions}...")); } else { trace!("\rprocessing tx {tx_no}/{num_transactions}..."); } diff --git a/lib/src/builder/finalize.rs b/lib/src/builder/finalize.rs index c59c3ffc..0cd20361 100644 --- a/lib/src/builder/finalize.rs +++ b/lib/src/builder/finalize.rs @@ -25,7 +25,7 @@ use crate::{ primitives::{ keccak::keccak, mpt::{MptNode, StateAccount}, - }, + }, CycleTracker, }; pub trait BlockFinalizeStrategy @@ -42,12 +42,9 @@ impl BlockFinalizeStrategy for MemDbBlockFinalizeStrategy { fn finalize(mut block_builder: BlockBuilder) -> Result<(AlloyConsensusHeader, MptNode)> { let db: MemDb = block_builder.db.take().expect("DB not initialized"); - #[cfg(feature = "sp1-cycle-tracker")] - { - let mut account_touched = 0; - let mut storage_touched = 0; - } - + // "sp1-cycle-tracker" debug fields + let mut account_touched = 0; + let mut storage_touched = 0; // apply state updates let mut state_trie = mem::take(&mut block_builder.input.parent_state_trie); for (address, account) in &db.accounts { @@ -64,11 +61,7 @@ impl BlockFinalizeStrategy for MemDbBlockFinalizeStrategy { state_trie.delete(&state_trie_index)?; continue; } - - #[cfg(feature = "sp1-cycle-tracker")] - { - account_touched += 1; - } + account_touched += 1; // otherwise, compute the updated storage root for that account let state_storage = &account.storage; @@ -93,11 +86,7 @@ impl BlockFinalizeStrategy for MemDbBlockFinalizeStrategy { } else { storage_trie.insert_rlp(&storage_trie_index, *value)?; } - - #[cfg(feature = "sp1-cycle-tracker")] - { - storage_touched += 1; - } + storage_touched += 1; } storage_trie.hash() @@ -112,11 +101,10 @@ impl BlockFinalizeStrategy for MemDbBlockFinalizeStrategy { state_trie.insert_rlp(&state_trie_index, state_account)?; } - #[cfg(feature = "sp1-cycle-tracker")] - { + CycleTracker::println(|| { println!("finalize Account touched {:?}", account_touched); println!("finalize Storage touched {:?}", storage_touched); - } + }); // update result header with the new state root let mut header = block_builder.header.take().expect("Header not initialized"); diff --git a/lib/src/builder/initialize.rs b/lib/src/builder/initialize.rs index 11fbd1dd..bbd61b30 100644 --- a/lib/src/builder/initialize.rs +++ b/lib/src/builder/initialize.rs @@ -30,7 +30,7 @@ use crate::{ mpt::StateAccount, Bytes, }, - utils::HeaderHasher, + utils::HeaderHasher, CycleTracker, }; pub trait DbInitStrategy @@ -62,15 +62,10 @@ impl DbInitStrategy for MemDbInitStrategy { .map(|bytes| (keccak(&bytes).into(), bytes)) .collect(); - #[cfg(all( - all(target_os = "zkvm", target_vendor = "succinct"), - feature = "sp1-cycle-tracker" - ))] - { - let mut account_touched = 0; - let mut storage_touched = 0; - } + // "sp1-cycle-tracker" debug fields + let mut account_touched = 0; + let mut storage_touched = 0; // Load account data into db let mut accounts = HashMap::with_capacity(block_builder.input.parent_storage.len()); for (address, (storage_trie, slots)) in &mut block_builder.input.parent_storage { @@ -91,13 +86,7 @@ impl DbInitStrategy for MemDbInitStrategy { storage_trie.hash() ); } - #[cfg(all( - all(target_os = "zkvm", target_vendor = "succinct"), - feature = "sp1-cycle-tracker" - ))] - { - account_touched += 1; - } + account_touched += 1; // load the corresponding code let code_hash = state_account.code_hash; @@ -118,13 +107,7 @@ impl DbInitStrategy for MemDbInitStrategy { .get_rlp(&keccak(slot.to_be_bytes::<32>()))? .unwrap_or_default(); storage.insert(slot, value); - #[cfg(all( - all(target_os = "zkvm", target_vendor = "succinct"), - feature = "sp1-cycle-tracker" - ))] - { - storage_touched += 1; - } + storage_touched += 1; } let mem_account = DbAccount { @@ -142,14 +125,10 @@ impl DbInitStrategy for MemDbInitStrategy { } guest_mem_forget(contracts); - #[cfg(all( - all(target_os = "zkvm", target_vendor = "succinct"), - feature = "sp1-cycle-tracker" - ))] - { + CycleTracker::println(|| { println!("initialize_db Account touch {account_touched:?}"); println!("initialize_db Storage touch {storage_touched:?}"); - } + }); // prepare block hash history let mut block_hashes = diff --git a/lib/src/input.rs b/lib/src/input.rs index ce1c000f..f3d39eb1 100644 --- a/lib/src/input.rs +++ b/lib/src/input.rs @@ -23,13 +23,13 @@ use anyhow::{anyhow, Result}; use revm::primitives::HashMap; use serde::{Deserialize, Serialize}; use serde_with::serde_as; - +use crate::serde_helper::option_array_48; #[cfg(not(feature = "std"))] use crate::no_std::*; use crate::{ consts::ChainSpec, primitives::{mpt::MptNode, Address, Bytes, B256, U256}, - serde_with::{RlpBytes, RlpHexBytes}, + serde_helper::{RlpBytes, RlpHexBytes}, }; /// Represents the state of an account's storage. @@ -95,7 +95,8 @@ pub struct TaikoGuestInput { pub anchor_tx: String, pub block_proposed: BlockProposed, pub prover_data: TaikoProverData, - pub tx_blob_hash: Option, + #[serde(with = "option_array_48")] + pub blob_commitment: Option<[u8; 48]>, pub kzg_settings: Option, pub skip_verify_blob: bool, } @@ -112,7 +113,6 @@ pub struct GuestOutput { #[serde_as(as = "RlpHexBytes")] pub header: AlloyConsensusHeader, pub hash: B256, - pub proof_of_equivalence: Option, } sol! { diff --git a/lib/src/lib.rs b/lib/src/lib.rs index c0acbab7..3edd3afd 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -111,6 +111,14 @@ impl CycleTracker { ))] println!("cycle-tracker-end: {self.title}"); } + + pub fn println(inner: impl Fn() -> ()) { + #[cfg(all( + all(target_os = "zkvm", target_vendor = "succinct"), + feature = "sp1-cycle-tracker" + ))] + inner() + } } pub struct Measurement { @@ -206,8 +214,10 @@ where } } -pub mod serde_with { - use serde::{Deserialize, Deserializer, Serialize, Serializer}; +pub mod serde_helper { + use core::marker::PhantomData; + + use serde::{de::Visitor, Deserialize, Deserializer, Serialize, Serializer}; use serde_with::{DeserializeAs, SerializeAs}; use super::RlpBytes as _; @@ -269,4 +279,58 @@ pub mod serde_with { T::decode_bytes(bytes).map_err(serde::de::Error::custom) } } + + pub mod option_array_48 { + use super::*; + use serde::{de, ser}; + + pub fn serialize(value: &Option<[u8; 48]>, serializer: S) -> Result + where + S: Serializer, + { + match value { + Some(arr) => arr.serialize(serializer), + None => serializer.serialize_none(), + } + } + + pub fn deserialize<'de, D>(deserializer: D) -> Result, D::Error> + where + D: Deserializer<'de>, + { + struct OptionArrayVisitor; + + impl<'de> de::Visitor<'de> for OptionArrayVisitor { + type Value = Option<[u8; 48]>; + + fn expecting(&self, formatter: &mut core::fmt::Formatter) -> std::fmt::Result { + formatter.write_str("an option of a 48-byte array") + } + + fn visit_none(self) -> Result + where + E: de::Error, + { + Ok(None) + } + + fn visit_some(self, deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let vec = Vec::::deserialize(deserializer)?; + if vec.len() == 48 { + let mut array = [0u8; 48]; + array.copy_from_slice(&vec); + Ok(Some(array)) + } else { + Err(de::Error::custom("expected a 48-byte array")) + } + } + } + + deserializer.deserialize_option(OptionArrayVisitor) + } + } + } diff --git a/lib/src/primitives/eip4844.rs b/lib/src/primitives/eip4844.rs index aef6d656..a1ded50d 100644 --- a/lib/src/primitives/eip4844.rs +++ b/lib/src/primitives/eip4844.rs @@ -11,6 +11,7 @@ use revm_primitives::{ kzg::{G1Points, G2Points, G1_POINTS, G2_POINTS}, B256, }; +use rust_kzg_zkcrypto::kzg_types::ZFr; use sha2::{Digest as _, Sha256}; use std::sync::{Arc, RwLock}; @@ -51,18 +52,27 @@ pub enum Eip4844Error { SetCommitmentProof(String), } -pub fn proof_of_equivalence(input: &GuestInput) -> Result, Eip4844Error> { - if input.taiko.skip_verify_blob { - Ok(None) - } else { - let blob = &input.taiko.tx_data; - let kzg_settings = input.taiko.kzg_settings.as_ref().unwrap_or_else(|| { - // very costly, should not happen - println!("initializing kzg settings in prover"); - &*MAINNET_KZG_TRUSTED_SETUP - }); - Ok(Some(proof_of_equivalence_eval(blob, kzg_settings)?)) - } +pub fn proof_of_equivalence(input: &GuestInput) -> Result<(KzgField, KzgField), Eip4844Error> { + let blob = &input.taiko.tx_data; + let kzg_settings = input.taiko.kzg_settings.as_ref().unwrap_or_else(|| { + // very costly, should not happen + println!("initializing kzg settings in prover"); + &*MAINNET_KZG_TRUSTED_SETUP + }); + + let blob_fields = Blob::from_bytes(blob) + .and_then(|b| deserialize_blob_rust(&b)) + .map_err(|_| Eip4844Error::DeserializeBlob)?; + + let poly = blob_to_polynomial(&blob_fields).unwrap(); + let blob_hash = Sha256::digest(blob).into(); + + let x = hash_to_bls_field(&blob_hash); + let y = evaluate_polynomial_in_evaluation_form(&poly, &x, kzg_settings) + .map(|fr| fr.to_bytes()) + .map_err(|e| Eip4844Error::EvaluatePolynomial(e.to_string()))?; + + Ok((x.to_bytes(), y)) } pub fn proof_of_version_hash(input: &GuestInput) -> Result, Eip4844Error> { @@ -84,24 +94,6 @@ pub fn proof_of_version_hash(input: &GuestInput) -> Result, Eip4844 } } -pub fn proof_of_equivalence_eval( - blob: &[u8], - kzg_settings: &TaikoKzgSettings, -) -> Result { - let blob_fields = Blob::from_bytes(blob) - .and_then(|b| deserialize_blob_rust(&b)) - .map_err(|_| Eip4844Error::DeserializeBlob)?; - - let poly = blob_to_polynomial(&blob_fields).unwrap(); - let blob_hash = Sha256::digest(blob).into(); - let x = hash_to_bls_field(&blob_hash); - - // y = poly(x) - evaluate_polynomial_in_evaluation_form(&poly, &x, kzg_settings) - .map(|fr| fr.to_bytes()) - .map_err(Eip4844Error::EvaluatePolynomial) -} - pub fn get_kzg_proof_commitment( blob: &[u8], kzg_settings: &TaikoKzgSettings, diff --git a/lib/src/protocol_instance.rs b/lib/src/protocol_instance.rs index 5616b39a..4faabc45 100644 --- a/lib/src/protocol_instance.rs +++ b/lib/src/protocol_instance.rs @@ -11,7 +11,7 @@ use crate::no_std::*; use crate::{ consts::{SupportedChainSpecs, VerifierType}, input::{BlockMetadata, EthDeposit, GuestInput, Transition}, - primitives::keccak::keccak, + primitives::{eip4844::{self, KzgField}, keccak::keccak}, utils::HeaderHasher, }; @@ -25,6 +25,7 @@ pub struct ProtocolInstance { pub sgx_instance: Address, // only used for SGX pub chain_id: u64, pub verifier_address: Address, + pub proof_of_equivalence: (KzgField, KzgField), } impl ProtocolInstance { @@ -34,8 +35,12 @@ impl ProtocolInstance { proof_type: VerifierType, ) -> Result { let blob_used = input.taiko.block_proposed.meta.blobUsed; + let mut proof_of_equivalence = (KzgField::default(), KzgField::default()); let tx_list_hash = if blob_used { - input.taiko.tx_blob_hash.unwrap() + if input.taiko.skip_verify_blob { + proof_of_equivalence = eip4844::proof_of_equivalence(&input)?; + } + eip4844::commitment_to_version_hash(&input.taiko.blob_commitment.unwrap()) } else { TxHash::from(keccak(input.taiko.tx_data.as_slice())) }; @@ -126,6 +131,7 @@ impl ProtocolInstance { prover: input.taiko.prover_data.prover, chain_id: input.chain_spec.chain_id, verifier_address, + proof_of_equivalence, }; // Sanity check @@ -163,6 +169,7 @@ impl ProtocolInstance { self.sgx_instance, self.prover, self.meta_hash(), + self.proof_of_equivalence, ) .abi_encode(); if self.sgx_instance != Address::default() { @@ -203,6 +210,7 @@ mod tests { ); } + // TODO: update proof_of_equivalence #[test] fn test_calc_eip712_pi_hash() { let trans = Transition { @@ -212,6 +220,8 @@ mod tests { graffiti: b256!("0000000000000000000000000000000000000000000000000000000000000000"), }; let meta_hash = b256!("9608088f69e586867154a693565b4f3234f26f82d44ef43fb99fd774e7266024"); + let proof_of_equivalence = (KzgField::default(), KzgField::default()); + let pi_hash = keccak::keccak( ( "VERIFY_PROOF", @@ -221,6 +231,7 @@ mod tests { address!("741E45D08C70c1C232802711bBFe1B7C0E1acc55"), address!("70997970C51812dc3A010C7d01b50e0d17dc79C8"), meta_hash, + // proof_of_equivalence, ) .abi_encode() .iter() @@ -234,6 +245,7 @@ mod tests { ); } + // TODO: update proof_of_equivalence #[test] fn test_eip712_pi_hash() { let input = "10d008bd000000000000000000000000000000000000000000000000000000000000004900000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000340689c98d83627e8749504eb6effbc2b08408183f11211bbf8bd281727b16255e6b3f8ee61d80cd7d30cdde9aa49acac0b82264a6b0f992139398e95636e501fd80189249f72753bd6c715511cc61facdec4781d4ecb1d028dafdff4a0827d7d53302e31382e302d64657600000000000000000000000000000000000000000000569e75fc77c1a856f6daaf9e69d8a9566ca34aa47f9133711ce065a571af0cfd00000000000000000000000016700100000000000000000000000000000100010000000000000000000000000000000000000000000000000000000000000049000000000000000000000000000000000000000000000000000000000e4e1c000000000000000000000000000000000000000000000000000000000065f94010000000000000000000000000000000000000000000000000000000000000036000000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000001fdbdc45da60168ddf29b246eb9e0a2e612a670f671c6d3aafdfdac21f86b4bca0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bcaf73b06ee94a454236314610c55e053df3af4402081df52c9ff2692349a6b497bc17a6706bc1cf4c363e800d2133d0d143363871d9c17b8fc5cf6d3cfd585bc80730a40cf8d8186241d45e19785c117956de919999d50e473aaa794b8fd4097000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000"; @@ -243,6 +255,8 @@ mod tests { let (meta, trans, _proof) = <(BlockMetadata, Transition, TierProof)>::abi_decode_params(&input, false).unwrap(); let meta_hash: B256 = keccak::keccak(meta.abi_encode()).into(); + let proof_of_equivalence = (KzgField::default(), KzgField::default()); + let pi_hash = keccak::keccak( ( "VERIFY_PROOF", @@ -252,6 +266,7 @@ mod tests { address!("4F3F0D5B22338f1f991a1a9686C7171389C97Ff7"), address!("4F3F0D5B22338f1f991a1a9686C7171389C97Ff7"), meta_hash, + // proof_of_equivalence, ) .abi_encode() .iter() diff --git a/provers/risc0/driver/src/lib.rs b/provers/risc0/driver/src/lib.rs index aa9f0f7d..59e6642a 100644 --- a/provers/risc0/driver/src/lib.rs +++ b/provers/risc0/driver/src/lib.rs @@ -50,11 +50,11 @@ impl Prover for Risc0Prover { println!("elf code length: {}", RISC0_GUEST_ELF.len()); let encoded_input = to_vec(&input).expect("Could not serialize proving input!"); - let result = maybe_prove::>)>( + let result = maybe_prove::( &config, encoded_input, RISC0_GUEST_ELF, - &(output.hash, output.proof_of_equivalence.clone()), + &output.hash, Default::default(), ) .await; diff --git a/provers/risc0/guest/src/main.rs b/provers/risc0/guest/src/main.rs index 1f13e32a..070e8802 100644 --- a/provers/risc0/guest/src/main.rs +++ b/provers/risc0/guest/src/main.rs @@ -3,7 +3,6 @@ harness::entrypoint!(main, tests, zk_op::tests); use risc0_zkvm::guest::env; use raiko_lib::protocol_instance::ProtocolInstance; -use raiko_lib::primitives::eip4844::proof_of_equivalence; use raiko_lib::{ builder::{BlockBuilderStrategy, TaikoStrategy}, consts::VerifierType, @@ -28,10 +27,8 @@ fn main() { let pi = ProtocolInstance::new(&input, &header, VerifierType::RISC0) .unwrap() .instance_hash(); - let y = proof_of_equivalence(&input).unwrap(); env::commit(&pi); - env::commit(&y); } harness::zk_suits!( diff --git a/provers/sp1/guest/src/main.rs b/provers/sp1/guest/src/main.rs index 302f34d9..833ff6fd 100644 --- a/provers/sp1/guest/src/main.rs +++ b/provers/sp1/guest/src/main.rs @@ -7,7 +7,6 @@ use raiko_lib::{ consts::VerifierType, input::{GuestInput}, protocol_instance::ProtocolInstance, - primitives::eip4844::proof_of_equivalence }; use revm_precompile::zk_op::ZkOperation; use zk_op::Sp1Operator; @@ -31,10 +30,8 @@ pub fn main() { let pi = ProtocolInstance::new(&input, &header, VerifierType::SP1) .unwrap() .instance_hash(); - let y = proof_of_equivalence(&input).unwrap(); sp1_zkvm::io::commit(&pi); - sp1_zkvm::io::commit(&y); } harness::zk_suits!(