Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename everything to Strata #361

Merged
merged 2 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3,586 changes: 1,793 additions & 1,793 deletions Cargo.lock

Large diffs are not rendered by default.

83 changes: 41 additions & 42 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,49 +68,47 @@ default-members = [
resolver = "2"

[workspace.dependencies]
alpen-express-btcio = { path = "crates/btcio" }
alpen-express-common = { path = "crates/common" }
alpen-express-consensus-logic = { path = "crates/consensus-logic" }
alpen-express-crypto = { path = "crates/crypto", default-features = false }
alpen-express-db = { path = "crates/db" }
alpen-express-eectl = { path = "crates/eectl" }
alpen-express-evmexec = { path = "crates/evmexec" }
alpen-express-mmr = { path = "crates/util/mmr" }
alpen-express-primitives = { path = "crates/primitives" }
alpen-express-rocksdb = { path = "crates/rocksdb-store" }
alpen-express-rpc-api = { path = "crates/rpc/api" }
alpen-express-rpc-types = { path = "crates/rpc/types" }
alpen-express-state = { path = "crates/state" }
alpen-express-status = { path = "crates/status" }
alpen-test-utils = { path = "crates/test-utils" }
express-bridge-exec = { path = "crates/bridge-exec" }
express-bridge-relay = { path = "crates/bridge-relay" }
express-bridge-rpc-api = { path = "crates/rpc/bridge-api" }
express-bridge-sig-manager = { path = "crates/bridge-sig-manager" }
express-bridge-tx-builder = { path = "crates/bridge-tx-builder" }
express-chaintsn = { path = "crates/chaintsn" }
express-proofimpl-btc-blockspace = { path = "crates/proof-impl/btc-blockspace" }
express-proofimpl-checkpoint = { path = "crates/proof-impl/checkpoint" }
express-proofimpl-cl-stf = { path = "crates/proof-impl/cl-stf" }
express-proofimpl-evm-ee-stf = { path = "crates/proof-impl/evm-ee-stf" }
express-proofimpl-l1-batch = { path = "crates/proof-impl/l1-batch" }
express-prover-client-rpc-api = { path = "crates/rpc/prover-client-api" }
express-reth-db = { path = "crates/reth/db" }
express-reth-evm = { path = "crates/reth/evm" }
express-reth-exex = { path = "crates/reth/exex" }
express-reth-node = { path = "crates/reth/node" }
express-reth-primitives = { path = "crates/reth/primitives" }
express-reth-rpc = { path = "crates/reth/rpc" }
express-risc0-adapter = { path = "crates/zkvm/adapters/risc0" }
express-rpc-utils = { path = "crates/rpc/utils" }
express-sp1-adapter = { path = "crates/zkvm/adapters/sp1" }
express-storage = { path = "crates/storage" }
express-sync = { path = "crates/sync" }
express-tasks = { path = "crates/tasks" }
express-zkvm = { path = "crates/zkvm/zkvm" } # FIXME make these names more consistent?
strata-bridge-exec = { path = "crates/bridge-exec" }
strata-bridge-relay = { path = "crates/bridge-relay" }
strata-bridge-rpc-api = { path = "crates/rpc/bridge-api" }
strata-bridge-sig-manager = { path = "crates/bridge-sig-manager" }
strata-bridge-tx-builder = { path = "crates/bridge-tx-builder" }
strata-btcio = { path = "crates/btcio" }
strata-chaintsn = { path = "crates/chaintsn" }
strata-common = { path = "crates/common" }
strata-consensus-logic = { path = "crates/consensus-logic" }
strata-crypto = { path = "crates/crypto", default-features = false }
strata-db = { path = "crates/db" }
strata-eectl = { path = "crates/eectl" }
strata-evmexec = { path = "crates/evmexec" }
strata-mmr = { path = "crates/util/mmr" }
strata-primitives = { path = "crates/primitives" }
strata-proofimpl-btc-blockspace = { path = "crates/proof-impl/btc-blockspace" }
strata-proofimpl-checkpoint = { path = "crates/proof-impl/checkpoint" }
strata-proofimpl-cl-stf = { path = "crates/proof-impl/cl-stf" }
strata-proofimpl-evm-ee-stf = { path = "crates/proof-impl/evm-ee-stf" }
strata-proofimpl-l1-batch = { path = "crates/proof-impl/l1-batch" }
strata-prover-client-rpc-api = { path = "crates/rpc/prover-client-api" }
strata-reth-db = { path = "crates/reth/db" }
strata-reth-evm = { path = "crates/reth/evm" }
strata-reth-exex = { path = "crates/reth/exex" }
strata-reth-node = { path = "crates/reth/node" }
strata-reth-primitives = { path = "crates/reth/primitives" }
strata-reth-rpc = { path = "crates/reth/rpc" }
strata-risc0-adapter = { path = "crates/zkvm/adapters/risc0" }
strata-rocksdb = { path = "crates/rocksdb-store" }
strata-rpc-api = { path = "crates/rpc/api" }
strata-rpc-types = { path = "crates/rpc/types" }
strata-rpc-utils = { path = "crates/rpc/utils" }
strata-sp1-adapter = { path = "crates/zkvm/adapters/sp1" }
strata-state = { path = "crates/state" }
strata-status = { path = "crates/status" }
strata-storage = { path = "crates/storage" }
strata-sync = { path = "crates/sync" }
strata-tasks = { path = "crates/tasks" }
strata-test-utils = { path = "crates/test-utils" }
strata-tx-parser = { path = "crates/tx-parser" }
terrors = "0.3.0"
# FIXME make these names more consistent?
strata-zkvm = { path = "crates/zkvm/zkvm" }

# IMPORTANT: ensure alloy-* and revm packages are of the same version as inside reth dependency
alloy-genesis = { version = "0.2", default-features = false }
Expand Down Expand Up @@ -203,6 +201,7 @@ serde_json = { version = "1.0", default-features = false, features = [
serde_with = "3.9.0"
sha2 = "0.10"
tempfile = "3.10.1"
terrors = "0.3.0"
thiserror = "1.0"
threadpool = "1.8"
tokio = { version = "1.37", features = ["full"] }
Expand Down
28 changes: 14 additions & 14 deletions bin/bridge-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
edition = "2021"
name = "express-bridge-client"
name = "strata-bridge-client"
version = "0.1.0"

[[bin]]
name = "express-bridge-client"
name = "strata-bridge-client"
path = "src/main.rs"

[lints]
Expand All @@ -13,18 +13,18 @@ rust.unused_crate_dependencies = "deny"
rust.unused_must_use = "deny"

[dependencies]
alpen-express-btcio.workspace = true
alpen-express-common.workspace = true
alpen-express-primitives.workspace = true
alpen-express-rocksdb.workspace = true
alpen-express-rpc-api = { workspace = true, features = ["client"] }
alpen-express-rpc-types.workspace = true
alpen-express-state.workspace = true
express-bridge-exec.workspace = true
express-bridge-rpc-api.workspace = true
express-bridge-sig-manager.workspace = true
express-bridge-tx-builder.workspace = true
express-storage.workspace = true
strata-bridge-exec.workspace = true
strata-bridge-rpc-api.workspace = true
strata-bridge-sig-manager.workspace = true
strata-bridge-tx-builder.workspace = true
strata-btcio.workspace = true
strata-common.workspace = true
strata-primitives.workspace = true
strata-rocksdb.workspace = true
strata-rpc-api = { workspace = true, features = ["client"] }
strata-rpc-types.workspace = true
strata-state.workspace = true
strata-storage.workspace = true

anyhow.workspace = true
argh.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions bin/bridge-client/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use argh::FromArgs;
use crate::errors::InitError;

#[derive(Debug, FromArgs)]
#[argh(name = "express-bridge-client")]
#[argh(description = "The bridge client for Express")]
#[argh(name = "strata-bridge-client")]
#[argh(description = "The bridge client for Strata")]
pub(crate) struct Cli {
#[argh(
positional,
Expand Down
2 changes: 1 addition & 1 deletion bin/bridge-client/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

use std::{fs, path::PathBuf, sync::Arc};

use alpen_express_rocksdb::{ROCKSDB_NAME, STORE_COLUMN_FAMILIES};
use directories::ProjectDirs;
use rockbound::{rocksdb, OptimisticTransactionDB};
use strata_rocksdb::{ROCKSDB_NAME, STORE_COLUMN_FAMILIES};

/// Open or creates a rocksdb database.
///
Expand Down
8 changes: 4 additions & 4 deletions bin/bridge-client/src/descriptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

use std::env;

use alpen_express_btcio::rpc::{traits::Signer, types::ImportDescriptor};
use bitcoin::{
bip32::{ChildNumber, DerivationPath, Xpriv},
secp256k1::SECP256K1,
};
use miniscript::descriptor::{checksum::desc_checksum, InnerXKey};
use strata_btcio::rpc::{traits::Signer, types::ImportDescriptor};

// TODO move some of these into a keyderiv crate
const DERIV_BASE_IDX: u32 = 56;
Expand Down Expand Up @@ -92,13 +92,13 @@ pub(crate) async fn check_or_load_descriptor_into_wallet(

#[cfg(test)]
mod tests {
use alpen_express_btcio::rpc::{
use bitcoind::BitcoinD;
use strata_btcio::rpc::{
traits::Signer,
types::{ImportDescriptor, ImportDescriptorResult},
BitcoinClient,
};
use alpen_express_common::logging;
use bitcoind::BitcoinD;
use strata_common::logging;

use super::*;

Expand Down
2 changes: 1 addition & 1 deletion bin/bridge-client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ mod errors;
mod modes;
pub(crate) mod rpc_server;

use alpen_express_common::logging;
use args::{Cli, OperationMode};
use modes::{challenger, operator};
use strata_common::logging;
use tracing::info;

#[tokio::main]
Expand Down
22 changes: 11 additions & 11 deletions bin/bridge-client/src/modes/operator/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

use std::{path::PathBuf, sync::Arc, time::Duration};

use alpen_express_btcio::rpc::{
use bitcoin::secp256k1::SECP256K1;
use jsonrpsee::{core::client::async_client::Client as L2RpcClient, ws_client::WsClientBuilder};
use strata_bridge_exec::handler::ExecHandler;
use strata_bridge_sig_manager::prelude::SignatureManager;
use strata_bridge_tx_builder::prelude::TxBuildContext;
use strata_btcio::rpc::{
traits::{Reader, Signer},
BitcoinClient,
};
use alpen_express_primitives::bridge::OperatorIdx;
use alpen_express_rocksdb::{
use strata_primitives::bridge::OperatorIdx;
use strata_rocksdb::{
bridge::db::{BridgeDutyIndexRocksDb, BridgeDutyRocksDb, BridgeTxRocksDb},
DbOpsConfig,
};
use alpen_express_rpc_api::AlpenApiClient;
use bitcoin::secp256k1::SECP256K1;
use express_bridge_exec::handler::ExecHandler;
use express_bridge_sig_manager::prelude::SignatureManager;
use express_bridge_tx_builder::prelude::TxBuildContext;
use express_storage::ops::{
use strata_rpc_api::StrataApiClient;
use strata_storage::ops::{
bridge::Context as TxContext, bridge_duty::Context as DutyContext,
bridge_duty_index::Context as DutyIndexContext,
};
use jsonrpsee::{core::client::async_client::Client as L2RpcClient, ws_client::WsClientBuilder};
use threadpool::ThreadPool;
use tracing::error;

Expand Down Expand Up @@ -131,7 +131,7 @@ pub(crate) async fn bootstrap(args: Cli) -> anyhow::Result<()> {
bridge_duty_idx_db_ops,
};

// TODO: wrap these in `express-tasks`
// TODO: wrap these in `strata-tasks`
let duty_task = tokio::spawn(async move {
if let Err(e) = task_manager.start(duty_polling_interval).await {
error!(error = %e, "could not start task manager");
Expand Down
24 changes: 12 additions & 12 deletions bin/bridge-client/src/modes/operator/task_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@

use std::{fmt::Debug, sync::Arc, time::Duration};

use alpen_express_btcio::rpc::traits::Broadcaster;
use alpen_express_rpc_api::AlpenApiClient;
use alpen_express_rpc_types::BridgeDuties;
use alpen_express_state::bridge_duties::{BridgeDuty, BridgeDutyStatus};
use bitcoin::Txid;
use express_bridge_exec::{
use strata_bridge_exec::{
errors::{ExecError, ExecResult},
handler::ExecHandler,
};
use express_bridge_tx_builder::{prelude::BuildContext, TxKind};
use express_storage::ops::{bridge_duty::BridgeDutyOps, bridge_duty_index::BridgeDutyIndexOps};
use strata_bridge_tx_builder::{prelude::BuildContext, TxKind};
use strata_btcio::rpc::traits::Broadcaster;
use strata_rpc_api::StrataApiClient;
use strata_rpc_types::BridgeDuties;
use strata_state::bridge_duties::{BridgeDuty, BridgeDutyStatus};
use strata_storage::ops::{bridge_duty::BridgeDutyOps, bridge_duty_index::BridgeDutyIndexOps};
use tokio::{task::JoinSet, time::sleep};
use tracing::{error, info, warn};

pub(super) struct TaskManager<L2Client, TxBuildContext, Bcast>
where
L2Client: AlpenApiClient + Sync + Send,
L2Client: StrataApiClient + Sync + Send,
TxBuildContext: BuildContext + Sync + Send,
Bcast: Broadcaster,
{
Expand All @@ -32,7 +32,7 @@ where

impl<L2Client, TxBuildContext, Bcast> TaskManager<L2Client, TxBuildContext, Bcast>
where
L2Client: AlpenApiClient + Sync + Send + 'static,
L2Client: StrataApiClient + Sync + Send + 'static,
TxBuildContext: BuildContext + Sync + Send + 'static,
Bcast: Broadcaster + Sync + Send + 'static,
{
Expand Down Expand Up @@ -153,7 +153,7 @@ async fn process_duty<L2Client, TxBuildContext, Bcast>(
duty: &BridgeDuty,
) -> ExecResult<()>
where
L2Client: AlpenApiClient + Sync + Send,
L2Client: StrataApiClient + Sync + Send,
TxBuildContext: BuildContext + Sync + Send,
Bcast: Broadcaster,
{
Expand Down Expand Up @@ -212,7 +212,7 @@ async fn execute_duty<L2Client, TxBuildContext, Tx, Bcast>(
tx_info: Tx,
) -> ExecResult<()>
where
L2Client: AlpenApiClient + Sync + Send,
L2Client: StrataApiClient + Sync + Send,
TxBuildContext: BuildContext + Sync + Send,
Tx: TxKind + Debug,
Bcast: Broadcaster,
Expand Down Expand Up @@ -278,7 +278,7 @@ async fn aggregate_and_broadcast<L2Client, TxBuildContext, Bcast>(
txid: &Txid,
) -> ExecResult<()>
where
L2Client: AlpenApiClient + Sync + Send,
L2Client: StrataApiClient + Sync + Send,
TxBuildContext: BuildContext + Sync + Send,
Bcast: Broadcaster,
{
Expand Down
Loading
Loading