From 79b9accb5b585f8c8fda09a6651e06a27d0dc080 Mon Sep 17 00:00:00 2001 From: leruaa Date: Sat, 30 Nov 2024 03:53:48 -0800 Subject: [PATCH 1/2] feat: update to kona `aurelien/patch-11-29` branch --- Cargo.lock | 167 ++++++++++++++++++------------- Cargo.toml | 20 ++-- programs/fault-proof/Cargo.toml | 1 + programs/fault-proof/src/main.rs | 53 ++++++++-- programs/range/src/main.rs | 27 ++--- utils/client/Cargo.toml | 2 +- utils/client/src/pipes.rs | 15 ++- utils/host/src/fetcher.rs | 10 +- utils/host/src/witnessgen.rs | 5 +- 9 files changed, 179 insertions(+), 121 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dc37dbab..c09266ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -499,6 +499,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c74832aa474b670309c20fffc2a869fa141edab7c79ff7963fad0a08de60bae1" dependencies = [ "alloy-primitives 0.8.12", + "alloy-rpc-types-debug", "alloy-rpc-types-engine", "alloy-rpc-types-eth", "alloy-serde", @@ -519,6 +520,16 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "alloy-rpc-types-debug" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba2253bee958658ebd614c07a61c40580e09dd1fad3f017684314442332ab753" +dependencies = [ + "alloy-primitives 0.8.12", + "serde", +] + [[package]] name = "alloy-rpc-types-engine" version = "0.6.4" @@ -1033,6 +1044,18 @@ dependencies = [ "serde", ] +[[package]] +name = "async-channel" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + [[package]] name = "async-stream" version = "0.3.6" @@ -1726,14 +1749,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] -name = "command-fds" -version = "0.3.0" +name = "concurrent-queue" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bb11bd1378bf3731b182997b40cefe00aba6a6cc74042c8318c1b271d3badf7" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ - "nix", - "thiserror 1.0.69", - "tokio", + "crossbeam-utils", ] [[package]] @@ -2589,6 +2610,27 @@ dependencies = [ "tracing", ] +[[package]] +name = "event-listener" +version = "5.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +dependencies = [ + "event-listener", + "pin-project-lite", +] + [[package]] name = "eyre" version = "0.6.12" @@ -2624,6 +2666,7 @@ dependencies = [ "cfg-if", "kona-driver", "kona-executor", + "kona-preimage", "kona-proof", "op-alloy-genesis", "op-alloy-rpc-types-engine", @@ -3692,7 +3735,7 @@ dependencies = [ [[package]] name = "kona-client" version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?rev=574f5f56793ac592b5b31ffdd2cf683ac8371226#574f5f56793ac592b5b31ffdd2cf683ac8371226" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3701,14 +3744,14 @@ dependencies = [ "alloy-rpc-types-engine", "async-trait", "cfg-if", - "kona-common", - "kona-common-proc", "kona-derive", "kona-driver", "kona-executor", "kona-mpt", "kona-preimage", "kona-proof", + "kona-std-fpvm", + "kona-std-fpvm-proc", "lru", "op-alloy-consensus", "op-alloy-genesis", @@ -3722,33 +3765,10 @@ dependencies = [ "tracing", ] -[[package]] -name = "kona-common" -version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?rev=574f5f56793ac592b5b31ffdd2cf683ac8371226#574f5f56793ac592b5b31ffdd2cf683ac8371226" -dependencies = [ - "cfg-if", - "linked_list_allocator", - "thiserror 2.0.3", -] - -[[package]] -name = "kona-common-proc" -version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?rev=574f5f56793ac592b5b31ffdd2cf683ac8371226#574f5f56793ac592b5b31ffdd2cf683ac8371226" -dependencies = [ - "anyhow", - "cfg-if", - "kona-common", - "proc-macro2", - "quote", - "syn 2.0.87", -] - [[package]] name = "kona-derive" version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?rev=574f5f56793ac592b5b31ffdd2cf683ac8371226#574f5f56793ac592b5b31ffdd2cf683ac8371226" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3767,7 +3787,7 @@ dependencies = [ [[package]] name = "kona-driver" version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?rev=574f5f56793ac592b5b31ffdd2cf683ac8371226#574f5f56793ac592b5b31ffdd2cf683ac8371226" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" dependencies = [ "alloy-consensus", "alloy-primitives 0.8.12", @@ -3785,7 +3805,7 @@ dependencies = [ [[package]] name = "kona-executor" version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?rev=574f5f56793ac592b5b31ffdd2cf683ac8371226#574f5f56793ac592b5b31ffdd2cf683ac8371226" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3803,7 +3823,7 @@ dependencies = [ [[package]] name = "kona-host" version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?rev=574f5f56793ac592b5b31ffdd2cf683ac8371226#574f5f56793ac592b5b31ffdd2cf683ac8371226" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3818,17 +3838,15 @@ dependencies = [ "anyhow", "async-trait", "clap", - "command-fds", - "futures", "kona-client", - "kona-common", "kona-derive", "kona-mpt", "kona-preimage", "kona-proof", + "kona-std-fpvm", "op-alloy-genesis", "op-alloy-protocol", - "os_pipe", + "op-alloy-rpc-types-engine", "reqwest 0.12.9", "revm", "rocksdb", @@ -3842,7 +3860,7 @@ dependencies = [ [[package]] name = "kona-mpt" version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?rev=574f5f56793ac592b5b31ffdd2cf683ac8371226#574f5f56793ac592b5b31ffdd2cf683ac8371226" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" dependencies = [ "alloy-primitives 0.8.12", "alloy-rlp", @@ -3854,9 +3872,10 @@ dependencies = [ [[package]] name = "kona-preimage" version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?rev=574f5f56793ac592b5b31ffdd2cf683ac8371226#574f5f56793ac592b5b31ffdd2cf683ac8371226" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" dependencies = [ "alloy-primitives 0.8.12", + "async-channel", "async-trait", "rkyv 0.8.8", "thiserror 2.0.3", @@ -3866,7 +3885,7 @@ dependencies = [ [[package]] name = "kona-proof" version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?rev=574f5f56793ac592b5b31ffdd2cf683ac8371226#574f5f56793ac592b5b31ffdd2cf683ac8371226" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3888,9 +3907,36 @@ dependencies = [ "serde_json", "spin 0.9.8", "thiserror 2.0.3", + "tokio", + "tracing", +] + +[[package]] +name = "kona-std-fpvm" +version = "0.1.0" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" +dependencies = [ + "async-trait", + "cfg-if", + "kona-preimage", + "linked_list_allocator", + "thiserror 2.0.3", "tracing", ] +[[package]] +name = "kona-std-fpvm-proc" +version = "0.1.0" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" +dependencies = [ + "anyhow", + "cfg-if", + "kona-std-fpvm", + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "kzg-rs" version = "0.2.3" @@ -3944,7 +3990,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -4132,17 +4178,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "nix" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" -dependencies = [ - "bitflags 2.6.0", - "cfg-if", - "libc", -] - [[package]] name = "nohash-hasher" version = "0.2.0" @@ -4340,7 +4375,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 2.0.87", @@ -4496,9 +4531,11 @@ dependencies = [ "alloy-eips", "alloy-primitives 0.8.12", "alloy-rpc-types-engine", + "alloy-serde", "derive_more 1.0.0", "op-alloy-consensus", "op-alloy-protocol", + "serde", "thiserror 2.0.3", ] @@ -4524,13 +4561,13 @@ dependencies = [ "async-trait", "itertools 0.13.0", "kona-client", - "kona-common", "kona-derive", "kona-driver", "kona-executor", "kona-mpt", "kona-preimage", "kona-proof", + "kona-std-fpvm", "kzg-rs", "log", "op-alloy-consensus", @@ -4751,16 +4788,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" -[[package]] -name = "os_pipe" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffd2b0a5634335b135d5728d84c5e0fd726954b87111f7506a61c502280d982" -dependencies = [ - "libc", - "windows-sys 0.59.0", -] - [[package]] name = "overload" version = "0.1.1" @@ -5083,6 +5110,12 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + [[package]] name = "parking_lot" version = "0.12.3" diff --git a/Cargo.toml b/Cargo.toml index 14e55dcf..f1909e79 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,18 +44,18 @@ tracing-subscriber = { version = "0.3.18", features = ["fmt"] } # kona # Note: Switch to latest version of kona once the std::process::Command issue is resolved. # Branch: patch-kona-proof-v0.1.0 -kona-common = { git = "https://github.com/succinctlabs/kona", rev = "574f5f56793ac592b5b31ffdd2cf683ac8371226" } -kona-common-proc = { git = "https://github.com/succinctlabs/kona", rev = "574f5f56793ac592b5b31ffdd2cf683ac8371226" } -kona-preimage = { git = "https://github.com/succinctlabs/kona", rev = "574f5f56793ac592b5b31ffdd2cf683ac8371226", features = [ +kona-std-fpvm = { git = "https://github.com/succinctlabs/kona", branch = "aurelien/patch-11-29" } +kona-std-fpvm-proc = { git = "https://github.com/succinctlabs/kona", branch = "aurelien/patch-11-29" } +kona-preimage = { git = "https://github.com/succinctlabs/kona", branch = "aurelien/patch-11-29", features = [ "rkyv", ] } -kona-mpt = { git = "https://github.com/succinctlabs/kona", rev = "574f5f56793ac592b5b31ffdd2cf683ac8371226" } -kona-driver = { git = "https://github.com/succinctlabs/kona", rev = "574f5f56793ac592b5b31ffdd2cf683ac8371226" } -kona-derive = { git = "https://github.com/succinctlabs/kona", rev = "574f5f56793ac592b5b31ffdd2cf683ac8371226", default-features = false } -kona-executor = { git = "https://github.com/succinctlabs/kona", rev = "574f5f56793ac592b5b31ffdd2cf683ac8371226" } -kona-client = { git = "https://github.com/succinctlabs/kona", rev = "574f5f56793ac592b5b31ffdd2cf683ac8371226" } -kona-host = { git = "https://github.com/succinctlabs/kona", rev = "574f5f56793ac592b5b31ffdd2cf683ac8371226" } -kona-proof = { git = "https://github.com/succinctlabs/kona", rev = "574f5f56793ac592b5b31ffdd2cf683ac8371226" } +kona-mpt = { git = "https://github.com/succinctlabs/kona", branch = "aurelien/patch-11-29" } +kona-driver = { git = "https://github.com/succinctlabs/kona", branch = "aurelien/patch-11-29" } +kona-derive = { git = "https://github.com/succinctlabs/kona", branch = "aurelien/patch-11-29", default-features = false } +kona-executor = { git = "https://github.com/succinctlabs/kona", branch = "aurelien/patch-11-29" } +kona-client = { git = "https://github.com/succinctlabs/kona", branch = "aurelien/patch-11-29" } +kona-host = { git = "https://github.com/succinctlabs/kona", branch = "aurelien/patch-11-29" } +kona-proof = { git = "https://github.com/succinctlabs/kona", branch = "aurelien/patch-11-29" } # op-succinct op-succinct-prove = { path = "scripts/prove" } diff --git a/programs/fault-proof/Cargo.toml b/programs/fault-proof/Cargo.toml index 02e995cd..c1adfb2e 100644 --- a/programs/fault-proof/Cargo.toml +++ b/programs/fault-proof/Cargo.toml @@ -21,6 +21,7 @@ sp1-zkvm = { workspace = true } kona-executor.workspace = true kona-driver.workspace = true kona-proof.workspace = true +kona-preimage.workspace = true # op-succinct op-succinct-client-utils.workspace = true diff --git a/programs/fault-proof/src/main.rs b/programs/fault-proof/src/main.rs index 0946df78..88fd88eb 100644 --- a/programs/fault-proof/src/main.rs +++ b/programs/fault-proof/src/main.rs @@ -12,14 +12,18 @@ extern crate alloc; use alloc::sync::Arc; +use alloy_consensus::{Header, Sealed}; use cfg_if::cfg_if; use kona_driver::Driver; +use kona_executor::TrieDBProvider; +use kona_preimage::{CommsClient, PreimageKey, PreimageKeyType}; use kona_proof::{ - executor::KonaExecutorConstructor, + errors::OracleProviderError, + executor::KonaExecutor, l1::{OracleBlobProvider, OracleL1ChainProvider, OraclePipeline}, l2::OracleL2ChainProvider, sync::new_pipeline_cursor, - BootInfo, + BootInfo, HintType, }; use op_succinct_client_utils::precompiles::zkvm_handle_register; @@ -84,16 +88,19 @@ fn main() { } let l1_provider = OracleL1ChainProvider::new(boot.clone(), oracle.clone()); - let l2_provider = OracleL2ChainProvider::new(boot.clone(), oracle.clone()); + let mut l2_provider = OracleL2ChainProvider::new(boot.clone(), oracle.clone()); let beacon = OracleBlobProvider::new(oracle.clone()); + let safe_head = fetch_safe_head(oracle.as_ref(), boot.as_ref(), &mut l2_provider) + .await + .unwrap(); //////////////////////////////////////////////////////////////// // DERIVATION & EXECUTION // //////////////////////////////////////////////////////////////// let cursor = new_pipeline_cursor( - oracle.clone(), &boot, + safe_head, &mut l1_provider.clone(), &mut l2_provider.clone(), ) @@ -109,17 +116,18 @@ fn main() { l1_provider.clone(), l2_provider.clone(), ); - let executor = KonaExecutorConstructor::new( + let executor = KonaExecutor::new( &cfg, l2_provider.clone(), l2_provider, - zkvm_handle_register, + Some(zkvm_handle_register), + None, ); let mut driver = Driver::new(cursor, executor, pipeline); println!("cycle-tracker-start: produce-output"); let (number, output_root) = driver - .advance_to_target(&boot.rollup_config, boot.claimed_l2_block_number) + .advance_to_target(&boot.rollup_config, Some(boot.claimed_l2_block_number)) .await .unwrap(); println!("cycle-tracker-end: produce-output"); @@ -134,3 +142,34 @@ fn main() { println!("Validated derivation and STF. Output Root: {}", output_root); }); } + +/// Fetches the safe head of the L2 chain based on the agreed upon L2 output root in the +/// [BootInfo]. +async fn fetch_safe_head( + caching_oracle: &O, + boot_info: &BootInfo, + l2_chain_provider: &mut OracleL2ChainProvider, +) -> Result, OracleProviderError> +where + O: CommsClient, +{ + caching_oracle + .write(&HintType::StartingL2Output.encode_with(&[boot_info.agreed_l2_output_root.as_ref()])) + .await + .map_err(OracleProviderError::Preimage)?; + let mut output_preimage = [0u8; 128]; + caching_oracle + .get_exact( + PreimageKey::new(*boot_info.agreed_l2_output_root, PreimageKeyType::Keccak256), + &mut output_preimage, + ) + .await + .map_err(OracleProviderError::Preimage)?; + + let safe_hash = output_preimage[96..128] + .try_into() + .map_err(OracleProviderError::SliceConversion)?; + l2_chain_provider + .header_by_hash(safe_hash) + .map(|header| Sealed::new_unchecked(header, safe_hash)) +} diff --git a/programs/range/src/main.rs b/programs/range/src/main.rs index 637bf5b4..a0efdb71 100644 --- a/programs/range/src/main.rs +++ b/programs/range/src/main.rs @@ -22,13 +22,10 @@ use kona_derive::{ prelude::{Pipeline, SignalReceiver}, types::Signal, }; -use kona_driver::{ - DriverError, DriverPipeline, DriverResult, Executor, ExecutorConstructor, PipelineCursor, - TipCursor, -}; +use kona_driver::{DriverError, DriverPipeline, DriverResult, Executor, PipelineCursor, TipCursor}; use kona_preimage::CommsClient; use kona_proof::{ - executor::KonaExecutorConstructor, + executor::KonaExecutor, l1::{OracleBlobProvider, OracleL1ChainProvider}, BootInfo, FlushableCache, }; @@ -160,11 +157,12 @@ fn main() { l1_provider.clone(), l2_provider.clone(), ); - let executor = KonaExecutorConstructor::new( + let mut executor = KonaExecutor::new( &cfg, l2_provider.clone(), l2_provider.clone(), - zkvm_handle_register, + Some(zkvm_handle_register), + None, ); // Run the derivation pipeline until we are able to produce the output root of the claimed @@ -173,7 +171,7 @@ fn main() { let (number, output_root) = advance_to_target( &mut pipeline, - &executor, + &mut executor, &mut cursor, &mut l2_provider, &boot, @@ -210,9 +208,9 @@ fn main() { // After each block execution, we update the L2 provider's caches (header_by_number, block_by_number, // system_config_by_number, l2_block_info_by_number) with the new block data. This ensures subsequent // lookups for this block number can be served directly from cache rather than requiring oracle queries. -pub async fn advance_to_target( +pub async fn advance_to_target( pipeline: &mut DP, - executor: &EC, + executor: &mut E, cursor: &mut PipelineCursor, l2_provider: &mut MultiblockOracleL2ChainProvider, boot: &BootInfo, @@ -221,7 +219,6 @@ pub async fn advance_to_target( ) -> DriverResult<(u64, B256), E::Error> where E: Executor + Send + Sync + Debug, - EC: ExecutorConstructor + Send + Sync + Debug, DP: DriverPipeline

+ Send + Sync + Debug, P: Pipeline + SignalReceiver + Send + Sync + Debug, O: CommsClient + FlushableCache + FlushableCache + Send + Sync + Debug, @@ -259,8 +256,7 @@ where println!("cycle-tracker-report-end: payload-derivation"); println!("cycle-tracker-report-start: block-execution"); - let mut block_executor = executor.new_executor(cursor.l2_safe_head_header().clone()); - let header = match block_executor.execute_payload(attributes.clone()) { + let header = match executor.execute_payload(attributes.clone()) { Ok(header) => header, Err(e) => { error!(target: "client", "Failed to execute L2 block: {}", e); @@ -283,8 +279,7 @@ where }); // Retry the execution. - block_executor = executor.new_executor(cursor.l2_safe_head_header().clone()); - match block_executor.execute_payload(attributes.clone()) { + match executor.execute_payload(attributes.clone()) { Ok(header) => header, Err(e) => { error!( @@ -332,7 +327,7 @@ where let tip_cursor = TipCursor::new( l2_info, header.clone().seal_slow(), - block_executor + executor .compute_output_root() .map_err(DriverError::Executor)?, ); diff --git a/utils/client/Cargo.toml b/utils/client/Cargo.toml index 54120bb5..46534d09 100644 --- a/utils/client/Cargo.toml +++ b/utils/client/Cargo.toml @@ -26,7 +26,7 @@ op-alloy-protocol.workspace = true op-alloy-rpc-types-engine.workspace = true # workspace (kona) -kona-common.workspace = true +kona-std-fpvm.workspace = true kona-client.workspace = true kona-preimage.workspace = true kona-mpt.workspace = true diff --git a/utils/client/src/pipes.rs b/utils/client/src/pipes.rs index cc20a4ca..bbc8585a 100644 --- a/utils/client/src/pipes.rs +++ b/utils/client/src/pipes.rs @@ -1,19 +1,18 @@ //! Contains FPVM-specific constructs for the `kona-client` program. -use kona_client::PipeHandle; -use kona_common::FileDescriptor; use kona_preimage::{HintWriter, OracleReader}; +use kona_std_fpvm::{FileChannel, FileDescriptor}; /// The global preimage oracle reader pipe. -static ORACLE_READER_PIPE: PipeHandle = - PipeHandle::new(FileDescriptor::PreimageRead, FileDescriptor::PreimageWrite); +static ORACLE_READER_PIPE: FileChannel = + FileChannel::new(FileDescriptor::PreimageRead, FileDescriptor::PreimageWrite); /// The global hint writer pipe. -static HINT_WRITER_PIPE: PipeHandle = - PipeHandle::new(FileDescriptor::HintRead, FileDescriptor::HintWrite); +static HINT_WRITER_PIPE: FileChannel = + FileChannel::new(FileDescriptor::HintRead, FileDescriptor::HintWrite); /// The global preimage oracle reader. -pub static ORACLE_READER: OracleReader = OracleReader::new(ORACLE_READER_PIPE); +pub static ORACLE_READER: OracleReader = OracleReader::new(ORACLE_READER_PIPE); /// The global hint writer. -pub static HINT_WRITER: HintWriter = HintWriter::new(HINT_WRITER_PIPE); +pub static HINT_WRITER: HintWriter = HintWriter::new(HINT_WRITER_PIPE); diff --git a/utils/host/src/fetcher.rs b/utils/host/src/fetcher.rs index 1a491ab4..39828784 100644 --- a/utils/host/src/fetcher.rs +++ b/utils/host/src/fetcher.rs @@ -690,14 +690,6 @@ impl OPSuccinctDataFetcher { } }; - // The native programs are built with profile release-client-lto in build.rs - let exec_directory = match multi_block { - ProgramType::Single => { - format!("{}/target/release-client-lto/fault-proof", workspace_root) - } - ProgramType::Multi => format!("{}/target/release-client-lto/range", workspace_root), - }; - // Delete the data directory if the cache mode is DeleteCache. match cache_mode { CacheMode::KeepCache => (), @@ -745,7 +737,7 @@ impl OPSuccinctDataFetcher { .to_string(), ), data_dir: Some(data_directory.into()), - exec: Some(exec_directory), + native: true, server: false, rollup_config_path: Some(rollup_config_path), v: std::env::var("VERBOSITY") diff --git a/utils/host/src/witnessgen.rs b/utils/host/src/witnessgen.rs index c3fcb7d1..446ed97a 100644 --- a/utils/host/src/witnessgen.rs +++ b/utils/host/src/witnessgen.rs @@ -40,9 +40,8 @@ pub fn convert_host_cli_to_args(host_cli: &HostCli) -> Vec { args.push("--data-dir".to_string()); args.push(dir.to_string_lossy().into_owned()); } - if let Some(exec) = &host_cli.exec { - args.push("--exec".to_string()); - args.push(exec.to_string()); + if host_cli.native { + args.push("--native".to_string()); } if host_cli.server { args.push("--server".to_string()); From 31882342c6e8fbde395733e6166ce4999dc9d55f Mon Sep 17 00:00:00 2001 From: leruaa Date: Mon, 2 Dec 2024 06:42:29 -0800 Subject: [PATCH 2/2] chore: update kona revision --- Cargo.lock | 22 +++++++++++----------- scripts/prove/bin/multi.rs | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c09266ec..4c592899 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3735,7 +3735,7 @@ dependencies = [ [[package]] name = "kona-client" version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#b6eb4f657b64913f0ee90b90aaffe155dd29e806" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3768,7 +3768,7 @@ dependencies = [ [[package]] name = "kona-derive" version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#b6eb4f657b64913f0ee90b90aaffe155dd29e806" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3787,7 +3787,7 @@ dependencies = [ [[package]] name = "kona-driver" version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#b6eb4f657b64913f0ee90b90aaffe155dd29e806" dependencies = [ "alloy-consensus", "alloy-primitives 0.8.12", @@ -3805,7 +3805,7 @@ dependencies = [ [[package]] name = "kona-executor" version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#b6eb4f657b64913f0ee90b90aaffe155dd29e806" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3823,7 +3823,7 @@ dependencies = [ [[package]] name = "kona-host" version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#b6eb4f657b64913f0ee90b90aaffe155dd29e806" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3860,7 +3860,7 @@ dependencies = [ [[package]] name = "kona-mpt" version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#b6eb4f657b64913f0ee90b90aaffe155dd29e806" dependencies = [ "alloy-primitives 0.8.12", "alloy-rlp", @@ -3872,7 +3872,7 @@ dependencies = [ [[package]] name = "kona-preimage" version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#b6eb4f657b64913f0ee90b90aaffe155dd29e806" dependencies = [ "alloy-primitives 0.8.12", "async-channel", @@ -3885,7 +3885,7 @@ dependencies = [ [[package]] name = "kona-proof" version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#b6eb4f657b64913f0ee90b90aaffe155dd29e806" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3914,7 +3914,7 @@ dependencies = [ [[package]] name = "kona-std-fpvm" version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#b6eb4f657b64913f0ee90b90aaffe155dd29e806" dependencies = [ "async-trait", "cfg-if", @@ -3927,7 +3927,7 @@ dependencies = [ [[package]] name = "kona-std-fpvm-proc" version = "0.1.0" -source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#3297de4acd94b7b4797f6714542b7489d9c3a5b9" +source = "git+https://github.com/succinctlabs/kona?branch=aurelien/patch-11-29#b6eb4f657b64913f0ee90b90aaffe155dd29e806" dependencies = [ "anyhow", "cfg-if", @@ -4375,7 +4375,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 3.2.0", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 2.0.87", diff --git a/scripts/prove/bin/multi.rs b/scripts/prove/bin/multi.rs index eb2de2b0..8b8dd30c 100644 --- a/scripts/prove/bin/multi.rs +++ b/scripts/prove/bin/multi.rs @@ -116,7 +116,7 @@ async fn main() -> Result<()> { execution_duration.as_secs(), ); - println!("Execution Stats: \n{:?}", stats); + println!("Execution Stats: \n{stats}"); // Create the report directory if it doesn't exist. let report_dir = format!("execution-reports/multi/{}", l2_chain_id);