From b2ef5e915cd525edc89469def60ceb805cfa48fe Mon Sep 17 00:00:00 2001 From: danielSanchezQ <3danimanimal@gmail.com> Date: Tue, 17 Feb 2026 11:54:55 +0000 Subject: [PATCH 1/5] Update wallet ffi with transfer calls --- wallet-ffi/src/transfer.rs | 170 +++++++++++++++++++++++++++ wallet-ffi/wallet_ffi.h | 227 +++++++++++++++++++++++++++++++++++++ 2 files changed, 397 insertions(+) diff --git a/wallet-ffi/src/transfer.rs b/wallet-ffi/src/transfer.rs index 2c0ccc7c..c609529d 100644 --- a/wallet-ffi/src/transfer.rs +++ b/wallet-ffi/src/transfer.rs @@ -359,6 +359,176 @@ pub unsafe extern "C" fn wallet_ffi_transfer_private( } } +/// Send a shielded token transfer to an owned private account. +/// +/// Transfers tokens from a public account to a private account that is owned +/// by this wallet. Unlike `wallet_ffi_transfer_shielded` which sends to a +/// foreign account using NPK/VPK keys, this variant takes a destination +/// account ID that must belong to this wallet. +/// +/// # Parameters +/// - `handle`: Valid wallet handle +/// - `from`: Source public account ID (must be owned by this wallet) +/// - `to`: Destination private account ID (must be owned by this wallet) +/// - `amount`: Amount to transfer as little-endian [u8; 16] +/// - `out_result`: Output pointer for transfer result +/// +/// # Returns +/// - `Success` if the transfer was submitted successfully +/// - `InsufficientFunds` if the source account doesn't have enough balance +/// - `KeyNotFound` if either account's keys are not in this wallet +/// - Error code on other failures +/// +/// # Memory +/// The result must be freed with `wallet_ffi_free_transfer_result()`. +/// +/// # Safety +/// - `handle` must be a valid wallet handle from `wallet_ffi_create_new` or `wallet_ffi_open` +/// - `from` must be a valid pointer to a `FfiBytes32` struct +/// - `to` must be a valid pointer to a `FfiBytes32` struct +/// - `amount` must be a valid pointer to a `[u8; 16]` array +/// - `out_result` must be a valid pointer to a `FfiTransferResult` struct +#[no_mangle] +pub unsafe extern "C" fn wallet_ffi_transfer_shielded_owned( + handle: *mut WalletHandle, + from: *const FfiBytes32, + to: *const FfiBytes32, + amount: *const [u8; 16], + out_result: *mut FfiTransferResult, +) -> WalletFfiError { + let wrapper = match get_wallet(handle) { + Ok(w) => w, + Err(e) => return e, + }; + + if from.is_null() || to.is_null() || amount.is_null() || out_result.is_null() { + print_error("Null pointer argument"); + return WalletFfiError::NullPointer; + } + + let wallet = match wrapper.core.lock() { + Ok(w) => w, + Err(e) => { + print_error(format!("Failed to lock wallet: {}", e)); + return WalletFfiError::InternalError; + } + }; + + let from_id = AccountId::new(unsafe { (*from).data }); + let to_id = AccountId::new(unsafe { (*to).data }); + let amount = u128::from_le_bytes(unsafe { *amount }); + + let transfer = NativeTokenTransfer(&wallet); + + match block_on(transfer.send_shielded_transfer(from_id, to_id, amount)) { + Ok(Ok((response, _shared_key))) => { + let tx_hash = CString::new(response.tx_hash) + .map(|s| s.into_raw()) + .unwrap_or(ptr::null_mut()); + + unsafe { + (*out_result).tx_hash = tx_hash; + (*out_result).success = true; + } + WalletFfiError::Success + } + Ok(Err(e)) => { + print_error(format!("Transfer failed: {:?}", e)); + unsafe { + (*out_result).tx_hash = ptr::null_mut(); + (*out_result).success = false; + } + map_execution_error(e) + } + Err(e) => e, + } +} + +/// Send a private token transfer to an owned private account. +/// +/// Transfers tokens from a private account to another private account that is +/// owned by this wallet. Unlike `wallet_ffi_transfer_private` which sends to a +/// foreign account using NPK/VPK keys, this variant takes a destination +/// account ID that must belong to this wallet. +/// +/// # Parameters +/// - `handle`: Valid wallet handle +/// - `from`: Source private account ID (must be owned by this wallet) +/// - `to`: Destination private account ID (must be owned by this wallet) +/// - `amount`: Amount to transfer as little-endian [u8; 16] +/// - `out_result`: Output pointer for transfer result +/// +/// # Returns +/// - `Success` if the transfer was submitted successfully +/// - `InsufficientFunds` if the source account doesn't have enough balance +/// - `KeyNotFound` if either account's keys are not in this wallet +/// - Error code on other failures +/// +/// # Memory +/// The result must be freed with `wallet_ffi_free_transfer_result()`. +/// +/// # Safety +/// - `handle` must be a valid wallet handle from `wallet_ffi_create_new` or `wallet_ffi_open` +/// - `from` must be a valid pointer to a `FfiBytes32` struct +/// - `to` must be a valid pointer to a `FfiBytes32` struct +/// - `amount` must be a valid pointer to a `[u8; 16]` array +/// - `out_result` must be a valid pointer to a `FfiTransferResult` struct +#[no_mangle] +pub unsafe extern "C" fn wallet_ffi_transfer_private_owned( + handle: *mut WalletHandle, + from: *const FfiBytes32, + to: *const FfiBytes32, + amount: *const [u8; 16], + out_result: *mut FfiTransferResult, +) -> WalletFfiError { + let wrapper = match get_wallet(handle) { + Ok(w) => w, + Err(e) => return e, + }; + + if from.is_null() || to.is_null() || amount.is_null() || out_result.is_null() { + print_error("Null pointer argument"); + return WalletFfiError::NullPointer; + } + + let wallet = match wrapper.core.lock() { + Ok(w) => w, + Err(e) => { + print_error(format!("Failed to lock wallet: {}", e)); + return WalletFfiError::InternalError; + } + }; + + let from_id = AccountId::new(unsafe { (*from).data }); + let to_id = AccountId::new(unsafe { (*to).data }); + let amount = u128::from_le_bytes(unsafe { *amount }); + + let transfer = NativeTokenTransfer(&wallet); + + match block_on(transfer.send_private_transfer_to_owned_account(from_id, to_id, amount)) { + Ok(Ok((response, _shared_keys))) => { + let tx_hash = CString::new(response.tx_hash) + .map(|s| s.into_raw()) + .unwrap_or(ptr::null_mut()); + + unsafe { + (*out_result).tx_hash = tx_hash; + (*out_result).success = true; + } + WalletFfiError::Success + } + Ok(Err(e)) => { + print_error(format!("Transfer failed: {:?}", e)); + unsafe { + (*out_result).tx_hash = ptr::null_mut(); + (*out_result).success = false; + } + map_execution_error(e) + } + Err(e) => e, + } +} + /// Register a public account on the network. /// /// This initializes a public account on the blockchain. The account must be diff --git a/wallet-ffi/wallet_ffi.h b/wallet-ffi/wallet_ffi.h index 0b2b0176..55f37cff 100644 --- a/wallet-ffi/wallet_ffi.h +++ b/wallet-ffi/wallet_ffi.h @@ -344,6 +344,30 @@ enum WalletFfiError wallet_ffi_get_account_public(struct WalletHandle *handle, const struct FfiBytes32 *account_id, struct FfiAccount *out_account); +/** + * Get full private account data from the local storage. + * + * # Parameters + * - `handle`: Valid wallet handle + * - `account_id`: The account ID (32 bytes) + * - `out_account`: Output pointer for account data + * + * # Returns + * - `Success` on successful query + * - Error code on failure + * + * # Memory + * The account data must be freed with `wallet_ffi_free_account_data()`. + * + * # Safety + * - `handle` must be a valid wallet handle from `wallet_ffi_create_new` or `wallet_ffi_open` + * - `account_id` must be a valid pointer to a `FfiBytes32` struct + * - `out_account` must be a valid pointer to a `FfiAccount` struct + */ +enum WalletFfiError wallet_ffi_get_account_private(struct WalletHandle *handle, + const struct FfiBytes32 *account_id, + struct FfiAccount *out_account); + /** * Free account data returned by `wallet_ffi_get_account_public`. * @@ -546,6 +570,182 @@ enum WalletFfiError wallet_ffi_transfer_public(struct WalletHandle *handle, const uint8_t (*amount)[16], struct FfiTransferResult *out_result); +/** + * Send a shielded token transfer. + * + * Transfers tokens from a public account to a private account. + * + * # Parameters + * - `handle`: Valid wallet handle + * - `from`: Source account ID (must be owned by this wallet) + * - `to_keys`: Destination account keys + * - `amount`: Amount to transfer as little-endian [u8; 16] + * - `out_result`: Output pointer for transfer result + * + * # Returns + * - `Success` if the transfer was submitted successfully + * - `InsufficientFunds` if the source account doesn't have enough balance + * - `KeyNotFound` if the source account's signing key is not in this wallet + * - Error code on other failures + * + * # Memory + * The result must be freed with `wallet_ffi_free_transfer_result()`. + * + * # Safety + * - `handle` must be a valid wallet handle from `wallet_ffi_create_new` or `wallet_ffi_open` + * - `from` must be a valid pointer to a `FfiBytes32` struct + * - `to_keys` must be a valid pointer to a `FfiPrivateAccountKeys` struct + * - `amount` must be a valid pointer to a `[u8; 16]` array + * - `out_result` must be a valid pointer to a `FfiTransferResult` struct + */ +enum WalletFfiError wallet_ffi_transfer_shielded(struct WalletHandle *handle, + const struct FfiBytes32 *from, + const struct FfiPrivateAccountKeys *to_keys, + const uint8_t (*amount)[16], + struct FfiTransferResult *out_result); + +/** + * Send a deshielded token transfer. + * + * Transfers tokens from a private account to a public account. + * + * # Parameters + * - `handle`: Valid wallet handle + * - `from`: Source account ID (must be owned by this wallet) + * - `to`: Destination account ID + * - `amount`: Amount to transfer as little-endian [u8; 16] + * - `out_result`: Output pointer for transfer result + * + * # Returns + * - `Success` if the transfer was submitted successfully + * - `InsufficientFunds` if the source account doesn't have enough balance + * - `KeyNotFound` if the source account's signing key is not in this wallet + * - Error code on other failures + * + * # Memory + * The result must be freed with `wallet_ffi_free_transfer_result()`. + * + * # Safety + * - `handle` must be a valid wallet handle from `wallet_ffi_create_new` or `wallet_ffi_open` + * - `from` must be a valid pointer to a `FfiBytes32` struct + * - `to` must be a valid pointer to a `FfiBytes32` struct + * - `amount` must be a valid pointer to a `[u8; 16]` array + * - `out_result` must be a valid pointer to a `FfiTransferResult` struct + */ +enum WalletFfiError wallet_ffi_transfer_deshielded(struct WalletHandle *handle, + const struct FfiBytes32 *from, + const struct FfiBytes32 *to, + const uint8_t (*amount)[16], + struct FfiTransferResult *out_result); + +/** + * Send a private token transfer. + * + * Transfers tokens from a private account to another private account. + * + * # Parameters + * - `handle`: Valid wallet handle + * - `from`: Source account ID (must be owned by this wallet) + * - `to_keys`: Destination account keys + * - `amount`: Amount to transfer as little-endian [u8; 16] + * - `out_result`: Output pointer for transfer result + * + * # Returns + * - `Success` if the transfer was submitted successfully + * - `InsufficientFunds` if the source account doesn't have enough balance + * - `KeyNotFound` if the source account's signing key is not in this wallet + * - Error code on other failures + * + * # Memory + * The result must be freed with `wallet_ffi_free_transfer_result()`. + * + * # Safety + * - `handle` must be a valid wallet handle from `wallet_ffi_create_new` or `wallet_ffi_open` + * - `from` must be a valid pointer to a `FfiBytes32` struct + * - `to_keys` must be a valid pointer to a `FfiPrivateAccountKeys` struct + * - `amount` must be a valid pointer to a `[u8; 16]` array + * - `out_result` must be a valid pointer to a `FfiTransferResult` struct + */ +enum WalletFfiError wallet_ffi_transfer_private(struct WalletHandle *handle, + const struct FfiBytes32 *from, + const struct FfiPrivateAccountKeys *to_keys, + const uint8_t (*amount)[16], + struct FfiTransferResult *out_result); + +/** + * Send a shielded token transfer to an owned private account. + * + * Transfers tokens from a public account to a private account that is owned + * by this wallet. Unlike `wallet_ffi_transfer_shielded` which sends to a + * foreign account using NPK/VPK keys, this variant takes a destination + * account ID that must belong to this wallet. + * + * # Parameters + * - `handle`: Valid wallet handle + * - `from`: Source public account ID (must be owned by this wallet) + * - `to`: Destination private account ID (must be owned by this wallet) + * - `amount`: Amount to transfer as little-endian [u8; 16] + * - `out_result`: Output pointer for transfer result + * + * # Returns + * - `Success` if the transfer was submitted successfully + * - `InsufficientFunds` if the source account doesn't have enough balance + * - `KeyNotFound` if either account's keys are not in this wallet + * - Error code on other failures + * + * # Memory + * The result must be freed with `wallet_ffi_free_transfer_result()`. + * + * # Safety + * - `handle` must be a valid wallet handle from `wallet_ffi_create_new` or `wallet_ffi_open` + * - `from` must be a valid pointer to a `FfiBytes32` struct + * - `to` must be a valid pointer to a `FfiBytes32` struct + * - `amount` must be a valid pointer to a `[u8; 16]` array + * - `out_result` must be a valid pointer to a `FfiTransferResult` struct + */ +enum WalletFfiError wallet_ffi_transfer_shielded_owned(struct WalletHandle *handle, + const struct FfiBytes32 *from, + const struct FfiBytes32 *to, + const uint8_t (*amount)[16], + struct FfiTransferResult *out_result); + +/** + * Send a private token transfer to an owned private account. + * + * Transfers tokens from a private account to another private account that is + * owned by this wallet. Unlike `wallet_ffi_transfer_private` which sends to a + * foreign account using NPK/VPK keys, this variant takes a destination + * account ID that must belong to this wallet. + * + * # Parameters + * - `handle`: Valid wallet handle + * - `from`: Source private account ID (must be owned by this wallet) + * - `to`: Destination private account ID (must be owned by this wallet) + * - `amount`: Amount to transfer as little-endian [u8; 16] + * - `out_result`: Output pointer for transfer result + * + * # Returns + * - `Success` if the transfer was submitted successfully + * - `InsufficientFunds` if the source account doesn't have enough balance + * - `KeyNotFound` if either account's keys are not in this wallet + * - Error code on other failures + * + * # Memory + * The result must be freed with `wallet_ffi_free_transfer_result()`. + * + * # Safety + * - `handle` must be a valid wallet handle from `wallet_ffi_create_new` or `wallet_ffi_open` + * - `from` must be a valid pointer to a `FfiBytes32` struct + * - `to` must be a valid pointer to a `FfiBytes32` struct + * - `amount` must be a valid pointer to a `[u8; 16]` array + * - `out_result` must be a valid pointer to a `FfiTransferResult` struct + */ +enum WalletFfiError wallet_ffi_transfer_private_owned(struct WalletHandle *handle, + const struct FfiBytes32 *from, + const struct FfiBytes32 *to, + const uint8_t (*amount)[16], + struct FfiTransferResult *out_result); + /** * Register a public account on the network. * @@ -573,6 +773,33 @@ enum WalletFfiError wallet_ffi_register_public_account(struct WalletHandle *hand const struct FfiBytes32 *account_id, struct FfiTransferResult *out_result); +/** + * Register a private account on the network. + * + * This initializes a private account. The account must be + * owned by this wallet. + * + * # Parameters + * - `handle`: Valid wallet handle + * - `account_id`: Account ID to register + * - `out_result`: Output pointer for registration result + * + * # Returns + * - `Success` if the registration was submitted successfully + * - Error code on failure + * + * # Memory + * The result must be freed with `wallet_ffi_free_transfer_result()`. + * + * # Safety + * - `handle` must be a valid wallet handle from `wallet_ffi_create_new` or `wallet_ffi_open` + * - `account_id` must be a valid pointer to a `FfiBytes32` struct + * - `out_result` must be a valid pointer to a `FfiTransferResult` struct + */ +enum WalletFfiError wallet_ffi_register_private_account(struct WalletHandle *handle, + const struct FfiBytes32 *account_id, + struct FfiTransferResult *out_result); + /** * Free a transfer result returned by `wallet_ffi_transfer_public` or * `wallet_ffi_register_public_account`. From 76af23f386a1ea7d62485dbfaf656076ee91617f Mon Sep 17 00:00:00 2001 From: r4bbit <445106+0x-r4bbit@users.noreply.github.com> Date: Mon, 16 Feb 2026 15:32:57 +0100 Subject: [PATCH 2/5] fix(sequencer_rpc): add AMM program id This adds the AMM program ID to the `get_program_ids` RPC endpoints, as it's currently missing while still being predeployed. --- sequencer_rpc/src/process.rs | 1 + wallet/src/cli/mod.rs | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/sequencer_rpc/src/process.rs b/sequencer_rpc/src/process.rs index 6874686e..7185ed9c 100644 --- a/sequencer_rpc/src/process.rs +++ b/sequencer_rpc/src/process.rs @@ -292,6 +292,7 @@ impl JsonHandler ); program_ids.insert("token".to_string(), Program::token().id()); program_ids.insert("pinata".to_string(), Program::pinata().id()); + program_ids.insert("amm".to_string(), Program::amm().id()); program_ids.insert( "privacy_preserving_circuit".to_string(), nssa::PRIVACY_PRESERVING_CIRCUIT_ID, diff --git a/wallet/src/cli/mod.rs b/wallet/src/cli/mod.rs index afd313a8..30192e54 100644 --- a/wallet/src/cli/mod.rs +++ b/wallet/src/cli/mod.rs @@ -139,6 +139,12 @@ pub async fn execute_subcommand( if circuit_id != &nssa::PRIVACY_PRESERVING_CIRCUIT_ID { panic!("Local ID for privacy preserving circuit is different from remote"); } + let Some(amm_id) = remote_program_ids.get("amm") else { + panic!("Missing AMM program ID from remote"); + }; + if amm_id != &Program::amm().id() { + panic!("Local ID for AMM program is different from remote"); + } println!("✅All looks good!"); From 964800f7650b544db3e6d954c4a9b968c3b9d655 Mon Sep 17 00:00:00 2001 From: Sergio Chouhy Date: Tue, 17 Feb 2026 18:33:29 -0300 Subject: [PATCH 3/5] add standalone feature for running sequencer without bedrock using mocked components --- sequencer_core/src/lib.rs | 3 +++ sequencer_rpc/Cargo.toml | 5 +++++ sequencer_rpc/src/lib.rs | 6 ++++++ sequencer_rpc/src/net_utils.rs | 11 ++++++++++- sequencer_runner/Cargo.toml | 5 +++++ sequencer_runner/src/lib.rs | 30 +++++++++++++++++++++++------- 6 files changed, 52 insertions(+), 8 deletions(-) diff --git a/sequencer_core/src/lib.rs b/sequencer_core/src/lib.rs index 9a2ca2b1..cad7e20e 100644 --- a/sequencer_core/src/lib.rs +++ b/sequencer_core/src/lib.rs @@ -28,6 +28,9 @@ pub mod indexer_client; #[cfg(feature = "mock")] pub mod mock; +#[cfg(feature = "mock")] +pub use mock::SequencerCoreWithMockClients; + pub struct SequencerCore< BC: BlockSettlementClientTrait = BlockSettlementClient, IC: IndexerClientTrait = IndexerClient, diff --git a/sequencer_rpc/Cargo.toml b/sequencer_rpc/Cargo.toml index 36b7f7a1..210f3077 100644 --- a/sequencer_rpc/Cargo.toml +++ b/sequencer_rpc/Cargo.toml @@ -27,3 +27,8 @@ borsh.workspace = true [dev-dependencies] sequencer_core = { workspace = true, features = ["mock"] } + +[features] +default = [] +# Includes types to run the sequencer in standalone mode +standalone = ["sequencer_core/mock"] diff --git a/sequencer_rpc/src/lib.rs b/sequencer_rpc/src/lib.rs index 6898c17c..ac92ff45 100644 --- a/sequencer_rpc/src/lib.rs +++ b/sequencer_rpc/src/lib.rs @@ -49,3 +49,9 @@ pub fn rpc_error_responce_inverter(err: RpcError) -> RpcError { data: content, } } + +#[cfg(feature = "standalone")] +use sequencer_core::mock::{MockBlockSettlementClient, MockIndexerClient}; + +#[cfg(feature = "standalone")] +pub type JsonHandlerWithMockClients = JsonHandler; diff --git a/sequencer_rpc/src/net_utils.rs b/sequencer_rpc/src/net_utils.rs index 5e33e76b..ee9f6aa1 100644 --- a/sequencer_rpc/src/net_utils.rs +++ b/sequencer_rpc/src/net_utils.rs @@ -9,10 +9,19 @@ use common::{ use futures::{Future, FutureExt}; use log::info; use mempool::MemPoolHandle; +#[cfg(not(feature = "standalone"))] use sequencer_core::SequencerCore; +#[cfg(feature = "standalone")] +use sequencer_core::SequencerCoreWithMockClients as SequencerCore; + +#[cfg(not(feature = "standalone"))] +use super::JsonHandler; + +#[cfg(feature = "standalone")] +type JsonHandler = super::JsonHandlerWithMockClients; + use tokio::sync::Mutex; -use super::JsonHandler; use crate::process::Process; pub const SHUTDOWN_TIMEOUT_SECS: u64 = 10; diff --git a/sequencer_runner/Cargo.toml b/sequencer_runner/Cargo.toml index 04861c7f..5e627ed2 100644 --- a/sequencer_runner/Cargo.toml +++ b/sequencer_runner/Cargo.toml @@ -18,3 +18,8 @@ actix.workspace = true actix-web.workspace = true tokio.workspace = true futures.workspace = true + +[features] +default = [] +# Runs the sequencer in standalone mode without depending on Bedrock and Indexer services. +standalone = ["sequencer_core/mock", "sequencer_rpc/standalone"] diff --git a/sequencer_runner/src/lib.rs b/sequencer_runner/src/lib.rs index b3020e93..e4d5289c 100644 --- a/sequencer_runner/src/lib.rs +++ b/sequencer_runner/src/lib.rs @@ -5,11 +5,12 @@ use anyhow::{Context as _, Result}; use clap::Parser; use common::rpc_primitives::RpcConfig; use futures::{FutureExt as _, never::Never}; -use log::{error, info, warn}; -use sequencer_core::{ - SequencerCore, block_settlement_client::BlockSettlementClientTrait as _, - config::SequencerConfig, -}; +use log::{error, info}; +#[cfg(not(feature = "standalone"))] +use sequencer_core::SequencerCore; +#[cfg(feature = "standalone")] +use sequencer_core::SequencerCoreWithMockClients as SequencerCore; +use sequencer_core::config::SequencerConfig; use sequencer_rpc::new_http_server; use tokio::{sync::Mutex, task::JoinHandle}; @@ -156,6 +157,7 @@ async fn main_loop(seq_core: Arc>, block_timeout: Duration) } } +#[cfg(not(feature = "standalone"))] async fn retry_pending_blocks_loop( seq_core: Arc>, retry_pending_blocks_timeout: Duration, @@ -180,8 +182,8 @@ async fn retry_pending_blocks_loop( "Resubmitting pending block with id {}", block.header.block_id ); - // TODO: We could cache the inscribe tx for each pending block to avoid re-creating it - // on every retry. + // TODO: We could cache the inscribe tx for each pending block to avoid re-creating + // it on every retry. let (tx, _msg_id) = block_settlement_client .create_inscribe_tx(block) .context("Failed to create inscribe tx for pending block")?; @@ -199,6 +201,7 @@ async fn retry_pending_blocks_loop( } } +#[cfg(not(feature = "standalone"))] async fn listen_for_bedrock_blocks_loop(seq_core: Arc>) -> Result { use indexer_service_rpc::RpcClient as _; @@ -235,6 +238,19 @@ async fn listen_for_bedrock_blocks_loop(seq_core: Arc>) -> } } +#[cfg(feature = "standalone")] +async fn listen_for_bedrock_blocks_loop(_seq_core: Arc>) -> Result { + std::future::pending::>().await +} + +#[cfg(feature = "standalone")] +async fn retry_pending_blocks_loop( + _seq_core: Arc>, + _retry_pending_blocks_timeout: Duration, +) -> Result { + std::future::pending::>().await +} + pub async fn main_runner() -> Result<()> { env_logger::init(); From 01dc41cc470c04310c9d6b38b60821fd22e7779a Mon Sep 17 00:00:00 2001 From: Sergio Chouhy Date: Tue, 17 Feb 2026 19:32:43 -0300 Subject: [PATCH 4/5] fix --- sequencer_runner/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sequencer_runner/src/lib.rs b/sequencer_runner/src/lib.rs index e4d5289c..74ebae49 100644 --- a/sequencer_runner/src/lib.rs +++ b/sequencer_runner/src/lib.rs @@ -5,12 +5,14 @@ use anyhow::{Context as _, Result}; use clap::Parser; use common::rpc_primitives::RpcConfig; use futures::{FutureExt as _, never::Never}; -use log::{error, info}; #[cfg(not(feature = "standalone"))] -use sequencer_core::SequencerCore; +use log::warn; +use log::{error, info}; #[cfg(feature = "standalone")] use sequencer_core::SequencerCoreWithMockClients as SequencerCore; use sequencer_core::config::SequencerConfig; +#[cfg(not(feature = "standalone"))] +use sequencer_core::{SequencerCore, block_settlement_client::BlockSettlementClientTrait as _}; use sequencer_rpc::new_http_server; use tokio::{sync::Mutex, task::JoinHandle}; From b008982eeba05795c2c366d4cf2dec7c71f70f93 Mon Sep 17 00:00:00 2001 From: Sergio Chouhy Date: Tue, 17 Feb 2026 19:37:44 -0300 Subject: [PATCH 5/5] update readme --- README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 364ee2a5..7bcfa25e 100644 --- a/README.md +++ b/README.md @@ -129,9 +129,8 @@ RUST_LOG=info RISC0_DEV_MODE=1 cargo run $(pwd)/configs/debug all ## Running Manually - -The sequencer and node can be run locally: - +### Normal mode +The sequencer and logos blockchain node can be run locally: 1. On one terminal go to the `logos-blockchain/logos-blockchain` repo and run a local logos blockchain node: - `git checkout master; git pull` - `cargo clean` @@ -141,10 +140,16 @@ The sequencer and node can be run locally: - `./target/debug/logos-blockchain-node --deployment nodes/node/standalone-deployment-config.yaml nodes/node/standalone-node-config.yaml` 2. On another terminal go to the `logos-blockchain/lssa` repo and run indexer service: - - `RUST_LOG=info cargo run --release -p indexer_service indexer/service/configs/indexer_config.json` + - `RUST_LOG=info cargo run -p indexer_service indexer/service/configs/indexer_config.json` 3. On another terminal go to the `logos-blockchain/lssa` repo and run the sequencer: - - `RUST_LOG=info RISC0_DEV_MODE=1 cargo run --release -p sequencer_runner sequencer_runner/configs/debug` + - `RUST_LOG=info cargo run -p sequencer_runner sequencer_runner/configs/debug` + +### Standalone mode +The sequencer can be run in standalone mode with: +```bash +RUST_LOG=info cargo run --features standalone -p sequencer_runner sequencer_runner/configs/debug +``` ## Running with Docker