Skip to content

Commit

Permalink
rm new crate
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Jan 22, 2025
1 parent 6f2749a commit dc747e6
Show file tree
Hide file tree
Showing 24 changed files with 39 additions and 121 deletions.
27 changes: 2 additions & 25 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ kona-proof-interop = { path = "crates/proof-sdk/proof-interop", version = "0.1.1
kona-std-fpvm = { path = "crates/proof-sdk/std-fpvm", version = "0.1.2", default-features = false }
kona-preimage = { path = "crates/proof-sdk/preimage", version = "0.2.1", default-features = false }
kona-std-fpvm-proc = { path = "crates/proof-sdk/std-fpvm-proc", version = "0.1.2", default-features = false }
kona-preimage-server = { path = "crates/proof-sdk/preimage-server", version = "0.1.0", default-features = false }

# Maili
maili-consensus = { version = "0.1.6", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion bin/host/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ kona-preimage = { workspace = true, features = ["std"] }
kona-proof = { workspace = true, features = ["std"] }
kona-proof-interop.workspace = true
kona-client.workspace = true
kona-preimage-server.workspace = true

# Maili
maili-protocol = { workspace = true, features = ["std", "serde"] }
Expand Down Expand Up @@ -51,6 +50,7 @@ tracing.workspace = true
reqwest.workspace = true
serde_json.workspace = true
async-trait.workspace = true
rocksdb.workspace = true
tokio = { workspace = true, features = ["full"] }
serde = { workspace = true, features = ["derive"] }
clap = { workspace = true, features = ["derive", "env"] }
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion bin/host/src/interop/fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ use alloy_rpc_types::{
};
use anyhow::{anyhow, Result};
use async_trait::async_trait;
use kona_host::KeyValueStore;
use kona_preimage::{
errors::{PreimageOracleError, PreimageOracleResult},
HintRouter, PreimageFetcher, PreimageKey, PreimageKeyType,
};
use kona_preimage_server::KeyValueStore;
use kona_proof_interop::{Hint, HintType, PreState};
use maili_protocol::BlockInfo;
use maili_registry::ROLLUP_CONFIGS;
Expand Down
2 changes: 1 addition & 1 deletion bin/host/src/interop/local_kv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
use super::InteropHostCli;
use alloy_primitives::{keccak256, B256};
use anyhow::Result;
use kona_host::KeyValueStore;
use kona_preimage::PreimageKey;
use kona_preimage_server::KeyValueStore;
use kona_proof_interop::boot::{
L1_HEAD_KEY, L2_AGREED_PRE_STATE_KEY, L2_CHAIN_ID_KEY, L2_CLAIMED_POST_STATE_KEY,
L2_CLAIMED_TIMESTAMP_KEY, L2_ROLLUP_CONFIG_KEY,
Expand Down
12 changes: 5 additions & 7 deletions bin/host/src/interop/orchestrator.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
//! [SingleChainHostCli]'s [HostOrchestrator] + [DetachedHostOrchestrator] implementations.
use super::{InteropFetcher, InteropHostCli, LocalKeyValueStore};
use crate::{
eth::{http_provider, OnlineBlobProvider},
orchestrator::{DetachedHostOrchestrator, HostOrchestrator},
};
use crate::eth::{http_provider, OnlineBlobProvider};
use alloy_provider::{Provider, ReqwestProvider};
use anyhow::{anyhow, Result};
use async_trait::async_trait;
use kona_preimage::{HintWriter, NativeChannel, OracleReader};
use kona_preimage_server::{
DiskKeyValueStore, Fetcher, MemoryKeyValueStore, SharedKeyValueStore, SplitKeyValueStore,
use kona_host::{
DetachedHostOrchestrator, DiskKeyValueStore, Fetcher, HostOrchestrator, MemoryKeyValueStore,
SharedKeyValueStore, SplitKeyValueStore,
};
use kona_preimage::{HintWriter, NativeChannel, OracleReader};
use std::{collections::HashMap, sync::Arc};
use tokio::sync::RwLock;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions bin/host/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,19 @@

mod orchestrator;
pub use orchestrator::{DetachedHostOrchestrator, HostOrchestrator};

mod fetcher;
pub use fetcher::Fetcher;

mod kv;
pub use kv::{
DiskKeyValueStore, KeyValueStore, MemoryKeyValueStore, SharedKeyValueStore, SplitKeyValueStore,
};

mod preimage;
pub use preimage::{
OfflineHintRouter, OfflinePreimageFetcher, OnlineHintRouter, OnlinePreimageFetcher,
};

mod server;
pub use server::PreimageServer;
3 changes: 1 addition & 2 deletions bin/host/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
use crate::cli::{init_tracing_subscriber, HostCli, HostMode};
use anyhow::Result;
use clap::Parser;
use orchestrator::DetachedHostOrchestrator;
use kona_host::DetachedHostOrchestrator;
use tracing::info;

pub mod cli;
pub mod eth;
pub mod interop;
pub mod orchestrator;
pub mod single;

#[tokio::main(flavor = "multi_thread")]
Expand Down
4 changes: 2 additions & 2 deletions bin/host/src/orchestrator.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//! Contains the [HostOrchestrator] trait, which defines entry points for the host to run a given
//! module.
use crate::{Fetcher, PreimageServer, SharedKeyValueStore};
use anyhow::Result;
use async_trait::async_trait;
use kona_preimage::{
BidirectionalChannel, HintReader, HintWriter, NativeChannel, OracleReader, OracleServer,
};
use kona_preimage_server::{Fetcher, PreimageServer, SharedKeyValueStore};
use kona_std_fpvm::{FileChannel, FileDescriptor};
use std::sync::Arc;
use tokio::{sync::RwLock, task};
Expand Down Expand Up @@ -46,7 +46,7 @@ pub trait HostOrchestrator {

/// Constructs the [KeyValueStore] for the host.
///
/// [KeyValueStore]: kona_preimage_server::KeyValueStore
/// [KeyValueStore]: crate::KeyValueStore
fn create_key_value_store(&self) -> Result<SharedKeyValueStore>;

/// Creates a [Fetcher] for the host program's preimage server.
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion bin/host/src/single/fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ use alloy_rpc_types::{
Transaction,
};
use anyhow::{anyhow, Result};
use kona_host::KeyValueStore;
use kona_preimage::{
errors::{PreimageOracleError, PreimageOracleResult},
HintRouter, PreimageFetcher, PreimageKey, PreimageKeyType,
};
use kona_preimage_server::KeyValueStore;
use kona_proof::{Hint, HintType};
use maili_protocol::BlockInfo;
use op_alloy_rpc_types_engine::OpPayloadAttributes;
Expand Down
2 changes: 1 addition & 1 deletion bin/host/src/single/local_kv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
use super::SingleChainHostCli;
use alloy_primitives::B256;
use anyhow::Result;
use kona_host::KeyValueStore;
use kona_preimage::PreimageKey;
use kona_preimage_server::KeyValueStore;
use kona_proof::boot::{
L1_HEAD_KEY, L2_CHAIN_ID_KEY, L2_CLAIM_BLOCK_NUMBER_KEY, L2_CLAIM_KEY, L2_OUTPUT_ROOT_KEY,
L2_ROLLUP_CONFIG_KEY,
Expand Down
12 changes: 5 additions & 7 deletions bin/host/src/single/orchestrator.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
//! [SingleChainHostCli]'s [HostOrchestrator] + [DetachedHostOrchestrator] implementations.
use super::{LocalKeyValueStore, SingleChainFetcher, SingleChainHostCli};
use crate::{
eth::{http_provider, OnlineBlobProvider},
orchestrator::{DetachedHostOrchestrator, HostOrchestrator},
};
use crate::eth::{http_provider, OnlineBlobProvider};
use alloy_provider::ReqwestProvider;
use anyhow::{anyhow, Result};
use async_trait::async_trait;
use kona_preimage::{HintWriter, NativeChannel, OracleReader};
use kona_preimage_server::{
DiskKeyValueStore, Fetcher, MemoryKeyValueStore, SharedKeyValueStore, SplitKeyValueStore,
use kona_host::{
DetachedHostOrchestrator, DiskKeyValueStore, Fetcher, HostOrchestrator, MemoryKeyValueStore,
SharedKeyValueStore, SplitKeyValueStore,
};
use kona_preimage::{HintWriter, NativeChannel, OracleReader};
use std::sync::Arc;
use tokio::sync::RwLock;

Expand Down
2 changes: 1 addition & 1 deletion build/asterisc/asterisc-repro.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends git

# Build kona-client on the selected tag
RUN git checkout $CLIENT_TAG && \
cargo build -Zbuild-std=core,alloc --workspace --bin kona --locked --profile release-client-lto --exclude kona-preimage-server --exclude kona-host && \
cargo build -Zbuild-std=core,alloc --workspace --bin kona --locked --profile release-client-lto --exclude kona-host && \
mv ./target/riscv64imac-unknown-none-elf/release-client-lto/kona /kona-client-elf

################################################################
Expand Down
29 changes: 0 additions & 29 deletions crates/proof-sdk/preimage-server/Cargo.toml

This file was deleted.

17 changes: 0 additions & 17 deletions crates/proof-sdk/preimage-server/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions crates/proof-sdk/preimage-server/src/lib.rs

This file was deleted.

4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ build-cannon *args='':
--platform linux/amd64 \
-v `pwd`/:/workdir \
-w="/workdir" \
ghcr.io/op-rs/kona/cannon-builder:main cargo build --workspace -Zbuild-std=core,alloc $@ --exclude kona-preimage-server --exclude kona-host
ghcr.io/op-rs/kona/cannon-builder:main cargo build --workspace -Zbuild-std=core,alloc $@ --exclude kona-host

# Build for the `asterisc` target. Any crates that require the stdlib are excluded from the build for this target.
build-asterisc *args='':
Expand All @@ -114,7 +114,7 @@ build-asterisc *args='':
--platform linux/amd64 \
-v `pwd`/:/workdir \
-w="/workdir" \
ghcr.io/op-rs/kona/asterisc-builder:main cargo build --workspace -Zbuild-std=core,alloc $@ --exclude kona-preimage-server --exclude kona-host
ghcr.io/op-rs/kona/asterisc-builder:main cargo build --workspace -Zbuild-std=core,alloc $@ --exclude kona-host

# Build the `kona-client` prestate artifacts for the latest release.
build-client-prestate-asterisc-artifacts kona_tag asterisc_tag out='./prestate-artifacts-asterisc':
Expand Down

0 comments on commit dc747e6

Please sign in to comment.