Skip to content

Commit

Permalink
chore: create utils folder
Browse files Browse the repository at this point in the history
  • Loading branch information
jtguibas committed Aug 30, 2024
1 parent 8c86a57 commit c671d78
Show file tree
Hide file tree
Showing 34 changed files with 95 additions and 95 deletions.
118 changes: 59 additions & 59 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[workspace]
members = [
"client-programs/*",
"crates/*",
"utils/*",
"native-host",
"zkvm-host",
"op-succinct-proposer",
Expand Down Expand Up @@ -58,8 +58,8 @@ rkyv = "0.7.44"
hex = "0.4.3"

# local
client-utils = { path = "crates/client-utils" }
host-utils = { path = "crates/host-utils" }
op-succinct-utils-client = { path = "utils/client" }
op-succinct-utils-host = { path = "utils/host" }
zkvm-host = { path = "zkvm-host" }
op-succinct-proposer = { path = "op-succinct-proposer" }

Expand Down
2 changes: 1 addition & 1 deletion client-programs/aggregation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repository.workspace = true
sha2 = { workspace = true }
sp1-zkvm = { workspace = true }
sp1-lib = { workspace = true }
client-utils = { workspace = true }
op-succinct-utils-client = { workspace = true }
alloy-consensus = { workspace = true }
alloy-primitives = { workspace = true }
serde_cbor.workspace = true
2 changes: 1 addition & 1 deletion client-programs/aggregation/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sp1_zkvm::entrypoint!(main);

use alloy_consensus::Header;
use alloy_primitives::B256;
use client_utils::{types::AggregationInputs, RawBootInfo};
use op_succinct_utils_client::{types::AggregationInputs, RawBootInfo};
use sha2::{Digest, Sha256};
use std::collections::HashMap;

Expand Down
2 changes: 1 addition & 1 deletion client-programs/fault-proof/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ kona-executor.workspace = true
kona-client.workspace = true

# workspace (local)
client-utils.workspace = true
op-succinct-utils-client.workspace = true

# sp1
sp1-zkvm = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions client-programs/fault-proof/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ cfg_if! {
// from SP1 and compile to a program that can be run in zkVM.
if #[cfg(target_os = "zkvm")] {
sp1_zkvm::entrypoint!(main);
use client_utils::{RawBootInfo, InMemoryOracle};
use op_succinct_utils_client::{RawBootInfo, InMemoryOracle};
use alloc::vec::Vec;
} else {
use kona_client::CachingOracle;
use client_utils::pipes::{ORACLE_READER, HINT_WRITER};
use op_succinct_utils_client::pipes::{ORACLE_READER, HINT_WRITER};
}
}

fn main() {
client_utils::block_on(async move {
op_succinct_utils_client::block_on(async move {
////////////////////////////////////////////////////////////////
// PROLOGUE //
////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion client-programs/range/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repository.workspace = true
[dependencies]
# workspace (general)
cfg-if.workspace = true
client-utils.workspace = true
op-succinct-utils-client.workspace = true

# workspace (ethereum)
op-alloy-consensus.workspace = true
Expand Down
10 changes: 5 additions & 5 deletions client-programs/range/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! A program to verify a Optimism L2 block STF in the zkVM.
#![cfg_attr(target_os = "zkvm", no_main)]

use client_utils::precompiles::ZKVMPrecompileOverride;
use op_succinct_utils_client::precompiles::ZKVMPrecompileOverride;
use kona_client::{
l1::{OracleBlobProvider, OracleL1ChainProvider},
BootInfo,
Expand All @@ -16,7 +16,7 @@ use alloc::sync::Arc;
use alloy_consensus::Sealed;
use cfg_if::cfg_if;

use client_utils::{
use op_succinct_utils_client::{
driver::MultiBlockDerivationDriver, l2_chain_provider::MultiblockOracleL2ChainProvider,
};

Expand All @@ -30,19 +30,19 @@ cfg_if! {
if #[cfg(target_os = "zkvm")] {
sp1_zkvm::entrypoint!(main);

use client_utils::{
use op_succinct_utils_client::{
RawBootInfo,
InMemoryOracle
};
use alloc::vec::Vec;
} else {
use kona_client::CachingOracle;
use client_utils::pipes::{ORACLE_READER, HINT_WRITER};
use op_succinct_utils_client::pipes::{ORACLE_READER, HINT_WRITER};
}
}

fn main() {
client_utils::block_on(async move {
op_succinct_utils_client::block_on(async move {
////////////////////////////////////////////////////////////////
// PROLOGUE //
////////////////////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions op-succinct-proposer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ kona-host = { workspace = true }
kona-primitives.workspace = true

# local
host-utils.workspace = true
op-succinct-utils-host.workspace = true

# sp1
sp1-sdk = { workspace = true }

anyhow.workspace = true
dotenv.workspace = true
client-utils.workspace = true
op-succinct-utils-client.workspace = true
serde = { workspace = true }

# server
Expand Down
2 changes: 1 addition & 1 deletion op-succinct-proposer/bin/cost_estimator.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::Result;
use clap::Parser;
use host_utils::{
use op_succinct_utils_host::{
fetcher::{ChainMode, OPSuccinctDataFetcher},
get_proof_stdin,
stats::{get_execution_stats, ExecutionStats},
Expand Down
2 changes: 1 addition & 1 deletion op-succinct-proposer/bin/fetch_and_save_proof.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use alloy::hex;
use anyhow::Result;
use clap::Parser;
use client_utils::{RawBootInfo, BOOT_INFO_SIZE};
use op_succinct_utils_client::{RawBootInfo, BOOT_INFO_SIZE};
use dotenv::dotenv;
use sp1_sdk::{NetworkProver, SP1ProofWithPublicValues};
use std::{fs, path::Path};
Expand Down
2 changes: 1 addition & 1 deletion op-succinct-proposer/bin/load_stdin.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use client_utils::RawBootInfo;
use op_succinct_utils_client::RawBootInfo;
use sp1_sdk::{utils, SP1Stdin};
use std::fs;

Expand Down
4 changes: 2 additions & 2 deletions op-succinct-proposer/bin/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use axum::{
Json, Router,
};
use base64::{engine::general_purpose, Engine as _};
use client_utils::{RawBootInfo, BOOT_INFO_SIZE};
use host_utils::{
use op_succinct_utils_client::{RawBootInfo, BOOT_INFO_SIZE};
use op_succinct_utils_host::{
fetcher::OPSuccinctDataFetcher, get_agg_proof_stdin, get_proof_stdin, ProgramType,
};
use log::info;
Expand Down
2 changes: 1 addition & 1 deletion op-succinct-proposer/bin/span_batch_ranges.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::Result;
use clap::Parser;
use host_utils::fetcher::{ChainMode, OPSuccinctDataFetcher};
use op_succinct_utils_host::fetcher::{ChainMode, OPSuccinctDataFetcher};
use kona_primitives::RollupConfig;
use reqwest::Client;
use serde::{Deserialize, Serialize};
Expand Down
2 changes: 1 addition & 1 deletion crates/client-utils/Cargo.toml → utils/client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "client-utils"
name = "op-succinct-utils-client"
version = "0.1.0"
license.workspace = true
edition.workspace = true
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions crates/host-utils/Cargo.toml → utils/host/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "host-utils"
name = "op-succinct-utils-host"
version = "0.1.0"
license.workspace = true
edition.workspace = true
Expand All @@ -9,7 +9,7 @@ alloy.workspace = true
alloy-primitives.workspace = true
alloy-consensus.workspace = true
alloy-sol-types.workspace = true
client-utils.workspace = true
op-succinct-utils-client.workspace = true
rkyv.workspace = true
kona-host.workspace = true
sp1-sdk.workspace = true
Expand Down
Loading

0 comments on commit c671d78

Please sign in to comment.