diff --git a/Cargo.lock b/Cargo.lock index a2a0fee7c..cf17c3af3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6257,7 +6257,7 @@ dependencies = [ [[package]] name = "reth-blockchain-tree-api" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "reth-consensus", "reth-execution-errors", @@ -6269,7 +6269,7 @@ dependencies = [ [[package]] name = "reth-chainspec" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-chains", "alloy-eips", @@ -6288,7 +6288,7 @@ dependencies = [ [[package]] name = "reth-codecs" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6303,7 +6303,7 @@ dependencies = [ [[package]] name = "reth-codecs-derive" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "convert_case 0.6.0", "proc-macro2", @@ -6314,7 +6314,7 @@ dependencies = [ [[package]] name = "reth-consensus" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "auto_impl", "reth-primitives", @@ -6324,7 +6324,7 @@ dependencies = [ [[package]] name = "reth-consensus-common" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "reth-chainspec", "reth-consensus", @@ -6334,7 +6334,7 @@ dependencies = [ [[package]] name = "reth-db" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "bytes", "derive_more", @@ -6360,7 +6360,7 @@ dependencies = [ [[package]] name = "reth-db-api" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "bytes", "derive_more", @@ -6379,7 +6379,7 @@ dependencies = [ [[package]] name = "reth-discv4" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -6403,7 +6403,7 @@ dependencies = [ [[package]] name = "reth-ecies" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "aes 0.8.4", "alloy-primitives", @@ -6434,7 +6434,7 @@ dependencies = [ [[package]] name = "reth-errors" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "reth-blockchain-tree-api", "reth-consensus", @@ -6447,7 +6447,7 @@ dependencies = [ [[package]] name = "reth-eth-wire" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-rlp", "bytes", @@ -6474,7 +6474,7 @@ dependencies = [ [[package]] name = "reth-eth-wire-types" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-rlp", "bytes", @@ -6489,7 +6489,7 @@ dependencies = [ [[package]] name = "reth-ethereum-consensus" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "reth-chainspec", "reth-consensus", @@ -6501,7 +6501,7 @@ dependencies = [ [[package]] name = "reth-ethereum-forks" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-chains", "alloy-primitives", @@ -6514,7 +6514,7 @@ dependencies = [ [[package]] name = "reth-evm" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "auto_impl", "futures-util", @@ -6531,7 +6531,7 @@ dependencies = [ [[package]] name = "reth-evm-ethereum" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-eips", "alloy-sol-types", @@ -6551,7 +6551,7 @@ dependencies = [ [[package]] name = "reth-execution-errors" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-eips", "alloy-primitives", @@ -6565,7 +6565,7 @@ dependencies = [ [[package]] name = "reth-execution-types" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "reth-execution-errors", "reth-primitives", @@ -6576,7 +6576,7 @@ dependencies = [ [[package]] name = "reth-fs-util" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "serde_json", "thiserror", @@ -6585,7 +6585,7 @@ dependencies = [ [[package]] name = "reth-metrics" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "metrics", "reth-metrics-derive", @@ -6594,7 +6594,7 @@ dependencies = [ [[package]] name = "reth-metrics-derive" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "once_cell", "proc-macro2", @@ -6606,7 +6606,7 @@ dependencies = [ [[package]] name = "reth-net-common" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-primitives", "tokio", @@ -6615,7 +6615,7 @@ dependencies = [ [[package]] name = "reth-net-nat" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "futures-util", "reqwest 0.12.5", @@ -6627,7 +6627,7 @@ dependencies = [ [[package]] name = "reth-network-api" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-primitives", "enr 0.12.1", @@ -6642,7 +6642,7 @@ dependencies = [ [[package]] name = "reth-network-p2p" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "auto_impl", "futures", @@ -6660,7 +6660,7 @@ dependencies = [ [[package]] name = "reth-network-peers" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -6675,7 +6675,7 @@ dependencies = [ [[package]] name = "reth-nippy-jar" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "anyhow", "bincode", @@ -6695,7 +6695,7 @@ dependencies = [ [[package]] name = "reth-primitives" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6729,7 +6729,7 @@ dependencies = [ [[package]] name = "reth-primitives-traits" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6748,7 +6748,7 @@ dependencies = [ [[package]] name = "reth-provider" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-rpc-types-engine", "auto_impl", @@ -6786,7 +6786,7 @@ dependencies = [ [[package]] name = "reth-prune-types" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-primitives", "bytes", @@ -6800,7 +6800,7 @@ dependencies = [ [[package]] name = "reth-revm" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-eips", "alloy-rlp", @@ -6818,7 +6818,7 @@ dependencies = [ [[package]] name = "reth-rpc-types" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-primitives", "alloy-rpc-types", @@ -6837,7 +6837,7 @@ dependencies = [ [[package]] name = "reth-stages-types" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-primitives", "bytes", @@ -6850,7 +6850,7 @@ dependencies = [ [[package]] name = "reth-static-file-types" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-primitives", "derive_more", @@ -6861,7 +6861,7 @@ dependencies = [ [[package]] name = "reth-storage-api" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "auto_impl", "reth-chainspec", @@ -6878,7 +6878,7 @@ dependencies = [ [[package]] name = "reth-storage-errors" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "reth-fs-util", "reth-primitives", @@ -6888,7 +6888,7 @@ dependencies = [ [[package]] name = "reth-tracing" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "clap 4.5.8", "eyre", @@ -6903,7 +6903,7 @@ dependencies = [ [[package]] name = "reth-trie" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-rlp", "auto_impl", @@ -6924,7 +6924,7 @@ dependencies = [ [[package]] name = "reth-trie-common" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-consensus", "alloy-genesis", diff --git a/core/src/interfaces.rs b/core/src/interfaces.rs index eb385b385..df23bc5d6 100644 --- a/core/src/interfaces.rs +++ b/core/src/interfaces.rs @@ -2,6 +2,7 @@ use crate::{merge, prover::NativeProver}; use alloy_primitives::{Address, B256}; use clap::{Args, ValueEnum}; use raiko_lib::{ + consts::VerifierType, input::{BlobProofType, GuestInput, GuestOutput}, primitives::eip4844::{calc_kzg_proof, commitment_to_version_hash, kzg_proof_to_bytes}, prover::{IdStore, IdWrite, Proof, ProofKey, Prover, ProverError}, @@ -153,6 +154,17 @@ impl TryFrom for ProofType { } } +impl From for VerifierType { + fn from(val: ProofType) -> Self { + match val { + ProofType::Native => VerifierType::None, + ProofType::Sp1 => VerifierType::SP1, + ProofType::Sgx => VerifierType::SGX, + ProofType::Risc0 => VerifierType::RISC0, + } + } +} + impl ProofType { /// Run the prover driver depending on the proof type. pub async fn run_prover( @@ -165,7 +177,7 @@ impl ProofType { let mut proof = match self { ProofType::Native => NativeProver::run(input.clone(), output, config, store) .await - .map_err(|e| e.into()), + .map_err(>::into), ProofType::Sp1 => { #[cfg(feature = "sp1")] return sp1_driver::Sp1Prover::run(input.clone(), output, config, store) @@ -217,7 +229,7 @@ impl ProofType { match self { ProofType::Native => NativeProver::cancel(proof_key, read) .await - .map_err(|e| e.into()), + .map_err(>::into), ProofType::Sp1 => { #[cfg(feature = "sp1")] return sp1_driver::Sp1Prover::cancel(proof_key, read) diff --git a/core/src/lib.rs b/core/src/lib.rs index 40b11989f..2798affb8 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -12,12 +12,9 @@ use raiko_lib::{ prover::ProofKey, }; use raiko_lib::{ - consts::{ChainSpec, VerifierType}, - prover::IdStore, -}; -use raiko_lib::{ + consts::ChainSpec, input::{GuestInput, GuestOutput, TaikoProverData}, - prover::IdWrite, + prover::{IdStore, IdWrite}, }; use reth_primitives::Header; use serde_json::Value; @@ -88,7 +85,7 @@ impl Raiko { Ok(GuestOutput { header: header.clone(), - hash: ProtocolInstance::new(input, &header, VerifierType::None)? + hash: ProtocolInstance::new(input, &header, self.request.proof_type.into())? .instance_hash(), }) } diff --git a/host/config/chain_spec_list_devnet.json b/host/config/chain_spec_list_devnet.json new file mode 100644 index 000000000..bb9fa4edc --- /dev/null +++ b/host/config/chain_spec_list_devnet.json @@ -0,0 +1,65 @@ +[ + { + "name": "taiko_dev_l1", + "chain_id": 32382, + "max_spec_id": "CANCUN", + "hard_forks": { + "FRONTIER": { + "Block": 0 + }, + "SHANGHAI": { + "Timestamp": 0 + }, + "CANCUN": { + "Timestamp": 0 + } + }, + "eip_1559_constants": { + "base_fee_change_denominator": "0x8", + "base_fee_max_increase_denominator": "0x8", + "base_fee_max_decrease_denominator": "0x8", + "elasticity_multiplier": "0x2" + }, + "l1_contract": null, + "l2_contract": null, + "rpc": "https://l1rpc.internal.taiko.xyz", + "beacon_rpc": "https://l1beacon.internal.taiko.xyz/", + "verifier_address": { + "SGX": null, + "SP1": null, + "RISC0": null + }, + "genesis_time": 1721296000, + "seconds_per_slot": 12, + "is_taiko": false + }, + { + "name": "taiko_dev", + "chain_id": 167001, + "max_spec_id": "SHANGHAI", + "hard_forks": { + "SHANGHAI": { + "Block": 0 + }, + "CANCUN": "TBD" + }, + "eip_1559_constants": { + "base_fee_change_denominator": "0x8", + "base_fee_max_increase_denominator": "0x8", + "base_fee_max_decrease_denominator": "0x8", + "elasticity_multiplier": "0x2" + }, + "l1_contract": "0xcdE816aFd1B7db50f09831097e71F99877809218", + "l2_contract": "0x1670010000000000000000000000000000010001", + "rpc": "https://rpc.internal.taiko.xyz", + "beacon_rpc": null, + "verifier_address":{ + "SGX":"0xC069c3d2a9f2479F559AD34485698ad5199C555f", + "SP1":null, + "RISC0":"0xde28533011Ef2d6484A03beFD8ffbF31d179AE6A" + }, + "genesis_time": 0, + "seconds_per_slot": 1, + "is_taiko": true + } +] \ No newline at end of file diff --git a/host/src/cache.rs b/host/src/cache.rs index c61d5959a..aa2d655ec 100644 --- a/host/src/cache.rs +++ b/host/src/cache.rs @@ -80,6 +80,7 @@ mod test { use crate::cache; use alloy_primitives::{Address, B256}; + use alloy_provider::Provider; use raiko_core::{ interfaces::{ProofRequest, ProofType}, provider::rpc::RpcBlockDataProvider, @@ -87,7 +88,7 @@ mod test { }; use raiko_lib::input::BlobProofType; use raiko_lib::{ - consts::{Network, SupportedChainSpecs}, + consts::{ChainSpec, Network, SupportedChainSpecs}, input::GuestInput, }; @@ -130,11 +131,18 @@ mod test { (input, provider.clone()) } + async fn get_a_testable_block_num(chain_spec: &ChainSpec) -> u64 { + let provider = RpcBlockDataProvider::new(&chain_spec.rpc, 0).unwrap(); + let height = provider.provider.get_block_number().await.unwrap(); + height - 299582 // a hardcode helka & mainnet height diff for the test + } + #[tokio::test] async fn test_generate_input_from_cache() { let l1 = &Network::Holesky.to_string(); let l2 = &Network::TaikoA7.to_string(); - let block_number: u64 = 123456; + let taiko_chain_spec = SupportedChainSpecs::default().get_chain_spec(l2).unwrap(); + let block_number: u64 = get_a_testable_block_num(&taiko_chain_spec).await; let (input, provider) = create_cache_input(l1, l2, block_number).await; let cache_path = Some("./".into()); assert!(cache::set_input(&cache_path, block_number, l2, &input).is_ok()); diff --git a/lib/src/builder.rs b/lib/src/builder.rs index 37b4edbe1..164a404af 100644 --- a/lib/src/builder.rs +++ b/lib/src/builder.rs @@ -12,7 +12,7 @@ use crate::{ CycleTracker, }; use anyhow::{bail, ensure, Result}; -use reth_chainspec::{ChainSpecBuilder, HOLESKY, MAINNET, TAIKO_A7, TAIKO_MAINNET}; +use reth_chainspec::{ChainSpecBuilder, HOLESKY, MAINNET, TAIKO_A7, TAIKO_DEV, TAIKO_MAINNET}; use reth_evm::execute::{BlockExecutionOutput, BlockValidationError, Executor, ProviderError}; use reth_evm_ethereum::execute::{ validate_block_post_execution, Consensus, EthBeaconConsensus, EthExecutorProvider, @@ -92,6 +92,7 @@ impl + DatabaseCommit + OptimisticDatabase> ) } "holesky" => HOLESKY.clone(), + "taiko_dev" => TAIKO_DEV.clone(), _ => unimplemented!(), }; diff --git a/provers/risc0/driver/src/lib.rs b/provers/risc0/driver/src/lib.rs index f9237fe77..0269d8387 100644 --- a/provers/risc0/driver/src/lib.rs +++ b/provers/risc0/driver/src/lib.rs @@ -2,6 +2,7 @@ use alloy_primitives::B256; use hex::ToHex; +use log::warn; use raiko_lib::{ input::{GuestInput, GuestOutput}, prover::{IdStore, IdWrite, Proof, ProofKey, Prover, ProverConfig, ProverError, ProverResult}, @@ -83,7 +84,7 @@ impl Prover for Risc0Prover { let journal: String = result.clone().unwrap().1.journal.encode_hex(); // Create/verify Groth16 SNARK - if config.snark { + let snark_proof = if config.snark { let Some((stark_uuid, stark_receipt)) = result else { return Err(ProverError::GuestError( "No STARK data to snarkify!".to_owned(), @@ -97,12 +98,17 @@ impl Prover for Risc0Prover { traicing_info!("Validating SNARK uuid: {snark_uuid}"); - verify_groth16_snark(image_id, snark_receipt) + let enc_proof = verify_groth16_snark(image_id, snark_receipt) .await .map_err(|err| format!("Failed to verify SNARK: {err:?}"))?; - } - Ok(Risc0Response { proof: journal }.into()) + format!("0x{}", hex::encode(enc_proof)) + } else { + warn!("proof is not in snark mode, please check."); + journal + }; + + Ok(Risc0Response { proof: snark_proof }.into()) } async fn cancel(key: ProofKey, id_store: Box<&mut dyn IdStore>) -> ProverResult<()> { diff --git a/provers/risc0/driver/src/methods/risc0_guest.rs b/provers/risc0/driver/src/methods/risc0_guest.rs index 0adb21f8b..7195a27f2 100644 --- a/provers/risc0/driver/src/methods/risc0_guest.rs +++ b/provers/risc0/driver/src/methods/risc0_guest.rs @@ -1,5 +1,5 @@ pub const RISC0_GUEST_ELF: &[u8] = include_bytes!("../../../guest/target/riscv32im-risc0-zkvm-elf/release/risc0-guest"); pub const RISC0_GUEST_ID: [u32; 8] = [ - 1914784930, 3634152083, 2963332796, 2630159414, 3104046433, 3092402903, 3447446567, 3034579556, + 778116790, 3147350329, 3518605327, 2941923414, 1667247192, 584142090, 3914021799, 3838916379, ]; diff --git a/provers/risc0/driver/src/snarks.rs b/provers/risc0/driver/src/snarks.rs index 39a696c3b..e10af3e32 100644 --- a/provers/risc0/driver/src/snarks.rs +++ b/provers/risc0/driver/src/snarks.rs @@ -14,7 +14,8 @@ use std::{str::FromStr, sync::Arc}; -use alloy_sol_types::sol; +use alloy_primitives::B256; +use alloy_sol_types::{sol, SolValue}; use anyhow::Result; use bonsai_sdk::alpha::responses::SnarkReceipt; use ethers_contract::abigen; @@ -154,7 +155,10 @@ pub async fn stark2snark( Ok(snark_data) } -pub async fn verify_groth16_snark(image_id: Digest, snark_receipt: SnarkReceipt) -> Result<()> { +pub async fn verify_groth16_snark( + image_id: Digest, + snark_receipt: SnarkReceipt, +) -> Result> { let verifier_rpc_url = std::env::var("GROTH16_VERIFIER_RPC_URL").expect("env GROTH16_VERIFIER_RPC_URL"); let groth16_verifier_addr = { @@ -180,7 +184,7 @@ pub async fn verify_groth16_snark(image_id: Digest, snark_receipt: SnarkReceipt) tracing_info!("Journal Digest: {}", hex::encode(journal_digest)); let verify_call_res = IRiscZeroVerifier::new(groth16_verifier_addr, http_client) .verify( - seal.into(), + seal.clone().into(), image_id.as_bytes().try_into().unwrap(), journal_digest.into(), ) @@ -192,5 +196,10 @@ pub async fn verify_groth16_snark(image_id: Digest, snark_receipt: SnarkReceipt) tracing_err!("SNARK verification failed: {:?}!", verify_call_res); } - Ok(()) + Ok((seal, B256::from_slice(image_id.as_bytes())) + .abi_encode() + .iter() + .skip(32) + .copied() + .collect()) } diff --git a/provers/risc0/guest/Cargo.lock b/provers/risc0/guest/Cargo.lock index 5e079c0ba..d2f1c996c 100644 --- a/provers/risc0/guest/Cargo.lock +++ b/provers/risc0/guest/Cargo.lock @@ -2129,6 +2129,7 @@ dependencies = [ "thiserror-no-std", "tracing", "url", + "utoipa", ] [[package]] @@ -2237,7 +2238,7 @@ checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reth-chainspec" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-chains", "alloy-eips", @@ -2256,7 +2257,7 @@ dependencies = [ [[package]] name = "reth-codecs" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-consensus", "alloy-eips", @@ -2271,7 +2272,7 @@ dependencies = [ [[package]] name = "reth-codecs-derive" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "convert_case 0.6.0", "proc-macro2", @@ -2282,7 +2283,7 @@ dependencies = [ [[package]] name = "reth-consensus" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "auto_impl", "reth-primitives", @@ -2292,7 +2293,7 @@ dependencies = [ [[package]] name = "reth-consensus-common" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "reth-chainspec", "reth-consensus", @@ -2302,7 +2303,7 @@ dependencies = [ [[package]] name = "reth-db" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "bytes", "derive_more", @@ -2328,7 +2329,7 @@ dependencies = [ [[package]] name = "reth-db-api" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "bytes", "derive_more", @@ -2347,7 +2348,7 @@ dependencies = [ [[package]] name = "reth-ethereum-consensus" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "reth-chainspec", "reth-consensus", @@ -2359,7 +2360,7 @@ dependencies = [ [[package]] name = "reth-ethereum-forks" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-chains", "alloy-primitives", @@ -2372,7 +2373,7 @@ dependencies = [ [[package]] name = "reth-evm" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "auto_impl", "futures-util", @@ -2389,7 +2390,7 @@ dependencies = [ [[package]] name = "reth-evm-ethereum" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-eips", "alloy-sol-types", @@ -2409,7 +2410,7 @@ dependencies = [ [[package]] name = "reth-execution-errors" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-eips", "alloy-primitives", @@ -2423,7 +2424,7 @@ dependencies = [ [[package]] name = "reth-execution-types" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "reth-execution-errors", "reth-primitives", @@ -2434,7 +2435,7 @@ dependencies = [ [[package]] name = "reth-fs-util" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "serde_json", "thiserror", @@ -2443,7 +2444,7 @@ dependencies = [ [[package]] name = "reth-metrics" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "metrics", "reth-metrics-derive", @@ -2452,7 +2453,7 @@ dependencies = [ [[package]] name = "reth-metrics-derive" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "once_cell", "proc-macro2", @@ -2464,7 +2465,7 @@ dependencies = [ [[package]] name = "reth-primitives" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-consensus", "alloy-eips", @@ -2498,7 +2499,7 @@ dependencies = [ [[package]] name = "reth-primitives-traits" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-consensus", "alloy-eips", @@ -2517,7 +2518,7 @@ dependencies = [ [[package]] name = "reth-prune-types" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-primitives", "bytes", @@ -2531,7 +2532,7 @@ dependencies = [ [[package]] name = "reth-revm" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-eips", "alloy-rlp", @@ -2549,7 +2550,7 @@ dependencies = [ [[package]] name = "reth-stages-types" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-primitives", "bytes", @@ -2562,7 +2563,7 @@ dependencies = [ [[package]] name = "reth-static-file-types" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-primitives", "derive_more", @@ -2573,7 +2574,7 @@ dependencies = [ [[package]] name = "reth-storage-api" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "auto_impl", "reth-chainspec", @@ -2590,7 +2591,7 @@ dependencies = [ [[package]] name = "reth-storage-errors" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "reth-fs-util", "reth-primitives", @@ -2600,7 +2601,7 @@ dependencies = [ [[package]] name = "reth-tracing" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "clap", "eyre", @@ -2615,7 +2616,7 @@ dependencies = [ [[package]] name = "reth-trie" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-rlp", "auto_impl", @@ -2634,7 +2635,7 @@ dependencies = [ [[package]] name = "reth-trie-common" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-consensus", "alloy-genesis", @@ -3724,6 +3725,31 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "utoipa" +version = "4.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5afb1a60e207dca502682537fefcfd9921e71d0b83e9576060f09abc6efab23" +dependencies = [ + "indexmap 2.2.6", + "serde", + "serde_json", + "utoipa-gen", +] + +[[package]] +name = "utoipa-gen" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bf0e16c02bc4bf5322ab65f10ab1149bdbcaa782cba66dc7057370a3f8190be" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "regex", + "syn 2.0.68", +] + [[package]] name = "valuable" version = "0.1.0" diff --git a/provers/sp1/guest/Cargo.lock b/provers/sp1/guest/Cargo.lock index a954a20eb..9321d5342 100644 --- a/provers/sp1/guest/Cargo.lock +++ b/provers/sp1/guest/Cargo.lock @@ -1977,6 +1977,7 @@ dependencies = [ "thiserror-no-std", "tracing", "url", + "utoipa", ] [[package]] @@ -2094,7 +2095,7 @@ checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reth-chainspec" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-chains", "alloy-eips", @@ -2113,7 +2114,7 @@ dependencies = [ [[package]] name = "reth-codecs" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-consensus", "alloy-eips", @@ -2128,7 +2129,7 @@ dependencies = [ [[package]] name = "reth-codecs-derive" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "convert_case 0.6.0", "proc-macro2", @@ -2139,7 +2140,7 @@ dependencies = [ [[package]] name = "reth-consensus" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "auto_impl", "reth-primitives", @@ -2149,7 +2150,7 @@ dependencies = [ [[package]] name = "reth-consensus-common" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "reth-chainspec", "reth-consensus", @@ -2159,7 +2160,7 @@ dependencies = [ [[package]] name = "reth-db" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "bytes", "derive_more", @@ -2185,7 +2186,7 @@ dependencies = [ [[package]] name = "reth-db-api" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "bytes", "derive_more", @@ -2204,7 +2205,7 @@ dependencies = [ [[package]] name = "reth-ethereum-consensus" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "reth-chainspec", "reth-consensus", @@ -2216,7 +2217,7 @@ dependencies = [ [[package]] name = "reth-ethereum-forks" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-chains", "alloy-primitives", @@ -2229,7 +2230,7 @@ dependencies = [ [[package]] name = "reth-evm" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "auto_impl", "futures-util", @@ -2246,7 +2247,7 @@ dependencies = [ [[package]] name = "reth-evm-ethereum" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-eips", "alloy-sol-types", @@ -2266,7 +2267,7 @@ dependencies = [ [[package]] name = "reth-execution-errors" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-eips", "alloy-primitives", @@ -2280,7 +2281,7 @@ dependencies = [ [[package]] name = "reth-execution-types" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "reth-execution-errors", "reth-primitives", @@ -2291,7 +2292,7 @@ dependencies = [ [[package]] name = "reth-fs-util" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "serde_json", "thiserror", @@ -2300,7 +2301,7 @@ dependencies = [ [[package]] name = "reth-metrics" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "metrics", "reth-metrics-derive", @@ -2309,7 +2310,7 @@ dependencies = [ [[package]] name = "reth-metrics-derive" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "once_cell", "proc-macro2", @@ -2321,7 +2322,7 @@ dependencies = [ [[package]] name = "reth-primitives" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-consensus", "alloy-eips", @@ -2355,7 +2356,7 @@ dependencies = [ [[package]] name = "reth-primitives-traits" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-consensus", "alloy-eips", @@ -2374,7 +2375,7 @@ dependencies = [ [[package]] name = "reth-prune-types" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-primitives", "bytes", @@ -2388,7 +2389,7 @@ dependencies = [ [[package]] name = "reth-revm" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-eips", "alloy-rlp", @@ -2406,7 +2407,7 @@ dependencies = [ [[package]] name = "reth-stages-types" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-primitives", "bytes", @@ -2419,7 +2420,7 @@ dependencies = [ [[package]] name = "reth-static-file-types" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-primitives", "derive_more", @@ -2430,7 +2431,7 @@ dependencies = [ [[package]] name = "reth-storage-api" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "auto_impl", "reth-chainspec", @@ -2447,7 +2448,7 @@ dependencies = [ [[package]] name = "reth-storage-errors" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "reth-fs-util", "reth-primitives", @@ -2457,7 +2458,7 @@ dependencies = [ [[package]] name = "reth-tracing" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "clap", "eyre", @@ -2472,7 +2473,7 @@ dependencies = [ [[package]] name = "reth-trie" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-rlp", "auto_impl", @@ -2491,7 +2492,7 @@ dependencies = [ [[package]] name = "reth-trie-common" version = "1.0.0-rc.2" -source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#3043c66ac743ef765f7c403f589d124d115ff9eb" +source = "git+https://github.com/taikoxyz/taiko-reth.git?branch=v1.0.0-rc.2-taiko#6cc82cfdce66ee4a8d39bc895c8305f15d9e32a9" dependencies = [ "alloy-consensus", "alloy-genesis", @@ -3496,6 +3497,31 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "utoipa" +version = "4.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5afb1a60e207dca502682537fefcfd9921e71d0b83e9576060f09abc6efab23" +dependencies = [ + "indexmap 2.2.6", + "serde", + "serde_json", + "utoipa-gen", +] + +[[package]] +name = "utoipa-gen" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bf0e16c02bc4bf5322ab65f10ab1149bdbcaa782cba66dc7057370a3f8190be" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "regex", + "syn 2.0.68", +] + [[package]] name = "valuable" version = "0.1.0" diff --git a/provers/sp1/guest/elf/sp1-guest b/provers/sp1/guest/elf/sp1-guest index 09bdf9e15..5e17359b6 100755 Binary files a/provers/sp1/guest/elf/sp1-guest and b/provers/sp1/guest/elf/sp1-guest differ diff --git a/script/install.sh b/script/install.sh index 2c1b1f9dd..d02c37b14 100755 --- a/script/install.sh +++ b/script/install.sh @@ -74,7 +74,7 @@ if [ -z "$1" ] || [ "$1" == "sp1" ]; then source ${PROFILE} sp1up else - echo "/home/runner/.config/.sp1/bin" >> $GITHUB_PATH - /home/runner/.config/.sp1/bin/sp1up + echo "/home/runner/.sp1/bin" >> $GITHUB_PATH + /home/runner/.sp1/bin/sp1up fi fi \ No newline at end of file diff --git a/script/prove-block.sh b/script/prove-block.sh index 6a2cc2923..42c8bf1f7 100755 --- a/script/prove-block.sh +++ b/script/prove-block.sh @@ -32,6 +32,8 @@ elif [ "$chain" == "taiko_mainnet" ]; then l1_network="ethereum" elif [ "$chain" == "taiko_a7" ]; then l1_network="holesky" +elif [ "$chain" == "taiko_dev" ]; then + l1_network="taiko_dev_l1" else echo "Using customized chain name $1. Please double check the RPCs." l1_network="holesky"