diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6dfa2d76b..d89eeb85b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -22,10 +22,10 @@ jobs: env: RUSTDOCFLAGS: --show-type-layout --enable-index-page -Zunstable-options -D warnings - name: Compress docs artifacts - run: tar czf vertex-core-docs.tar.gz target/doc + run: tar czf express-core-docs.tar.gz target/doc - name: Archive docs uses: actions/upload-artifact@v4 if: always() with: name: docs - path: vertex-core-docs.tar.gz + path: express-core-docs.tar.gz diff --git a/.github/workflows/functional.yml b/.github/workflows/functional.yml index a6c6a8e72..9595d3582 100644 --- a/.github/workflows/functional.yml +++ b/.github/workflows/functional.yml @@ -56,7 +56,7 @@ jobs: continue-on-error: true run: | export PATH=$(realpath target/debug/):$PATH - which alpen-vertex-sequencer + which alpen-express-sequencer cd functional-tests && \ poetry run python entry.py @@ -65,6 +65,6 @@ jobs: if: steps.funcTestsRun1.outcome == 'failure' run: | export PATH=$(realpath target/debug/):$PATH - which alpen-vertex-sequencer + which alpen-express-sequencer cd functional-tests && \ poetry run python entry.py diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8a6dfa959..ec1e28c88 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: include: - - binary: alpen-vertex-sequencer + - binary: alpen-express-sequencer steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@clippy diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index a1d6a4388..279bc0018 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -19,8 +19,6 @@ jobs: test: name: Test and generate report runs-on: ubuntu-latest - # nightly rust might break from time to time - continue-on-error: true env: RUSTFLAGS: -D warnings CARGO_TERM_COLOR: always diff --git a/Cargo.lock b/Cargo.lock index 625414b34..9f31ebafa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -651,27 +651,13 @@ dependencies = [ ] [[package]] -name = "alpen-test-utils" -version = "0.1.0" -dependencies = [ - "alpen-vertex-db", - "anyhow", - "arbitrary", - "bitcoin", - "hex", - "rand 0.8.5", - "rockbound", - "tempfile", -] - -[[package]] -name = "alpen-vertex-btcio" +name = "alpen-express-btcio" version = "0.1.0" dependencies = [ + "alpen-express-db", + "alpen-express-primitives", + "alpen-express-state", "alpen-test-utils", - "alpen-vertex-db", - "alpen-vertex-primitives", - "alpen-vertex-state", "anyhow", "async-trait", "base64 0.22.1", @@ -687,7 +673,7 @@ dependencies = [ ] [[package]] -name = "alpen-vertex-common" +name = "alpen-express-common" version = "0.1.0" dependencies = [ "tracing", @@ -695,15 +681,15 @@ dependencies = [ ] [[package]] -name = "alpen-vertex-consensus-logic" +name = "alpen-express-consensus-logic" version = "0.1.0" dependencies = [ + "alpen-express-btcio", + "alpen-express-db", + "alpen-express-evmctl", + "alpen-express-primitives", + "alpen-express-state", "alpen-test-utils", - "alpen-vertex-btcio", - "alpen-vertex-db", - "alpen-vertex-evmctl", - "alpen-vertex-primitives", - "alpen-vertex-state", "anyhow", "bitcoin", "borsh", @@ -716,13 +702,13 @@ dependencies = [ ] [[package]] -name = "alpen-vertex-db" +name = "alpen-express-db" version = "0.1.0" dependencies = [ + "alpen-express-mmr", + "alpen-express-primitives", + "alpen-express-state", "alpen-test-utils", - "alpen-vertex-mmr", - "alpen-vertex-primitives", - "alpen-vertex-state", "anyhow", "arbitrary", "bincode", @@ -736,23 +722,23 @@ dependencies = [ ] [[package]] -name = "alpen-vertex-evmctl" +name = "alpen-express-evmctl" version = "0.1.0" dependencies = [ - "alpen-vertex-primitives", - "alpen-vertex-state", + "alpen-express-primitives", + "alpen-express-state", "thiserror", ] [[package]] -name = "alpen-vertex-evmexec" +name = "alpen-express-evmexec" version = "0.1.0" dependencies = [ + "alpen-express-db", + "alpen-express-evmctl", + "alpen-express-primitives", + "alpen-express-state", "alpen-test-utils", - "alpen-vertex-db", - "alpen-vertex-evmctl", - "alpen-vertex-primitives", - "alpen-vertex-state", "anyhow", "arbitrary", "borsh", @@ -777,14 +763,14 @@ dependencies = [ ] [[package]] -name = "alpen-vertex-jmt" +name = "alpen-express-jmt" version = "0.1.0" dependencies = [ "jmt", ] [[package]] -name = "alpen-vertex-mmr" +name = "alpen-express-mmr" version = "0.1.0" dependencies = [ "arbitrary", @@ -796,7 +782,7 @@ dependencies = [ ] [[package]] -name = "alpen-vertex-primitives" +name = "alpen-express-primitives" version = "0.1.0" dependencies = [ "arbitrary", @@ -810,7 +796,7 @@ dependencies = [ ] [[package]] -name = "alpen-vertex-reth" +name = "alpen-express-reth" version = "0.1.0" dependencies = [ "alloy-genesis", @@ -827,11 +813,11 @@ dependencies = [ ] [[package]] -name = "alpen-vertex-rpc-api" +name = "alpen-express-rpc-api" version = "0.1.0" dependencies = [ - "alpen-vertex-primitives", - "alpen-vertex-state", + "alpen-express-primitives", + "alpen-express-state", "hex", "jsonrpsee", "serde", @@ -839,18 +825,18 @@ dependencies = [ ] [[package]] -name = "alpen-vertex-sequencer" +name = "alpen-express-sequencer" version = "0.1.0" dependencies = [ - "alpen-vertex-btcio", - "alpen-vertex-common", - "alpen-vertex-consensus-logic", - "alpen-vertex-db", - "alpen-vertex-evmctl", - "alpen-vertex-evmexec", - "alpen-vertex-primitives", - "alpen-vertex-rpc-api", - "alpen-vertex-state", + "alpen-express-btcio", + "alpen-express-common", + "alpen-express-consensus-logic", + "alpen-express-db", + "alpen-express-evmctl", + "alpen-express-evmexec", + "alpen-express-primitives", + "alpen-express-rpc-api", + "alpen-express-state", "anyhow", "argh", "async-trait", @@ -874,10 +860,10 @@ dependencies = [ ] [[package]] -name = "alpen-vertex-state" +name = "alpen-express-state" version = "0.1.0" dependencies = [ - "alpen-vertex-primitives", + "alpen-express-primitives", "arbitrary", "borsh", "digest 0.10.7", @@ -885,6 +871,20 @@ dependencies = [ "sha2 0.10.8", ] +[[package]] +name = "alpen-test-utils" +version = "0.1.0" +dependencies = [ + "alpen-express-db", + "anyhow", + "arbitrary", + "bitcoin", + "hex", + "rand 0.8.5", + "rockbound", + "tempfile", +] + [[package]] name = "android-tzdata" version = "0.1.1" @@ -1876,9 +1876,9 @@ checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "bytemuck" -version = "1.16.1" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" +checksum = "102087e286b4677862ea56cf8fc58bb2cdfa8725c40ffb80fe3a008eb7f2fc83" dependencies = [ "bytemuck_derive", ] diff --git a/Cargo.toml b/Cargo.toml index b15c3e530..e7860a558 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,17 +23,17 @@ default-members = ["sequencer", "reth"] 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-db = { path = "crates/db" } +alpen-express-evmctl = { path = "crates/evmctl" } +alpen-express-evmexec = { path = "crates/evmexec" } +alpen-express-mmr = { path = "crates/util/mmr" } +alpen-express-primitives = { path = "crates/primitives" } +alpen-express-rpc-api = { path = "crates/rpc/api" } +alpen-express-state = { path = "crates/state" } alpen-test-utils = { path = "crates/test-utils" } -alpen-vertex-btcio = { path = "crates/btcio" } -alpen-vertex-common = { path = "crates/common" } -alpen-vertex-consensus-logic = { path = "crates/consensus-logic" } -alpen-vertex-db = { path = "crates/db" } -alpen-vertex-evmctl = { path = "crates/evmctl" } -alpen-vertex-evmexec = { path = "crates/evmexec" } -alpen-vertex-mmr = { path = "crates/util/mmr" } -alpen-vertex-primitives = { path = "crates/primitives" } -alpen-vertex-rpc-api = { path = "crates/rpc/api" } -alpen-vertex-state = { path = "crates/state" } zkvm = { path = "crates/prover/zkvm" } alloy-genesis = { version = "0.1", default-features = false } diff --git a/Makefile b/Makefile index 2135327cf..90e8d3cb9 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ help: ## Display this help. .PHONY: build build: ## Build the workspace into the `target` directory. - cargo build --workspace --bin "alpen-vertex-sequencer" --features "$(FEATURES)" --profile "$(PROFILE)" + cargo build --workspace --bin "alpen-express-sequencer" --features "$(FEATURES)" --profile "$(PROFILE)" ##@ Test @@ -122,7 +122,7 @@ fmt-func-tests: ensure-ruff ## Apply formatting of python files inside `test` di lint-check-ws: ## Checks for lint issues in the workspace. cargo clippy \ --workspace \ - --bin "alpen-vertex-sequencer" \ + --bin "alpen-express-sequencer" \ --lib \ --examples \ --tests \ @@ -134,7 +134,7 @@ lint-check-ws: ## Checks for lint issues in the workspace. lint-fix-ws: ## Lints the workspace and applies fixes where possible. cargo clippy \ --workspace \ - --bin "alpen-vertex-sequencer" \ + --bin "alpen-express-sequencer" \ --lib \ --examples \ --tests \ diff --git a/README.md b/README.md index fd7554a8c..70516bfd8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Alpen Vertex Rollup +# Alpen Express Rollup -Alpen's prototype rollup, codenamed Vertex. This is pre-alpha software and +Alpen's prototype rollup, codenamed Express. This is pre-alpha software and nothing is even close to being usable yet. ## Repository structure @@ -73,11 +73,11 @@ ensure `horizon_l1_height` <= `genesis_l1_height` < bitcoin_block_height Start EL Client: ```sh -cargo run --bin alpen-vertex-reth -- --datadir .data/reth --http -vvvv +cargo run --bin alpen-express-reth -- --datadir .data/reth --http -vvvv ``` Start CL Client/Sequencer ```sh -cargo run --bin alpen-vertex-sequencer -- --config config.toml +cargo run --bin alpen-express-sequencer -- --config config.toml ``` diff --git a/crates/btcio/Cargo.toml b/crates/btcio/Cargo.toml index d9ac121cf..3ec3331f0 100644 --- a/crates/btcio/Cargo.toml +++ b/crates/btcio/Cargo.toml @@ -1,12 +1,12 @@ [package] edition = "2021" -name = "alpen-vertex-btcio" +name = "alpen-express-btcio" version = "0.1.0" [dependencies] -alpen-vertex-db = { workspace = true } -alpen-vertex-primitives = { workspace = true } -alpen-vertex-state = { workspace = true } +alpen-express-db = { workspace = true } +alpen-express-primitives = { workspace = true } +alpen-express-state = { workspace = true } anyhow = { workspace = true } async-trait = { workspace = true } diff --git a/crates/btcio/src/reader/query.rs b/crates/btcio/src/reader/query.rs index 36f52024e..4827fe9a4 100644 --- a/crates/btcio/src/reader/query.rs +++ b/crates/btcio/src/reader/query.rs @@ -2,7 +2,7 @@ use std::collections::VecDeque; use std::sync::Arc; use std::time::{self, Duration}; -use alpen_vertex_primitives::l1::L1Status; +use alpen_express_primitives::l1::L1Status; use anyhow::bail; use bitcoin::{Block, BlockHash}; use tokio::sync::{mpsc, RwLock}; diff --git a/crates/btcio/src/status.rs b/crates/btcio/src/status.rs index d66e65db6..da811f4a3 100644 --- a/crates/btcio/src/status.rs +++ b/crates/btcio/src/status.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use tokio::sync::RwLock; -use alpen_vertex_primitives::l1::L1Status; +use alpen_express_primitives::l1::L1Status; #[derive(Debug, Clone)] pub enum StatusUpdate { diff --git a/crates/common/Cargo.toml b/crates/common/Cargo.toml index 5afee7d5e..623ad24e6 100644 --- a/crates/common/Cargo.toml +++ b/crates/common/Cargo.toml @@ -1,6 +1,6 @@ [package] edition = "2021" -name = "alpen-vertex-common" +name = "alpen-express-common" version = "0.1.0" [dependencies] diff --git a/crates/consensus-logic/Cargo.toml b/crates/consensus-logic/Cargo.toml index aaf8b4ef9..7ae18fea6 100644 --- a/crates/consensus-logic/Cargo.toml +++ b/crates/consensus-logic/Cargo.toml @@ -1,14 +1,14 @@ [package] edition = "2021" -name = "alpen-vertex-consensus-logic" +name = "alpen-express-consensus-logic" version = "0.1.0" [dependencies] -alpen-vertex-btcio = { workspace = true } -alpen-vertex-db = { workspace = true } -alpen-vertex-evmctl = { workspace = true } -alpen-vertex-primitives = { workspace = true } -alpen-vertex-state = { workspace = true } +alpen-express-btcio = { workspace = true } +alpen-express-db = { workspace = true } +alpen-express-evmctl = { workspace = true } +alpen-express-primitives = { workspace = true } +alpen-express-state = { workspace = true } anyhow = { workspace = true } bitcoin = { workspace = true } @@ -21,4 +21,4 @@ tracing = { workspace = true } [dev-dependencies] alpen-test-utils = { workspace = true } -rand = { version = "*", features = ["getrandom"] } +rand = { version = "0.8.5", features = ["getrandom", "std_rng"] } diff --git a/crates/consensus-logic/src/chain_transition.rs b/crates/consensus-logic/src/chain_transition.rs index 8fa33a5a5..a24ba274d 100644 --- a/crates/consensus-logic/src/chain_transition.rs +++ b/crates/consensus-logic/src/chain_transition.rs @@ -1,7 +1,7 @@ //! Top-level CL state transition logic. This is largely stubbed off now, but //! we'll replace components with real implementations as we go along. -use alpen_vertex_state::{block::L2Block, chain_state::ChainState, state_op::WriteBatch}; +use alpen_express_state::{block::L2Block, chain_state::ChainState, state_op::WriteBatch}; use crate::errors::TsnError; diff --git a/crates/consensus-logic/src/client_transition.rs b/crates/consensus-logic/src/client_transition.rs index 48b28a64c..b45e51d91 100644 --- a/crates/consensus-logic/src/client_transition.rs +++ b/crates/consensus-logic/src/client_transition.rs @@ -3,11 +3,11 @@ use tracing::*; -use alpen_vertex_db::traits::{Database, L1DataProvider, L2DataProvider}; -use alpen_vertex_primitives::prelude::*; -use alpen_vertex_state::client_state::*; -use alpen_vertex_state::operation::*; -use alpen_vertex_state::sync_event::SyncEvent; +use alpen_express_db::traits::{Database, L1DataProvider, L2DataProvider}; +use alpen_express_primitives::prelude::*; +use alpen_express_state::client_state::*; +use alpen_express_state::operation::*; +use alpen_express_state::sync_event::SyncEvent; use crate::errors::*; diff --git a/crates/consensus-logic/src/credential.rs b/crates/consensus-logic/src/credential.rs index 58a168865..556bb3b42 100644 --- a/crates/consensus-logic/src/credential.rs +++ b/crates/consensus-logic/src/credential.rs @@ -3,12 +3,12 @@ use bitcoin::XOnlyPublicKey; use secp256k1::{schnorr::Signature, Keypair, Message, Secp256k1, SecretKey}; -use alpen_vertex_primitives::{ +use alpen_express_primitives::{ block_credential::CredRule, buf::{Buf32, Buf64}, params::Params, }; -use alpen_vertex_state::header::{L2Header, SignedL2BlockHeader}; +use alpen_express_state::header::{L2Header, SignedL2BlockHeader}; pub fn check_block_credential(header: &SignedL2BlockHeader, params: &Params) -> bool { let sigcom = compute_header_sig_commitment(header); @@ -52,7 +52,7 @@ fn verify_schnorr_sig(sig: &Buf64, msg: &Buf32, pk: &Buf32) -> bool { #[cfg(test)] mod tests { - use alpen_vertex_primitives::buf::Buf32; + use alpen_express_primitives::buf::Buf32; use rand::Rng; use secp256k1::{Secp256k1, SecretKey}; diff --git a/crates/consensus-logic/src/ctl.rs b/crates/consensus-logic/src/ctl.rs index d36b8f7ef..087b582ba 100644 --- a/crates/consensus-logic/src/ctl.rs +++ b/crates/consensus-logic/src/ctl.rs @@ -3,8 +3,8 @@ use std::sync::Arc; use tokio::sync::{mpsc, oneshot}; use tracing::*; -use alpen_vertex_db::{errors::DbError, traits::*}; -use alpen_vertex_state::sync_event::SyncEvent; +use alpen_express_db::{errors::DbError, traits::*}; +use alpen_express_state::sync_event::SyncEvent; use crate::message::CsmMessage; diff --git a/crates/consensus-logic/src/duties.rs b/crates/consensus-logic/src/duties.rs index 3532f6905..ffb90cd36 100644 --- a/crates/consensus-logic/src/duties.rs +++ b/crates/consensus-logic/src/duties.rs @@ -4,8 +4,8 @@ use std::time; use borsh::{BorshDeserialize, BorshSerialize}; -use alpen_vertex_primitives::buf::Buf32; -use alpen_vertex_state::id::L2BlockId; +use alpen_express_primitives::buf::Buf32; +use alpen_express_state::id::L2BlockId; /// Describes when we'll stop working to fulfill a duty. #[derive(Clone, Debug)] diff --git a/crates/consensus-logic/src/duty_executor.rs b/crates/consensus-logic/src/duty_executor.rs index d9713e9fc..b0a9f1fe3 100644 --- a/crates/consensus-logic/src/duty_executor.rs +++ b/crates/consensus-logic/src/duty_executor.rs @@ -10,17 +10,17 @@ use borsh::{BorshDeserialize, BorshSerialize}; use tokio::sync::broadcast; use tracing::*; -use alpen_vertex_db::traits::{ClientStateProvider, Database, L2DataProvider, L2DataStore}; -use alpen_vertex_evmctl::engine::{ExecEngineCtl, PayloadStatus}; -use alpen_vertex_evmctl::errors::EngineError; -use alpen_vertex_evmctl::messages::{ExecPayloadData, PayloadEnv}; -use alpen_vertex_primitives::buf::{Buf32, Buf64}; -use alpen_vertex_primitives::params::RollupParams; -use alpen_vertex_state::block::{ExecSegment, L1Segment, L2BlockAccessory, L2BlockBundle}; -use alpen_vertex_state::client_state::ClientState; -use alpen_vertex_state::exec_update::{ExecUpdate, UpdateOutput}; -use alpen_vertex_state::header::L2BlockHeader; -use alpen_vertex_state::prelude::*; +use alpen_express_db::traits::{ClientStateProvider, Database, L2DataProvider, L2DataStore}; +use alpen_express_evmctl::engine::{ExecEngineCtl, PayloadStatus}; +use alpen_express_evmctl::errors::EngineError; +use alpen_express_evmctl::messages::{ExecPayloadData, PayloadEnv}; +use alpen_express_primitives::buf::{Buf32, Buf64}; +use alpen_express_primitives::params::RollupParams; +use alpen_express_state::block::{ExecSegment, L1Segment, L2BlockAccessory, L2BlockBundle}; +use alpen_express_state::client_state::ClientState; +use alpen_express_state::exec_update::{ExecUpdate, UpdateOutput}; +use alpen_express_state::header::L2BlockHeader; +use alpen_express_state::prelude::*; use crate::credential::sign_schnorr_sig; use crate::duties::{self, Duty, DutyBatch, Identity}; diff --git a/crates/consensus-logic/src/duty_extractor.rs b/crates/consensus-logic/src/duty_extractor.rs index 880298c5c..f3ba7861e 100644 --- a/crates/consensus-logic/src/duty_extractor.rs +++ b/crates/consensus-logic/src/duty_extractor.rs @@ -1,5 +1,5 @@ -use alpen_vertex_db::traits::{Database, L2DataProvider}; -use alpen_vertex_state::{client_state::ClientState, header::L2Header}; +use alpen_express_db::traits::{Database, L2DataProvider}; +use alpen_express_state::{client_state::ClientState, header::L2Header}; use crate::{ duties::{self, BlockSigningDuty}, diff --git a/crates/consensus-logic/src/errors.rs b/crates/consensus-logic/src/errors.rs index 672841b78..6beca4dfe 100644 --- a/crates/consensus-logic/src/errors.rs +++ b/crates/consensus-logic/src/errors.rs @@ -1,8 +1,8 @@ -use alpen_vertex_evmctl::errors::EngineError; +use alpen_express_evmctl::errors::EngineError; use thiserror::Error; -use alpen_vertex_state::id::L2BlockId; -use alpen_vertex_state::l1::L1BlockId; +use alpen_express_state::id::L2BlockId; +use alpen_express_state::l1::L1BlockId; #[derive(Debug, Error)] pub enum Error { @@ -54,7 +54,7 @@ pub enum Error { Engine(#[from] EngineError), #[error("db: {0}")] - Db(#[from] alpen_vertex_db::errors::DbError), + Db(#[from] alpen_express_db::errors::DbError), #[error("not yet implemented")] Unimplemented, diff --git a/crates/consensus-logic/src/fork_choice_manager.rs b/crates/consensus-logic/src/fork_choice_manager.rs index d167baf45..f83801411 100644 --- a/crates/consensus-logic/src/fork_choice_manager.rs +++ b/crates/consensus-logic/src/fork_choice_manager.rs @@ -2,21 +2,21 @@ use std::sync::Arc; -use alpen_vertex_state::state_op; +use alpen_express_state::state_op; use tokio::sync::mpsc; use tracing::*; -use alpen_vertex_db::errors::DbError; -use alpen_vertex_db::traits::{ +use alpen_express_db::errors::DbError; +use alpen_express_db::traits::{ BlockStatus, ChainstateProvider, ChainstateStore, Database, L2DataProvider, L2DataStore, }; -use alpen_vertex_evmctl::engine::ExecEngineCtl; -use alpen_vertex_evmctl::messages::ExecPayloadData; -use alpen_vertex_primitives::params::Params; -use alpen_vertex_state::client_state::ClientState; -use alpen_vertex_state::operation::SyncAction; -use alpen_vertex_state::prelude::*; -use alpen_vertex_state::sync_event::SyncEvent; +use alpen_express_evmctl::engine::ExecEngineCtl; +use alpen_express_evmctl::messages::ExecPayloadData; +use alpen_express_primitives::params::Params; +use alpen_express_state::client_state::ClientState; +use alpen_express_state::operation::SyncAction; +use alpen_express_state::prelude::*; +use alpen_express_state::sync_event::SyncEvent; use crate::ctl::CsmController; use crate::message::ForkChoiceMessage; @@ -385,7 +385,7 @@ fn process_ct_msg( // being invalid and return too. // TODO verify this is reasonable behavior, especially with regard // to pre-sync - if res == alpen_vertex_evmctl::engine::BlockStatus::Invalid { + if res == alpen_express_evmctl::engine::BlockStatus::Invalid { // It's invalid, write that and return. state.set_block_status(&blkid, BlockStatus::Invalid)?; return Ok(()); @@ -479,7 +479,7 @@ fn check_new_block( // Check that we haven't already marked the block as invalid. let l2prov = state.database.l2_provider(); if let Some(status) = l2prov.get_block_status(*blkid)? { - if status == alpen_vertex_db::traits::BlockStatus::Invalid { + if status == alpen_express_db::traits::BlockStatus::Invalid { warn!(?blkid, "rejecting block that fails EL validation"); return Ok(false); } diff --git a/crates/consensus-logic/src/genesis.rs b/crates/consensus-logic/src/genesis.rs index 8b05c1834..1c2d28044 100644 --- a/crates/consensus-logic/src/genesis.rs +++ b/crates/consensus-logic/src/genesis.rs @@ -1,13 +1,13 @@ use tracing::*; -use alpen_vertex_db::{errors::DbError, traits::*}; -use alpen_vertex_primitives::{ +use alpen_express_db::{errors::DbError, traits::*}; +use alpen_express_primitives::{ buf::{Buf32, Buf64}, evm_exec::create_evm_extra_payload, l1::L1BlockManifest, params::Params, }; -use alpen_vertex_state::{ +use alpen_express_state::{ block::{ExecSegment, L1Segment, L2BlockAccessory, L2BlockBundle}, chain_state::ChainState, client_state::ClientState, diff --git a/crates/consensus-logic/src/l1_handler.rs b/crates/consensus-logic/src/l1_handler.rs index 275313b00..d34ee2fdd 100644 --- a/crates/consensus-logic/src/l1_handler.rs +++ b/crates/consensus-logic/src/l1_handler.rs @@ -6,11 +6,11 @@ use bitcoin::Block; use tokio::sync::mpsc; use tracing::*; -use alpen_vertex_btcio::reader::messages::L1Event; -use alpen_vertex_db::traits::L1DataStore; -use alpen_vertex_primitives::buf::Buf32; -use alpen_vertex_primitives::l1::L1BlockManifest; -use alpen_vertex_state::sync_event::SyncEvent; +use alpen_express_btcio::reader::messages::L1Event; +use alpen_express_db::traits::L1DataStore; +use alpen_express_primitives::buf::Buf32; +use alpen_express_primitives::l1::L1BlockManifest; +use alpen_express_state::sync_event::SyncEvent; use crate::ctl::CsmController; diff --git a/crates/consensus-logic/src/message.rs b/crates/consensus-logic/src/message.rs index f5c88aa9b..915b9c5c2 100644 --- a/crates/consensus-logic/src/message.rs +++ b/crates/consensus-logic/src/message.rs @@ -1,6 +1,8 @@ use std::sync::Arc; -use alpen_vertex_state::{client_state::ClientState, id::L2BlockId, operation::ClientUpdateOutput}; +use alpen_express_state::{ + client_state::ClientState, id::L2BlockId, operation::ClientUpdateOutput, +}; /// Sync control message. #[derive(Copy, Clone, Debug)] diff --git a/crates/consensus-logic/src/reorg.rs b/crates/consensus-logic/src/reorg.rs index 96671d066..8c8451153 100644 --- a/crates/consensus-logic/src/reorg.rs +++ b/crates/consensus-logic/src/reorg.rs @@ -1,6 +1,6 @@ //! Reorg planning types. -use alpen_vertex_state::id::L2BlockId; +use alpen_express_state::id::L2BlockId; use crate::unfinalized_tracker; @@ -130,7 +130,7 @@ pub fn compute_reorg( #[cfg(test)] mod tests { - use alpen_vertex_state::id::L2BlockId; + use alpen_express_state::id::L2BlockId; use rand::RngCore; use crate::unfinalized_tracker; @@ -142,7 +142,7 @@ mod tests { let mut rng = OsRng; let mut buf = [0; 32]; rng.fill_bytes(&mut buf); - L2BlockId::from(alpen_vertex_primitives::buf::Buf32::from(buf)) + L2BlockId::from(alpen_express_primitives::buf::Buf32::from(buf)) } #[test] diff --git a/crates/consensus-logic/src/state_tracker.rs b/crates/consensus-logic/src/state_tracker.rs index 725e0033a..585992df6 100644 --- a/crates/consensus-logic/src/state_tracker.rs +++ b/crates/consensus-logic/src/state_tracker.rs @@ -5,9 +5,9 @@ use std::sync::Arc; use tracing::*; -use alpen_vertex_db::traits::*; -use alpen_vertex_primitives::params::Params; -use alpen_vertex_state::{ +use alpen_express_db::traits::*; +use alpen_express_primitives::params::Params; +use alpen_express_state::{ client_state::ClientState, operation::{self, ClientUpdateOutput}, }; diff --git a/crates/consensus-logic/src/status.rs b/crates/consensus-logic/src/status.rs index 61bbc0962..48cbd90c4 100644 --- a/crates/consensus-logic/src/status.rs +++ b/crates/consensus-logic/src/status.rs @@ -1,7 +1,7 @@ //! Handle to inspect the current CSM state and wait for updates when there are //! any. -use alpen_vertex_state::{client_state::ClientState, id::L2BlockId}; +use alpen_express_state::{client_state::ClientState, id::L2BlockId}; #[derive(Clone, Debug, Default)] pub struct CsmStatus { diff --git a/crates/consensus-logic/src/sync_manager.rs b/crates/consensus-logic/src/sync_manager.rs index b2fdf1459..49c6de85d 100644 --- a/crates/consensus-logic/src/sync_manager.rs +++ b/crates/consensus-logic/src/sync_manager.rs @@ -5,13 +5,13 @@ use std::sync::Arc; use std::thread; -use alpen_vertex_state::client_state::ClientState; +use alpen_express_state::client_state::ClientState; use tokio::sync::{broadcast, mpsc, watch}; use tracing::*; -use alpen_vertex_db::traits::Database; -use alpen_vertex_evmctl::engine::ExecEngineCtl; -use alpen_vertex_primitives::params::Params; +use alpen_express_db::traits::Database; +use alpen_express_evmctl::engine::ExecEngineCtl; +use alpen_express_primitives::params::Params; use crate::ctl::CsmController; use crate::message::{ClientUpdateNotif, CsmMessage, ForkChoiceMessage}; diff --git a/crates/consensus-logic/src/unfinalized_tracker.rs b/crates/consensus-logic/src/unfinalized_tracker.rs index f269c829e..f6638f8ac 100644 --- a/crates/consensus-logic/src/unfinalized_tracker.rs +++ b/crates/consensus-logic/src/unfinalized_tracker.rs @@ -2,9 +2,9 @@ use std::collections::*; -use alpen_vertex_db::traits::L2DataProvider; -use alpen_vertex_primitives::buf::Buf32; -use alpen_vertex_state::prelude::*; +use alpen_express_db::traits::L2DataProvider; +use alpen_express_primitives::buf::Buf32; +use alpen_express_state::prelude::*; use crate::errors::ChainTipError; @@ -314,13 +314,13 @@ impl FinalizeReport { mod tests { use std::collections::HashSet; - use alpen_test_utils::ArbitraryGenerator; - use alpen_vertex_db::traits::{Database, L2DataProvider, L2DataStore}; - use alpen_vertex_state::{ + use alpen_express_db::traits::{Database, L2DataProvider, L2DataStore}; + use alpen_express_state::{ block::{L2Block, L2BlockAccessory, L2BlockBody, L2BlockBundle}, header::{L2BlockHeader, L2Header, SignedL2BlockHeader}, id::L2BlockId, }; + use alpen_test_utils::ArbitraryGenerator; use crate::unfinalized_tracker; diff --git a/crates/consensus-logic/src/worker.rs b/crates/consensus-logic/src/worker.rs index ad6ba6dc8..17447223c 100644 --- a/crates/consensus-logic/src/worker.rs +++ b/crates/consensus-logic/src/worker.rs @@ -5,10 +5,10 @@ use std::sync::Arc; use tokio::sync::{broadcast, mpsc, watch}; use tracing::*; -use alpen_vertex_db::traits::*; -use alpen_vertex_evmctl::engine::ExecEngineCtl; -use alpen_vertex_primitives::prelude::*; -use alpen_vertex_state::{client_state::ClientState, operation::SyncAction}; +use alpen_express_db::traits::*; +use alpen_express_evmctl::engine::ExecEngineCtl; +use alpen_express_primitives::prelude::*; +use alpen_express_state::{client_state::ClientState, operation::SyncAction}; use crate::{ errors::Error, diff --git a/crates/db/Cargo.toml b/crates/db/Cargo.toml index 22584ac13..ae0aa6884 100644 --- a/crates/db/Cargo.toml +++ b/crates/db/Cargo.toml @@ -1,12 +1,12 @@ [package] edition = "2021" -name = "alpen-vertex-db" +name = "alpen-express-db" version = "0.1.0" [dependencies] -alpen-vertex-mmr = { workspace = true } -alpen-vertex-primitives = { workspace = true } -alpen-vertex-state = { workspace = true } +alpen-express-mmr = { workspace = true } +alpen-express-primitives = { workspace = true } +alpen-express-state = { workspace = true } anyhow = { workspace = true } arbitrary = { workspace = true } diff --git a/crates/db/src/chain_state/db.rs b/crates/db/src/chain_state/db.rs index a620e3db0..972c7fa2e 100644 --- a/crates/db/src/chain_state/db.rs +++ b/crates/db/src/chain_state/db.rs @@ -1,6 +1,6 @@ use std::sync::Arc; -use alpen_vertex_state::state_op; +use alpen_express_state::state_op; use rockbound::OptimisticTransactionDB as DB; use rockbound::{SchemaBatch, SchemaDBOperationsExt}; @@ -45,7 +45,7 @@ impl ChainstateProvider for ChainStateDb { fn get_writes_at( &self, idx: u64, - ) -> DbResult> { + ) -> DbResult> { Ok(self.db.get::(&idx)?) } @@ -53,7 +53,7 @@ impl ChainstateProvider for ChainStateDb { fn get_toplevel_state( &self, idx: u64, - ) -> DbResult> { + ) -> DbResult> { Ok(self.db.get::(&idx)?) } } @@ -61,7 +61,7 @@ impl ChainstateProvider for ChainStateDb { impl ChainstateStore for ChainStateDb { fn write_genesis_state( &self, - toplevel: &alpen_vertex_state::chain_state::ChainState, + toplevel: &alpen_express_state::chain_state::ChainState, ) -> DbResult<()> { let genesis_key = 0; if self.get_first_idx()?.is_some() || self.get_last_idx()?.is_some() { @@ -74,7 +74,7 @@ impl ChainstateStore for ChainStateDb { fn write_state_update( &self, idx: u64, - batch: &alpen_vertex_state::state_op::WriteBatch, + batch: &alpen_express_state::state_op::WriteBatch, ) -> DbResult<()> { if self.db.get::(&idx)?.is_some() { return Err(DbError::OverwriteStateUpdate(idx)); @@ -145,8 +145,8 @@ impl ChainstateStore for ChainStateDb { #[cfg(test)] mod tests { + use alpen_express_state::chain_state::ChainState; use alpen_test_utils::{get_rocksdb_tmp_instance, ArbitraryGenerator}; - use alpen_vertex_state::chain_state::ChainState; use state_op::WriteBatch; use super::*; diff --git a/crates/db/src/chain_state/schemas.rs b/crates/db/src/chain_state/schemas.rs index 39ff9c4aa..3e19dfc96 100644 --- a/crates/db/src/chain_state/schemas.rs +++ b/crates/db/src/chain_state/schemas.rs @@ -1,5 +1,5 @@ -use alpen_vertex_state::chain_state::ChainState; -use alpen_vertex_state::state_op::WriteBatch; +use alpen_express_state::chain_state::ChainState; +use alpen_express_state::state_op::WriteBatch; use crate::define_table_with_seek_key_codec; use crate::define_table_without_codec; diff --git a/crates/db/src/client_state/db.rs b/crates/db/src/client_state/db.rs index 3188d082d..3c98ae826 100644 --- a/crates/db/src/client_state/db.rs +++ b/crates/db/src/client_state/db.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use rockbound::{OptimisticTransactionDB as DB, Schema, SchemaDBOperationsExt}; -use alpen_vertex_state::operation::*; +use alpen_express_state::operation::*; use super::schemas::{ClientStateSchema, ClientUpdateOutputSchema}; use crate::errors::*; @@ -53,7 +53,7 @@ impl ClientStateStore for ClientStateDb { fn write_client_state_checkpoint( &self, idx: u64, - state: alpen_vertex_state::client_state::ClientState, + state: alpen_express_state::client_state::ClientState, ) -> DbResult<()> { // FIXME this should probably be a transaction if self.db.get::(&idx)?.is_some() { @@ -118,15 +118,15 @@ impl ClientStateProvider for ClientStateDb { fn get_state_checkpoint( &self, idx: u64, - ) -> DbResult> { + ) -> DbResult> { Ok(self.db.get::(&idx)?) } } #[cfg(test)] mod tests { + use alpen_express_state::client_state::ClientState; use alpen_test_utils::*; - use alpen_vertex_state::client_state::ClientState; use super::*; diff --git a/crates/db/src/client_state/schemas.rs b/crates/db/src/client_state/schemas.rs index 3817a68f6..7ee8aab81 100644 --- a/crates/db/src/client_state/schemas.rs +++ b/crates/db/src/client_state/schemas.rs @@ -1,5 +1,5 @@ -use alpen_vertex_state::client_state::ClientState; -use alpen_vertex_state::operation::ClientUpdateOutput; +use alpen_express_state::client_state::ClientState; +use alpen_express_state::operation::ClientUpdateOutput; use crate::define_table_with_seek_key_codec; use crate::define_table_without_codec; diff --git a/crates/db/src/l1/db.rs b/crates/db/src/l1/db.rs index dbac6afbb..22da835b0 100644 --- a/crates/db/src/l1/db.rs +++ b/crates/db/src/l1/db.rs @@ -5,8 +5,8 @@ use rockbound::schema::KeyEncoder; use rockbound::{OptimisticTransactionDB as DB, SchemaBatch, SchemaDBOperationsExt}; use tracing::*; -use alpen_vertex_mmr::CompactMmr; -use alpen_vertex_primitives::{ +use alpen_express_mmr::CompactMmr; +use alpen_express_primitives::{ buf::Buf32, l1::{L1BlockManifest, L1Tx, L1TxRef}, }; @@ -179,7 +179,7 @@ impl L1DataProvider for L1Db { #[cfg(test)] mod tests { - use alpen_vertex_primitives::l1::L1TxProof; + use alpen_express_primitives::l1::L1TxProof; use alpen_test_utils::{get_rocksdb_tmp_instance, ArbitraryGenerator}; diff --git a/crates/db/src/l1/schemas.rs b/crates/db/src/l1/schemas.rs index 1a07a4f59..934da8cfd 100644 --- a/crates/db/src/l1/schemas.rs +++ b/crates/db/src/l1/schemas.rs @@ -1,5 +1,5 @@ -use alpen_vertex_mmr::CompactMmr; -use alpen_vertex_primitives::{ +use alpen_express_mmr::CompactMmr; +use alpen_express_primitives::{ buf::Buf32, l1::{L1BlockManifest, L1Tx}, }; diff --git a/crates/db/src/l2/db.rs b/crates/db/src/l2/db.rs index 4402c7361..1e78e594f 100644 --- a/crates/db/src/l2/db.rs +++ b/crates/db/src/l2/db.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use rockbound::{OptimisticTransactionDB as DB, SchemaBatch, SchemaDBOperationsExt}; -use alpen_vertex_state::{block::L2BlockBundle, prelude::*}; +use alpen_express_state::{block::L2BlockBundle, prelude::*}; use crate::{ l2::schemas::L2BlockHeightSchema, diff --git a/crates/db/src/l2/schemas.rs b/crates/db/src/l2/schemas.rs index 2342bf818..b9d40efd7 100644 --- a/crates/db/src/l2/schemas.rs +++ b/crates/db/src/l2/schemas.rs @@ -3,8 +3,8 @@ use crate::define_table_with_seek_key_codec; use crate::define_table_without_codec; use crate::impl_borsh_value_codec; use crate::traits::BlockStatus; -use alpen_vertex_state::block::L2BlockBundle; -use alpen_vertex_state::id::L2BlockId; +use alpen_express_state::block::L2BlockBundle; +use alpen_express_state::id::L2BlockId; use borsh::BorshDeserialize; use borsh::BorshSerialize; diff --git a/crates/db/src/lib.rs b/crates/db/src/lib.rs index d3d43097b..f7c5efdd3 100644 --- a/crates/db/src/lib.rs +++ b/crates/db/src/lib.rs @@ -32,7 +32,7 @@ pub mod utils; pub type DbResult = anyhow::Result; -pub const ROCKSDB_NAME: &str = "vertex"; +pub const ROCKSDB_NAME: &str = "express"; pub const STORE_COLUMN_FAMILIES: &[ColumnFamilyName] = &[ ChainStateSchema::COLUMN_FAMILY_NAME, diff --git a/crates/db/src/sequencer/db.rs b/crates/db/src/sequencer/db.rs index 392eaf2a4..d67928818 100644 --- a/crates/db/src/sequencer/db.rs +++ b/crates/db/src/sequencer/db.rs @@ -1,6 +1,6 @@ use std::sync::Arc; -use alpen_vertex_primitives::buf::Buf32; +use alpen_express_primitives::buf::Buf32; use rockbound::{OptimisticTransactionDB as DB, Schema, SchemaBatch, SchemaDBOperationsExt}; use crate::{ @@ -134,9 +134,9 @@ mod tests { use crate::errors::DbError; use crate::traits::{SeqDataProvider, SeqDataStore}; use crate::types::TxnStatusEntry; + use alpen_express_primitives::buf::Buf32; use alpen_test_utils::bitcoin::get_test_bitcoin_txns; use alpen_test_utils::get_rocksdb_tmp_instance; - use alpen_vertex_primitives::buf::Buf32; use rockbound::OptimisticTransactionDB as DB; use std::sync::Arc; use test; diff --git a/crates/db/src/sequencer/schemas.rs b/crates/db/src/sequencer/schemas.rs index 7f8f5ba6c..9f7ba9519 100644 --- a/crates/db/src/sequencer/schemas.rs +++ b/crates/db/src/sequencer/schemas.rs @@ -1,4 +1,4 @@ -use alpen_vertex_primitives::buf::Buf32; +use alpen_express_primitives::buf::Buf32; use crate::define_table_with_default_codec; use crate::define_table_with_seek_key_codec; diff --git a/crates/db/src/stubs/chain_state.rs b/crates/db/src/stubs/chain_state.rs index 91735e458..2b719f312 100644 --- a/crates/db/src/stubs/chain_state.rs +++ b/crates/db/src/stubs/chain_state.rs @@ -3,9 +3,9 @@ use std::collections::*; use parking_lot::Mutex; use tracing::*; -use alpen_vertex_state::chain_state::ChainState; -use alpen_vertex_state::state_op; -use alpen_vertex_state::state_op::WriteBatch; +use alpen_express_state::chain_state::ChainState; +use alpen_express_state::state_op; +use alpen_express_state::state_op::WriteBatch; use crate::errors::*; use crate::traits::*; @@ -162,7 +162,7 @@ impl ChainstateProvider for StubChainstateDb { fn get_toplevel_state( &self, idx: u64, - ) -> DbResult> { + ) -> DbResult> { let st = self.state.lock(); Ok(st.toplevels.get(&idx).cloned()) } diff --git a/crates/db/src/stubs/l2.rs b/crates/db/src/stubs/l2.rs index a9a831d69..6273a03ad 100644 --- a/crates/db/src/stubs/l2.rs +++ b/crates/db/src/stubs/l2.rs @@ -1,9 +1,9 @@ use std::collections::*; -use alpen_vertex_state::block::L2BlockBundle; +use alpen_express_state::block::L2BlockBundle; use parking_lot::Mutex; -use alpen_vertex_state::prelude::*; +use alpen_express_state::prelude::*; use crate::errors::*; use crate::traits::*; diff --git a/crates/db/src/sync_event/db.rs b/crates/db/src/sync_event/db.rs index 0c492dea2..ecb241946 100644 --- a/crates/db/src/sync_event/db.rs +++ b/crates/db/src/sync_event/db.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use rockbound::{OptimisticTransactionDB as DB, SchemaBatch, SchemaDBOperationsExt}; -use alpen_vertex_state::sync_event::SyncEvent; +use alpen_express_state::sync_event::SyncEvent; use super::schemas::{SyncEventSchema, SyncEventWithTimestamp}; use crate::errors::{DbError, DbResult}; diff --git a/crates/db/src/sync_event/schemas.rs b/crates/db/src/sync_event/schemas.rs index 4762abc51..ceed31420 100644 --- a/crates/db/src/sync_event/schemas.rs +++ b/crates/db/src/sync_event/schemas.rs @@ -1,4 +1,4 @@ -use alpen_vertex_state::sync_event::SyncEvent; +use alpen_express_state::sync_event::SyncEvent; use borsh::{BorshDeserialize, BorshSerialize}; use std::time::{SystemTime, UNIX_EPOCH}; diff --git a/crates/db/src/traits.rs b/crates/db/src/traits.rs index f0d61a629..3ea82268d 100644 --- a/crates/db/src/traits.rs +++ b/crates/db/src/traits.rs @@ -3,17 +3,17 @@ use std::sync::Arc; -use alpen_vertex_state::block::L2BlockBundle; +use alpen_express_state::block::L2BlockBundle; use borsh::{BorshDeserialize, BorshSerialize}; -use alpen_vertex_mmr::CompactMmr; -use alpen_vertex_primitives::{l1::*, prelude::*}; -use alpen_vertex_state::chain_state::ChainState; -use alpen_vertex_state::client_state::ClientState; -use alpen_vertex_state::operation::*; -use alpen_vertex_state::prelude::*; -use alpen_vertex_state::state_op::WriteBatch; -use alpen_vertex_state::sync_event::SyncEvent; +use alpen_express_mmr::CompactMmr; +use alpen_express_primitives::{l1::*, prelude::*}; +use alpen_express_state::chain_state::ChainState; +use alpen_express_state::client_state::ClientState; +use alpen_express_state::operation::*; +use alpen_express_state::prelude::*; +use alpen_express_state::state_op::WriteBatch; +use alpen_express_state::sync_event::SyncEvent; use crate::types::TxnStatusEntry; use crate::DbResult; diff --git a/crates/db/src/types.rs b/crates/db/src/types.rs index ff93e9af7..e613e0d66 100644 --- a/crates/db/src/types.rs +++ b/crates/db/src/types.rs @@ -4,7 +4,7 @@ use bitcoin::hashes::Hash; use bitcoin::{consensus::serialize, Transaction}; use borsh::{BorshDeserialize, BorshSerialize}; -use alpen_vertex_primitives::buf::Buf32; +use alpen_express_primitives::buf::Buf32; /// This keeps track of the transaction sent to L1 and has the raw txn so that if needed to resend /// it to L1, we need not serialize it again. diff --git a/crates/evmctl/Cargo.toml b/crates/evmctl/Cargo.toml index 8fc25916e..fd196e4b8 100644 --- a/crates/evmctl/Cargo.toml +++ b/crates/evmctl/Cargo.toml @@ -1,10 +1,10 @@ [package] edition = "2021" -name = "alpen-vertex-evmctl" +name = "alpen-express-evmctl" version = "0.1.0" [dependencies] -alpen-vertex-primitives = { workspace = true } -alpen-vertex-state = { workspace = true } +alpen-express-primitives = { workspace = true } +alpen-express-state = { workspace = true } thiserror = { workspace = true } diff --git a/crates/evmctl/src/engine.rs b/crates/evmctl/src/engine.rs index d0d5608d7..ae8c8ba11 100644 --- a/crates/evmctl/src/engine.rs +++ b/crates/evmctl/src/engine.rs @@ -8,13 +8,13 @@ // errors as we'd be able to identify when our perspective on the state is // inconsistent with the remote state. -use alpen_vertex_state::id::L2BlockId; +use alpen_express_state::id::L2BlockId; use crate::errors::*; use crate::messages::*; /// Interface to control an execution engine. This is defined in terms of -/// Vertex semantics which will be produced inside the EL impl according to +/// express semantics which will be produced inside the EL impl according to /// whatever semantics it has. pub trait ExecEngineCtl { /// Execute a block payload to determine its validity and if it extends the diff --git a/crates/evmctl/src/messages.rs b/crates/evmctl/src/messages.rs index c062ec90d..d4ab900b6 100644 --- a/crates/evmctl/src/messages.rs +++ b/crates/evmctl/src/messages.rs @@ -1,5 +1,5 @@ -use alpen_vertex_primitives::prelude::*; -use alpen_vertex_state::{block::L2BlockBundle, exec_update::UpdateInput, id::L2BlockId}; +use alpen_express_primitives::prelude::*; +use alpen_express_state::{block::L2BlockBundle, exec_update::UpdateInput, id::L2BlockId}; /// Succinct commitment to relevant EL block data. // This ended up being the same as the EL payload types in the state crate, diff --git a/crates/evmctl/src/stub.rs b/crates/evmctl/src/stub.rs index 3bf4f7257..4b213cffa 100644 --- a/crates/evmctl/src/stub.rs +++ b/crates/evmctl/src/stub.rs @@ -9,9 +9,9 @@ use std::collections::*; use std::sync::Mutex; use std::time; -use alpen_vertex_primitives::buf::Buf32; -use alpen_vertex_state::exec_update::UpdateInput; -use alpen_vertex_state::prelude::*; +use alpen_express_primitives::buf::Buf32; +use alpen_express_state::exec_update::UpdateInput; +use alpen_express_state::prelude::*; use crate::engine::*; use crate::errors::*; diff --git a/crates/evmexec/Cargo.toml b/crates/evmexec/Cargo.toml index d07dae3ef..fc7d68314 100644 --- a/crates/evmexec/Cargo.toml +++ b/crates/evmexec/Cargo.toml @@ -1,13 +1,13 @@ [package] edition = "2021" -name = "alpen-vertex-evmexec" +name = "alpen-express-evmexec" version = "0.1.0" [dependencies] -alpen-vertex-db = { workspace = true } -alpen-vertex-evmctl = { workspace = true } -alpen-vertex-primitives = { workspace = true } -alpen-vertex-state = { workspace = true } +alpen-express-db = { workspace = true } +alpen-express-evmctl = { workspace = true } +alpen-express-primitives = { workspace = true } +alpen-express-state = { workspace = true } anyhow = { workspace = true } arbitrary = { workspace = true } borsh = { workspace = true } @@ -29,6 +29,6 @@ tower = { workspace = true } tracing = { workspace = true } [dev-dependencies] +alpen-test-utils = { workspace = true } mockall = { workspace = true } rand = { workspace = true } -alpen-test-utils = { workspace = true } diff --git a/crates/evmexec/src/block.rs b/crates/evmexec/src/block.rs index 50c8e4363..7c7c89b9d 100644 --- a/crates/evmexec/src/block.rs +++ b/crates/evmexec/src/block.rs @@ -2,8 +2,8 @@ use borsh::BorshDeserialize; use reth_primitives::B256; use thiserror::Error; -use alpen_vertex_primitives::evm_exec::EVMExtraPayload; -use alpen_vertex_state::block::{L2Block, L2BlockBundle}; +use alpen_express_primitives::evm_exec::EVMExtraPayload; +use alpen_express_state::block::{L2Block, L2BlockBundle}; pub(crate) struct EVML2Block { #[allow(dead_code)] diff --git a/crates/evmexec/src/el_payload.rs b/crates/evmexec/src/el_payload.rs index b947629f2..962403c8c 100644 --- a/crates/evmexec/src/el_payload.rs +++ b/crates/evmexec/src/el_payload.rs @@ -5,11 +5,11 @@ use reth_rpc_types::ExecutionPayloadV1; use reth_rpc_types_compat::engine::try_payload_v1_to_block; use thiserror::Error; -use alpen_vertex_primitives::{ +use alpen_express_primitives::{ buf::{Buf20, Buf32}, evm_exec::create_evm_extra_payload, }; -use alpen_vertex_state::exec_update::UpdateInput; +use alpen_express_state::exec_update::UpdateInput; #[derive(Debug, Clone, PartialEq, BorshSerialize, BorshDeserialize, Arbitrary)] pub(crate) struct ElPayload { diff --git a/crates/evmexec/src/engine.rs b/crates/evmexec/src/engine.rs index 86cc7b04a..020a26c67 100644 --- a/crates/evmexec/src/engine.rs +++ b/crates/evmexec/src/engine.rs @@ -10,13 +10,13 @@ use reth_rpc_types::Withdrawal; use tokio::runtime::Handle; use tokio::sync::Mutex; -use alpen_vertex_db::traits::L2DataProvider; -use alpen_vertex_evmctl::engine::{BlockStatus, ExecEngineCtl, PayloadStatus}; -use alpen_vertex_evmctl::errors::{EngineError, EngineResult}; -use alpen_vertex_evmctl::messages::{ELDepositData, ExecPayloadData, Op, PayloadEnv}; -use alpen_vertex_state::block::L2BlockBundle; -use alpen_vertex_state::exec_update::UpdateInput; -use alpen_vertex_state::id::L2BlockId; +use alpen_express_db::traits::L2DataProvider; +use alpen_express_evmctl::engine::{BlockStatus, ExecEngineCtl, PayloadStatus}; +use alpen_express_evmctl::errors::{EngineError, EngineResult}; +use alpen_express_evmctl::messages::{ELDepositData, ExecPayloadData, Op, PayloadEnv}; +use alpen_express_state::block::L2BlockBundle; +use alpen_express_state::exec_update::UpdateInput; +use alpen_express_state::id::L2BlockId; use crate::block::EVML2Block; use crate::el_payload::ElPayload; @@ -308,18 +308,18 @@ struct ForkchoiceStatePartial { #[cfg(test)] mod tests { - use alpen_vertex_db::stubs::l2::StubL2Db; - use alpen_vertex_db::traits::L2DataStore; - use alpen_vertex_state::block::{L2Block, L2BlockAccessory}; + use alpen_express_db::stubs::l2::StubL2Db; + use alpen_express_db::traits::L2DataStore; + use alpen_express_state::block::{L2Block, L2BlockAccessory}; use rand::Rng; use reth_primitives::revm_primitives::FixedBytes; use reth_primitives::{Bloom, Bytes, U256}; use reth_rpc_types::engine::{ExecutionPayloadEnvelopeV2, ForkchoiceUpdated}; use reth_rpc_types::ExecutionPayloadV1; - use alpen_vertex_evmctl::errors::EngineResult; - use alpen_vertex_evmctl::messages::PayloadEnv; - use alpen_vertex_primitives::buf::Buf32; + use alpen_express_evmctl::errors::EngineResult; + use alpen_express_evmctl::messages::PayloadEnv; + use alpen_express_primitives::buf::Buf32; use crate::http_client::MockEngineRpc; diff --git a/crates/evmexec/src/fork_choice_state.rs b/crates/evmexec/src/fork_choice_state.rs index a2ddf78a0..9b96dcd89 100644 --- a/crates/evmexec/src/fork_choice_state.rs +++ b/crates/evmexec/src/fork_choice_state.rs @@ -4,12 +4,12 @@ use anyhow::{Context, Result}; use reth_primitives::B256; use reth_rpc_types::engine::ForkchoiceState; -use alpen_vertex_db::{ +use alpen_express_db::{ errors::DbError, traits::{ClientStateProvider, Database, L2DataProvider}, }; -use alpen_vertex_primitives::params::RollupParams; -use alpen_vertex_state::{block::L2BlockBundle, client_state::ClientState, id::L2BlockId}; +use alpen_express_primitives::params::RollupParams; +use alpen_express_state::{block::L2BlockBundle, client_state::ClientState, id::L2BlockId}; use crate::block::EVML2Block; diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index e79665695..93b0d7cc8 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -1,6 +1,6 @@ [package] edition = "2021" -name = "alpen-vertex-primitives" +name = "alpen-express-primitives" version = "0.1.0" [dependencies] diff --git a/crates/rpc/api/Cargo.toml b/crates/rpc/api/Cargo.toml index 2301c5880..011c81346 100644 --- a/crates/rpc/api/Cargo.toml +++ b/crates/rpc/api/Cargo.toml @@ -1,11 +1,11 @@ [package] edition = "2021" -name = "alpen-vertex-rpc-api" +name = "alpen-express-rpc-api" version = "0.1.0" [dependencies] -alpen-vertex-primitives = { workspace = true } -alpen-vertex-state = { workspace = true } +alpen-express-primitives = { workspace = true } +alpen-express-state = { workspace = true } hex = { workspace = true } jsonrpsee = { workspace = true, features = ["server", "macros"] } diff --git a/crates/state/Cargo.toml b/crates/state/Cargo.toml index 1f2573225..acd78709e 100644 --- a/crates/state/Cargo.toml +++ b/crates/state/Cargo.toml @@ -1,13 +1,13 @@ [package] edition = "2021" -name = "alpen-vertex-state" +name = "alpen-express-state" version = "0.1.0" # Note: Since we want to keep the core consensus logic generic, we shouldn't # reuse much of reth in this crate so that we can factor it all out eventually. [dependencies] -alpen-vertex-primitives = { workspace = true } +alpen-express-primitives = { workspace = true } arbitrary = { workspace = true } borsh = { workspace = true } diff --git a/crates/state/src/block.rs b/crates/state/src/block.rs index 04e8ff8a3..b2feb9e33 100644 --- a/crates/state/src/block.rs +++ b/crates/state/src/block.rs @@ -3,7 +3,7 @@ use std::ops::Deref; use arbitrary::Arbitrary; use borsh::{BorshDeserialize, BorshSerialize}; -use alpen_vertex_primitives::prelude::*; +use alpen_express_primitives::prelude::*; use crate::{ exec_update, diff --git a/crates/state/src/bridge_ops.rs b/crates/state/src/bridge_ops.rs index cf3ab155f..8ffdcf9d7 100644 --- a/crates/state/src/bridge_ops.rs +++ b/crates/state/src/bridge_ops.rs @@ -3,7 +3,7 @@ use arbitrary::Arbitrary; use borsh::{BorshDeserialize, BorshSerialize}; -use alpen_vertex_primitives::buf::Buf64; +use alpen_express_primitives::buf::Buf64; /// Describes an intent to withdraw that hasn't been dispatched yet. #[derive(Clone, Debug, Eq, PartialEq, Arbitrary, BorshDeserialize, BorshSerialize)] diff --git a/crates/state/src/bridge_state.rs b/crates/state/src/bridge_state.rs index 08243adca..ca4d3cab9 100644 --- a/crates/state/src/bridge_state.rs +++ b/crates/state/src/bridge_state.rs @@ -5,7 +5,7 @@ use borsh::{BorshDeserialize, BorshSerialize}; -use alpen_vertex_primitives::{ +use alpen_express_primitives::{ buf::Buf32, l1::{self, OutputRef}, }; diff --git a/crates/state/src/chain_state.rs b/crates/state/src/chain_state.rs index e991ea7e5..18e3fec48 100644 --- a/crates/state/src/chain_state.rs +++ b/crates/state/src/chain_state.rs @@ -1,8 +1,8 @@ use arbitrary::Arbitrary; use borsh::{BorshDeserialize, BorshSerialize}; -use alpen_vertex_primitives::buf::Buf32; -use alpen_vertex_primitives::hash::compute_borsh_hash; +use alpen_express_primitives::buf::Buf32; +use alpen_express_primitives::hash::compute_borsh_hash; use crate::{bridge_ops, bridge_state, exec_env, l1}; use crate::{id::L2BlockId, state_queue::StateQueue}; diff --git a/crates/state/src/da_blob.rs b/crates/state/src/da_blob.rs index 4e8fa2fef..a7ca264ed 100644 --- a/crates/state/src/da_blob.rs +++ b/crates/state/src/da_blob.rs @@ -6,7 +6,7 @@ use arbitrary::Arbitrary; use borsh::{BorshDeserialize, BorshSerialize}; use num_enum::{IntoPrimitive, TryFromPrimitive}; -use alpen_vertex_primitives::buf::Buf32; +use alpen_express_primitives::buf::Buf32; /// DA destination identifier. This will eventually be used to enable /// storing blobs on alternative availability schemes. diff --git a/crates/state/src/exec_env.rs b/crates/state/src/exec_env.rs index 8a6b6f6ae..839c615ce 100644 --- a/crates/state/src/exec_env.rs +++ b/crates/state/src/exec_env.rs @@ -3,7 +3,7 @@ use arbitrary::Arbitrary; use borsh::{BorshDeserialize, BorshSerialize}; -use alpen_vertex_primitives::buf::Buf32; +use alpen_express_primitives::buf::Buf32; use crate::{bridge_ops, da_blob, exec_update, forced_inclusion, state_queue::StateQueue}; diff --git a/crates/state/src/exec_update.rs b/crates/state/src/exec_update.rs index 61c3539a6..d8a44d454 100644 --- a/crates/state/src/exec_update.rs +++ b/crates/state/src/exec_update.rs @@ -4,7 +4,7 @@ use arbitrary::Arbitrary; use borsh::{BorshDeserialize, BorshSerialize}; -use alpen_vertex_primitives::{buf::Buf32, evm_exec::create_evm_extra_payload}; +use alpen_express_primitives::{buf::Buf32, evm_exec::create_evm_extra_payload}; use crate::{bridge_ops, da_blob}; diff --git a/crates/state/src/forced_inclusion.rs b/crates/state/src/forced_inclusion.rs index 640072cb2..f2db8764c 100644 --- a/crates/state/src/forced_inclusion.rs +++ b/crates/state/src/forced_inclusion.rs @@ -5,7 +5,7 @@ use arbitrary::Arbitrary; use borsh::{BorshDeserialize, BorshSerialize}; -use alpen_vertex_primitives::l1; +use alpen_express_primitives::l1; #[derive(Clone, Debug, Eq, PartialEq, Arbitrary, BorshDeserialize, BorshSerialize)] pub struct ForcedInclusion { diff --git a/crates/state/src/header.rs b/crates/state/src/header.rs index 952119805..659e65fe9 100644 --- a/crates/state/src/header.rs +++ b/crates/state/src/header.rs @@ -3,7 +3,7 @@ use std::io::{self, Cursor, Write}; use arbitrary::Arbitrary; use borsh::{BorshDeserialize, BorshSerialize}; -use alpen_vertex_primitives::{ +use alpen_express_primitives::{ buf::{Buf32, Buf64}, hash, }; @@ -73,7 +73,7 @@ impl L2BlockHeader { // 8 + 8 + 32 + 32 + 32 + 32 = 144 let mut buf = [0; 144]; fill_sighash_buf(self, &mut buf).expect("blockasm: compute sighash"); - alpen_vertex_primitives::hash::raw(&buf) + alpen_express_primitives::hash::raw(&buf) } } diff --git a/crates/state/src/id.rs b/crates/state/src/id.rs index 3daea2612..d74458f3d 100644 --- a/crates/state/src/id.rs +++ b/crates/state/src/id.rs @@ -3,7 +3,7 @@ use std::fmt; use arbitrary::Arbitrary; use borsh::{BorshDeserialize, BorshSerialize}; -use alpen_vertex_primitives::buf::Buf32; +use alpen_express_primitives::buf::Buf32; /// ID of an L2 block, usually the hash of its root header. #[derive( diff --git a/crates/state/src/l1.rs b/crates/state/src/l1.rs index 875869a1f..e543a77ee 100644 --- a/crates/state/src/l1.rs +++ b/crates/state/src/l1.rs @@ -3,7 +3,7 @@ use core::fmt; use arbitrary::Arbitrary; use borsh::{BorshDeserialize, BorshSerialize}; -use alpen_vertex_primitives::{l1, prelude::*}; +use alpen_express_primitives::{l1, prelude::*}; use crate::state_queue::StateQueue; @@ -69,8 +69,8 @@ impl L1HeaderRecord { } } -impl From<&alpen_vertex_primitives::l1::L1BlockManifest> for L1HeaderRecord { - fn from(value: &alpen_vertex_primitives::l1::L1BlockManifest) -> Self { +impl From<&alpen_express_primitives::l1::L1BlockManifest> for L1HeaderRecord { + fn from(value: &alpen_express_primitives::l1::L1BlockManifest) -> Self { Self { buf: value.header().to_vec(), wtxs_root: value.txs_root(), diff --git a/crates/test-utils/Cargo.toml b/crates/test-utils/Cargo.toml index 673cf8037..0b3e58078 100644 --- a/crates/test-utils/Cargo.toml +++ b/crates/test-utils/Cargo.toml @@ -4,7 +4,7 @@ name = "alpen-test-utils" version = "0.1.0" [dependencies] -alpen-vertex-db = { workspace = true } +alpen-express-db = { workspace = true } anyhow = { workspace = true } arbitrary = { workspace = true } diff --git a/crates/test-utils/src/lib.rs b/crates/test-utils/src/lib.rs index 27914a3cc..d17357ca5 100644 --- a/crates/test-utils/src/lib.rs +++ b/crates/test-utils/src/lib.rs @@ -1,6 +1,6 @@ use std::sync::Arc; -use alpen_vertex_db::{ +use alpen_express_db::{ database::CommonDatabase, stubs::{chain_state::StubChainstateDb, l2::StubL2Db}, ClientStateDb, L1Db, SyncEventDb, @@ -37,8 +37,8 @@ impl ArbitraryGenerator { } pub fn get_rocksdb_tmp_instance() -> anyhow::Result> { - let dbname = alpen_vertex_db::ROCKSDB_NAME; - let cfs = alpen_vertex_db::STORE_COLUMN_FAMILIES; + let dbname = alpen_express_db::ROCKSDB_NAME; + let cfs = alpen_express_db::STORE_COLUMN_FAMILIES; let mut opts = rocksdb::Options::default(); opts.create_missing_column_families(true); opts.create_if_missing(true); diff --git a/crates/util/mmr/Cargo.toml b/crates/util/mmr/Cargo.toml index 9e8fddcff..a387c46d9 100644 --- a/crates/util/mmr/Cargo.toml +++ b/crates/util/mmr/Cargo.toml @@ -1,6 +1,6 @@ [package] edition = "2021" -name = "alpen-vertex-mmr" +name = "alpen-express-mmr" version = "0.1.0" [dependencies] diff --git a/crates/vtxjmt/Cargo.toml b/crates/vtxjmt/Cargo.toml index c3f89105a..3e48a639e 100644 --- a/crates/vtxjmt/Cargo.toml +++ b/crates/vtxjmt/Cargo.toml @@ -1,6 +1,6 @@ [package] edition = "2021" -name = "alpen-vertex-jmt" +name = "alpen-express-jmt" version = "0.1.0" [dependencies] diff --git a/functional-tests/README.md b/functional-tests/README.md index 9bf1173b5..1af2a6f95 100644 --- a/functional-tests/README.md +++ b/functional-tests/README.md @@ -1,4 +1,4 @@ -# Vertex Functional Tests +# Express Functional Tests Tests will be added here when we have more functionality to test. diff --git a/functional-tests/constants.py b/functional-tests/constants.py index 065b8994a..6f30df25f 100644 --- a/functional-tests/constants.py +++ b/functional-tests/constants.py @@ -1,7 +1,7 @@ BD_USERNAME = "alpen" BD_PASSWORD = "alpen" DD_ROOT = "_dd" -# keep in sync with `vertex-consensus-logic::genesis::MAX_HORIZON_POLL_INTERVAL` +# keep in sync with `express-consensus-logic::genesis::MAX_HORIZON_POLL_INTERVAL` MAX_HORIZON_POLL_INTERVAL_SECS = 1 SEQ_SLACK_TIME_SECS = 2 # to account for thread sync and startup times BLOCK_GENERATION_INTERVAL_SECS = 0.5 diff --git a/functional-tests/entry.py b/functional-tests/entry.py index 16620b11c..3b745032a 100755 --- a/functional-tests/entry.py +++ b/functional-tests/entry.py @@ -90,7 +90,7 @@ def _create_rpc(): return svc -class VertexFactory(flexitest.Factory): +class ExpressFactory(flexitest.Factory): def __init__(self, port_range: list[int]): super().__init__(port_range) @@ -111,7 +111,7 @@ def create_sequencer( # fmt: off cmd = [ - "alpen-vertex-sequencer", + "alpen-express-sequencer", "--datadir", datadir, "--rpc-port", str(rpc_port), "--bitcoind-host", bitcoind_sock, @@ -151,7 +151,7 @@ def create_exec_client( # fmt: off cmd = [ - "alpen-vertex-reth", + "alpen-express-reth", "--datadir", datadir, "--authrpc.port", str(rpc_port), "--authrpc.jwtsecret", reth_secret_path, @@ -199,7 +199,7 @@ def init(self, ctx: flexitest.EnvContext) -> flexitest.LiveEnv: rpc_pass = bitcoind.get_prop("rpc_password") rpc_sock = f"localhost:{rpc_port}" sequencer = seq_fac.create_sequencer(rpc_sock, rpc_user, rpc_pass, reth_socket, reth_secret_path) - # need to wait for at least `genesis_l1_height` blocks to be generated. sleeping some more for safety + # need to wait for at least `genesis_l1_height` blocks to be generated. sleeping some more for safety time.sleep(BLOCK_GENERATION_INTERVAL_SECS * 10) svcs = {"bitcoin": bitcoind, "sequencer": sequencer, "reth": reth} @@ -216,7 +216,7 @@ def main(argv): datadir_root = flexitest.create_datadir_in_workspace(os.path.join(test_dir, DD_ROOT)) btc_fac = BitcoinFactory([12300 + i for i in range(20)]) - seq_fac = VertexFactory([12400 + i for i in range(20)]) + seq_fac = ExpressFactory([12400 + i for i in range(20)]) reth_fac = RethFactory([12500 + i for i in range(20)]) factories = {"bitcoin": btc_fac, "sequencer": seq_fac, "reth": reth_fac} diff --git a/functional-tests/pyproject.toml b/functional-tests/pyproject.toml index 573c779a6..9a20a4165 100644 --- a/functional-tests/pyproject.toml +++ b/functional-tests/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] version = "0.1.0" -name = "alpen-vertex-test" +name = "alpen-express-test" description = "" authors = [] diff --git a/reth/Cargo.toml b/reth/Cargo.toml index 858680d97..3dd0c1adb 100644 --- a/reth/Cargo.toml +++ b/reth/Cargo.toml @@ -1,10 +1,10 @@ [package] edition = "2021" -name = "alpen-vertex-reth" +name = "alpen-express-reth" version = "0.1.0" [[bin]] -name = "alpen-vertex-reth" +name = "alpen-express-reth" path = "src/main.rs" [dependencies] diff --git a/sequencer/Cargo.toml b/sequencer/Cargo.toml index 92c928020..280c5e6d4 100644 --- a/sequencer/Cargo.toml +++ b/sequencer/Cargo.toml @@ -1,22 +1,22 @@ [package] edition = "2021" -name = "alpen-vertex-sequencer" +name = "alpen-express-sequencer" version = "0.1.0" [[bin]] -name = "alpen-vertex-sequencer" +name = "alpen-express-sequencer" path = "src/main.rs" [dependencies] -alpen-vertex-btcio = { workspace = true } -alpen-vertex-common = { workspace = true } -alpen-vertex-consensus-logic = { workspace = true } -alpen-vertex-db = { workspace = true } -alpen-vertex-evmctl = { workspace = true } -alpen-vertex-evmexec = { workspace = true } -alpen-vertex-primitives = { workspace = true } -alpen-vertex-rpc-api = { workspace = true } -alpen-vertex-state = { workspace = true } +alpen-express-btcio = { workspace = true } +alpen-express-common = { workspace = true } +alpen-express-consensus-logic = { workspace = true } +alpen-express-db = { workspace = true } +alpen-express-evmctl = { workspace = true } +alpen-express-evmexec = { workspace = true } +alpen-express-primitives = { workspace = true } +alpen-express-rpc-api = { workspace = true } +alpen-express-state = { workspace = true } anyhow = { workspace = true } argh = { workspace = true } diff --git a/sequencer/src/args.rs b/sequencer/src/args.rs index e6a994943..17008d208 100644 --- a/sequencer/src/args.rs +++ b/sequencer/src/args.rs @@ -4,7 +4,7 @@ use argh::FromArgs; use bitcoin::Network; #[derive(Debug, Clone, FromArgs)] -#[argh(description = "Alpen Vertex sequencer")] +#[argh(description = "Alpen Express sequencer")] pub struct Args { // TODO: default config location #[argh(option, short = 'c', description = "path to configuration")] diff --git a/sequencer/src/l1_reader.rs b/sequencer/src/l1_reader.rs index 7067067a4..eb45211fa 100644 --- a/sequencer/src/l1_reader.rs +++ b/sequencer/src/l1_reader.rs @@ -1,17 +1,17 @@ use std::sync::Arc; use std::thread; -use alpen_vertex_primitives::l1::L1Status; +use alpen_express_primitives::l1::L1Status; use tokio::sync::{mpsc, RwLock}; -use alpen_vertex_btcio::reader::{ +use alpen_express_btcio::reader::{ config::ReaderConfig, messages::L1Event, query::bitcoin_data_reader_task, }; -use alpen_vertex_btcio::rpc::traits::L1Client; -use alpen_vertex_consensus_logic::ctl::CsmController; -use alpen_vertex_consensus_logic::l1_handler::bitcoin_data_handler_task; -use alpen_vertex_db::traits::{Database, L1DataProvider}; -use alpen_vertex_primitives::params::Params; +use alpen_express_btcio::rpc::traits::L1Client; +use alpen_express_consensus_logic::ctl::CsmController; +use alpen_express_consensus_logic::l1_handler::bitcoin_data_handler_task; +use alpen_express_db::traits::{Database, L1DataProvider}; +use alpen_express_primitives::params::Params; use crate::config::Config; @@ -25,8 +25,8 @@ pub async fn start_reader_tasks( ) -> anyhow::Result<()> where // TODO how are these not redundant trait bounds??? - ::SeStore: Send + Sync + 'static, - ::L1Store: Send + Sync + 'static, + ::SeStore: Send + Sync + 'static, + ::L1Store: Send + Sync + 'static, { let (ev_tx, ev_rx) = mpsc::channel::(100); // TODO: think about the buffer size diff --git a/sequencer/src/main.rs b/sequencer/src/main.rs index 715995418..072ef31ec 100644 --- a/sequencer/src/main.rs +++ b/sequencer/src/main.rs @@ -7,7 +7,7 @@ use std::process; use std::sync::Arc; use std::thread; -use alpen_vertex_primitives::l1::L1Status; +use alpen_express_primitives::l1::L1Status; use anyhow::Context; use bitcoin::Network; use config::Config; @@ -19,17 +19,17 @@ use thiserror::Error; use tokio::sync::{broadcast, oneshot, RwLock}; use tracing::*; -use alpen_vertex_btcio::rpc::traits::L1Client; -use alpen_vertex_common::logging; -use alpen_vertex_consensus_logic::duties::{DutyBatch, Identity}; -use alpen_vertex_consensus_logic::duty_executor::{self, IdentityData, IdentityKey}; -use alpen_vertex_consensus_logic::sync_manager; -use alpen_vertex_consensus_logic::sync_manager::SyncManager; -use alpen_vertex_db::traits::Database; -use alpen_vertex_evmexec::{fork_choice_state_initial, EngineRpcClient}; -use alpen_vertex_primitives::buf::Buf32; -use alpen_vertex_primitives::{block_credential, params::*}; -use alpen_vertex_rpc_api::AlpenApiServer; +use alpen_express_btcio::rpc::traits::L1Client; +use alpen_express_common::logging; +use alpen_express_consensus_logic::duties::{DutyBatch, Identity}; +use alpen_express_consensus_logic::duty_executor::{self, IdentityData, IdentityKey}; +use alpen_express_consensus_logic::sync_manager; +use alpen_express_consensus_logic::sync_manager::SyncManager; +use alpen_express_db::traits::Database; +use alpen_express_evmexec::{fork_choice_state_initial, EngineRpcClient}; +use alpen_express_primitives::buf::Buf32; +use alpen_express_primitives::{block_credential, params::*}; +use alpen_express_rpc_api::AlpenApiServer; use crate::args::Args; @@ -118,24 +118,24 @@ fn main_inner(args: Args) -> anyhow::Result<()> { // Start runtime for async IO tasks. let rt = tokio::runtime::Builder::new_multi_thread() .enable_all() - .thread_name("vertex-rt") + .thread_name("express-rt") .build() .expect("init: build rt"); // Init thread pool for batch jobs. // TODO switch to num_cpus maybe? we don't want to compete with tokio though let pool = Arc::new(threadpool::ThreadPool::with_name( - "vertex-pool".to_owned(), + "express-pool".to_owned(), 8, )); // Initialize databases. - let l1_db = Arc::new(alpen_vertex_db::L1Db::new(rbdb.clone())); - let l2_db = Arc::new(alpen_vertex_db::l2::db::L2Db::new(rbdb.clone())); - let sync_ev_db = Arc::new(alpen_vertex_db::SyncEventDb::new(rbdb.clone())); - let cs_db = Arc::new(alpen_vertex_db::ClientStateDb::new(rbdb.clone())); - let chst_db = Arc::new(alpen_vertex_db::ChainStateDb::new(rbdb.clone())); - let database = Arc::new(alpen_vertex_db::database::CommonDatabase::new( + let l1_db = Arc::new(alpen_express_db::L1Db::new(rbdb.clone())); + let l2_db = Arc::new(alpen_express_db::l2::db::L2Db::new(rbdb.clone())); + let sync_ev_db = Arc::new(alpen_express_db::SyncEventDb::new(rbdb.clone())); + let cs_db = Arc::new(alpen_express_db::ClientStateDb::new(rbdb.clone())); + let chst_db = Arc::new(alpen_express_db::ChainStateDb::new(rbdb.clone())); + let database = Arc::new(alpen_express_db::database::CommonDatabase::new( l1_db, l2_db, sync_ev_db, cs_db, chst_db, )); @@ -144,7 +144,7 @@ fn main_inner(args: Args) -> anyhow::Result<()> { // Set up Bitcoin client RPC. let bitcoind_url = format!("http://{}", config.bitcoind_rpc.rpc_url); - let btc_rpc = alpen_vertex_btcio::rpc::BitcoinClient::new( + let btc_rpc = alpen_express_btcio::rpc::BitcoinClient::new( bitcoind_url, config.bitcoind_rpc.rpc_user.clone(), config.bitcoind_rpc.rpc_password.clone(), @@ -164,7 +164,7 @@ fn main_inner(args: Args) -> anyhow::Result<()> { ); let initial_fcs = fork_choice_state_initial(database.clone(), params.rollup())?; - let eng_ctl = alpen_vertex_evmexec::engine::RpcExecEngineCtl::new( + let eng_ctl = alpen_express_evmexec::engine::RpcExecEngineCtl::new( client, initial_fcs, rt.handle().clone(), @@ -232,9 +232,9 @@ async fn main_task( ) -> anyhow::Result<()> where // TODO how are these not redundant trait bounds??? - ::SeStore: Send + Sync + 'static, - ::L1Store: Send + Sync + 'static, - ::L1Prov: Send + Sync + 'static, + ::SeStore: Send + Sync + 'static, + ::L1Store: Send + Sync + 'static, + ::L1Prov: Send + Sync + 'static, { // Start the L1 tasks to get that going. let csm_ctl = sync_man.get_csm_ctl(); @@ -291,8 +291,8 @@ fn open_rocksdb_database( fs::create_dir_all(&database_dir)?; } - let dbname = alpen_vertex_db::ROCKSDB_NAME; - let cfs = alpen_vertex_db::STORE_COLUMN_FAMILIES; + let dbname = alpen_express_db::ROCKSDB_NAME; + let cfs = alpen_express_db::STORE_COLUMN_FAMILIES; let mut opts = rocksdb::Options::default(); opts.create_if_missing(true); opts.create_missing_column_families(true); diff --git a/sequencer/src/rpc_server.rs b/sequencer/src/rpc_server.rs index 88dcc0bf9..6dfbf4586 100644 --- a/sequencer/src/rpc_server.rs +++ b/sequencer/src/rpc_server.rs @@ -2,7 +2,7 @@ use std::sync::Arc; -use alpen_vertex_consensus_logic::sync_manager::SyncManager; +use alpen_express_consensus_logic::sync_manager::SyncManager; use async_trait::async_trait; use jsonrpsee::{ core::RpcResult, @@ -18,10 +18,10 @@ use reth_rpc_types::{ use thiserror::Error; use tokio::sync::{oneshot, watch, Mutex, RwLock}; -use alpen_vertex_db::traits::L1DataProvider; -use alpen_vertex_db::traits::{ChainstateProvider, Database, L2DataProvider}; -use alpen_vertex_rpc_api::{AlpenApiServer, ClientStatus, L1Status}; -use alpen_vertex_state::{ +use alpen_express_db::traits::L1DataProvider; +use alpen_express_db::traits::{ChainstateProvider, Database, L2DataProvider}; +use alpen_express_rpc_api::{AlpenApiServer, ClientStatus, L1Status}; +use alpen_express_state::{ chain_state::ChainState, client_state::ClientState, header::L2Header, id::L2BlockId, }; @@ -29,7 +29,7 @@ use tracing::*; #[derive(Debug, Error)] pub enum Error { - /// Unsupported RPCs for Vertex. Some of these might need to be replaced + /// Unsupported RPCs for express. Some of these might need to be replaced /// with standard unsupported errors. #[error("unsupported RPC")] Unsupported, @@ -47,7 +47,7 @@ pub enum Error { MissingChainstate(u64), #[error("db: {0}")] - Db(#[from] alpen_vertex_db::errors::DbError), + Db(#[from] alpen_express_db::errors::DbError), #[error("blocking task '{0}' failed for unknown reason")] BlockingAbort(String), @@ -90,7 +90,7 @@ impl From for ErrorObjectOwned { } pub struct AlpenRpcImpl { - l1_status: Arc>, + l1_status: Arc>, database: Arc, sync_manager: Arc, stop_tx: Mutex>>, @@ -98,7 +98,7 @@ pub struct AlpenRpcImpl { impl AlpenRpcImpl { pub fn new( - l1_status: Arc>, + l1_status: Arc>, database: Arc, sync_manager: Arc, stop_tx: oneshot::Sender<()>, @@ -156,7 +156,7 @@ impl AlpenRpcImpl { #[async_trait] impl AlpenApiServer for AlpenRpcImpl where - ::L1Prov: Send + Sync + 'static, + ::L1Prov: Send + Sync + 'static, { async fn protocol_version(&self) -> RpcResult { Ok(1)