Skip to content

Commit

Permalink
chore: create utils folder (#88)
Browse files Browse the repository at this point in the history
* chore: create utils folder

* fix clippy

* fix

* clean

* clean"
gp

---------

Co-authored-by: ratankaliani <[email protected]>
  • Loading branch information
jtguibas and ratankaliani authored Aug 30, 2024
1 parent 62751dd commit b41180c
Show file tree
Hide file tree
Showing 35 changed files with 101 additions and 101 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 = [
"utils/*",
"programs/*",
"crates/*",
"native-host",
"zkvm-host",
"proposer/succinct",
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-client-utils = { path = "utils/client" }
op-succinct-host-utils = { path = "utils/host" }
zkvm-host = { path = "zkvm-host" }
op-succinct-proposer = { path = "proposer/succinct" }

Expand Down
2 changes: 1 addition & 1 deletion 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-client-utils = { workspace = true }
alloy-consensus = { workspace = true }
alloy-primitives = { workspace = true }
serde_cbor.workspace = true
2 changes: 1 addition & 1 deletion 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_client_utils::{types::AggregationInputs, RawBootInfo};
use sha2::{Digest, Sha256};
use std::collections::HashMap;

Expand Down
2 changes: 1 addition & 1 deletion 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-client-utils.workspace = true

# sp1
sp1-zkvm = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions 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_client_utils::{RawBootInfo, InMemoryOracle};
use alloc::vec::Vec;
} else {
use kona_client::CachingOracle;
use client_utils::pipes::{ORACLE_READER, HINT_WRITER};
use op_succinct_client_utils::pipes::{ORACLE_READER, HINT_WRITER};
}
}

fn main() {
client_utils::block_on(async move {
op_succinct_client_utils::block_on(async move {
////////////////////////////////////////////////////////////////
// PROLOGUE //
////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion 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-client-utils.workspace = true

# workspace (ethereum)
op-alloy-consensus.workspace = true
Expand Down
10 changes: 5 additions & 5 deletions programs/range/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//! 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 kona_client::{
l1::{OracleBlobProvider, OracleL1ChainProvider},
BootInfo,
};
use kona_executor::StatelessL2BlockExecutor;
use op_succinct_client_utils::precompiles::ZKVMPrecompileOverride;

use alloy_eips::eip2718::Decodable2718;
use kona_primitives::{L2ExecutionPayloadEnvelope, OpBlock};
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_client_utils::{
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_client_utils::{
RawBootInfo,
InMemoryOracle
};
use alloc::vec::Vec;
} else {
use kona_client::CachingOracle;
use client_utils::pipes::{ORACLE_READER, HINT_WRITER};
use op_succinct_client_utils::pipes::{ORACLE_READER, HINT_WRITER};
}
}

fn main() {
client_utils::block_on(async move {
op_succinct_client_utils::block_on(async move {
////////////////////////////////////////////////////////////////
// PROLOGUE //
////////////////////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions proposer/succinct/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-host-utils.workspace = true

# sp1
sp1-sdk = { workspace = true }

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

# server
Expand Down
2 changes: 1 addition & 1 deletion proposer/succinct/Dockerfile.server
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ COPY zkvm-host ./zkvm-host
COPY proposer/succinct ./proposer/succinct
COPY native-host ./native-host
COPY elf ./elf
COPY crates ./crates
COPY utils ./utils
COPY programs ./programs

# Build the server
Expand Down
8 changes: 4 additions & 4 deletions proposer/succinct/bin/cost_estimator.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
use anyhow::Result;
use clap::Parser;
use host_utils::{
use kona_host::HostCli;
use kona_primitives::RollupConfig;
use log::{error, info};
use op_succinct_host_utils::{
fetcher::{ChainMode, OPSuccinctDataFetcher},
get_proof_stdin,
stats::{get_execution_stats, ExecutionStats},
ProgramType,
};
use kona_host::HostCli;
use kona_primitives::RollupConfig;
use log::{error, info};
use op_succinct_proposer::run_native_host;
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
use reqwest::Client;
Expand Down
2 changes: 1 addition & 1 deletion proposer/succinct/bin/fetch_and_save_proof.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use alloy::hex;
use anyhow::Result;
use clap::Parser;
use client_utils::{RawBootInfo, BOOT_INFO_SIZE};
use dotenv::dotenv;
use op_succinct_client_utils::{RawBootInfo, BOOT_INFO_SIZE};
use sp1_sdk::{NetworkProver, SP1ProofWithPublicValues};
use std::{fs, path::Path};

Expand Down
2 changes: 1 addition & 1 deletion proposer/succinct/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_client_utils::RawBootInfo;
use sp1_sdk::{utils, SP1Stdin};
use std::fs;

Expand Down
6 changes: 3 additions & 3 deletions proposer/succinct/bin/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ use axum::{
Json, Router,
};
use base64::{engine::general_purpose, Engine as _};
use client_utils::{RawBootInfo, BOOT_INFO_SIZE};
use host_utils::{
use log::info;
use op_succinct_client_utils::{RawBootInfo, BOOT_INFO_SIZE};
use op_succinct_host_utils::{
fetcher::OPSuccinctDataFetcher, get_agg_proof_stdin, get_proof_stdin, ProgramType,
};
use log::info;
use op_succinct_proposer::run_native_host;
use serde::{Deserialize, Deserializer, Serialize};
use sp1_sdk::{
Expand Down
Loading

0 comments on commit b41180c

Please sign in to comment.