From 6d947710d15f78639d87c3be4f0ffed7dabc260f Mon Sep 17 00:00:00 2001 From: Oleksandr Pravdyvyi Date: Fri, 25 Jul 2025 19:42:29 +0300 Subject: [PATCH 1/9] feat:int test --- Cargo.lock | 24 +++++++++++++++++++ Cargo.toml | 1 + integration_tests/Cargo.toml | 44 +++++++++++++++++++++++++++++++++++ integration_tests/src/lib.rs | 5 ++++ integration_tests/src/main.rs | 16 +++++++++++++ 5 files changed, 90 insertions(+) create mode 100644 integration_tests/Cargo.toml create mode 100644 integration_tests/src/lib.rs create mode 100644 integration_tests/src/main.rs diff --git a/Cargo.lock b/Cargo.lock index 717be5c..18c27a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2371,6 +2371,30 @@ dependencies = [ "generic-array", ] +[[package]] +name = "integration_tests" +version = "0.1.0" +dependencies = [ + "accounts", + "actix", + "actix-web", + "anyhow", + "clap", + "common", + "env_logger", + "log", + "node_core", + "node_rpc", + "node_runner", + "sequencer_core", + "sequencer_rpc", + "sequencer_runner", + "serde", + "serde_json", + "tokio", + "toml 0.7.8", +] + [[package]] name = "inventory" version = "0.3.20" diff --git a/Cargo.toml b/Cargo.toml index f2bcab8..47fcb98 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,7 @@ members = [ "sequencer_core", "common", "sc_core", + "integration_tests", ] [workspace.dependencies] diff --git a/integration_tests/Cargo.toml b/integration_tests/Cargo.toml new file mode 100644 index 0000000..fcc7cc6 --- /dev/null +++ b/integration_tests/Cargo.toml @@ -0,0 +1,44 @@ +[package] +name = "integration_tests" +version = "0.1.0" +edition = "2024" + +[dependencies] +anyhow.workspace = true +serde_json.workspace = true +env_logger.workspace = true +log.workspace = true +serde.workspace = true +actix.workspace = true + +actix-web.workspace = true +tokio.workspace = true +toml.workspace = true + +[dependencies.clap] +features = ["derive", "env"] +workspace = true + +[dependencies.sequencer_rpc] +path = "../sequencer_rpc" + +[dependencies.sequencer_core] +path = "../sequencer_core" + +[dependencies.sequencer_runner] +path = "../sequencer_runner" + +[dependencies.node_rpc] +path = "../node_rpc" + +[dependencies.node_core] +path = "../node_core" + +[dependencies.node_runner] +path = "../node_runner" + +[dependencies.common] +path = "../common" + +[dependencies.accounts] +path = "../accounts" diff --git a/integration_tests/src/lib.rs b/integration_tests/src/lib.rs new file mode 100644 index 0000000..c539bd4 --- /dev/null +++ b/integration_tests/src/lib.rs @@ -0,0 +1,5 @@ +use anyhow::Result; + +pub async fn main_tests_runner() -> Result<()> { + Ok(()) +} diff --git a/integration_tests/src/main.rs b/integration_tests/src/main.rs new file mode 100644 index 0000000..5df600a --- /dev/null +++ b/integration_tests/src/main.rs @@ -0,0 +1,16 @@ +use anyhow::Result; + +use integration_tests::main_tests_runner; + +pub const NUM_THREADS: usize = 8; + +fn main() -> Result<()> { + actix::System::with_tokio_rt(|| { + tokio::runtime::Builder::new_multi_thread() + .worker_threads(NUM_THREADS) + .enable_all() + .build() + .unwrap() + }) + .block_on(main_tests_runner()) +} From d181ce73e6650c4dc7197765474c9269badd5e3c Mon Sep 17 00:00:00 2001 From: Oleksandr Pravdyvyi Date: Mon, 28 Jul 2025 16:31:43 +0300 Subject: [PATCH 2/9] fix: node and sequencer startup --- .../configs/debug/node_config.json | 17 +++++ .../configs/debug/sequencer_config.json | 19 +++++ integration_tests/src/lib.rs | 74 ++++++++++++++++++- 3 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 integration_tests/configs/debug/node_config.json create mode 100644 integration_tests/configs/debug/sequencer_config.json diff --git a/integration_tests/configs/debug/node_config.json b/integration_tests/configs/debug/node_config.json new file mode 100644 index 0000000..c948b82 --- /dev/null +++ b/integration_tests/configs/debug/node_config.json @@ -0,0 +1,17 @@ +{ + "home": ".", + "override_rust_log": null, + "sequencer_addr": "http://127.0.0.1:3040", + "seq_poll_timeout_secs": 10, + "port": 3041, + "gas_config": { + "gas_fee_per_byte_deploy": 100, + "gas_fee_per_input_buffer_runtime": 1000, + "gas_fee_per_byte_runtime": 10, + "gas_cost_runtime": 100, + "gas_cost_deploy": 1000, + "gas_limit_deploy": 30000000, + "gas_limit_runtime": 30000000 + }, + "shapshot_frequency_in_blocks": 10 +} \ No newline at end of file diff --git a/integration_tests/configs/debug/sequencer_config.json b/integration_tests/configs/debug/sequencer_config.json new file mode 100644 index 0000000..18d1b72 --- /dev/null +++ b/integration_tests/configs/debug/sequencer_config.json @@ -0,0 +1,19 @@ +{ + "home": ".", + "override_rust_log": null, + "genesis_id": 1, + "is_genesis_random": true, + "max_num_tx_in_block": 20, + "block_create_timeout_millis": 10000, + "port": 3040, + "initial_accounts": [ + { + "addr": "bfd91e6703273a115ad7f099ef32f621243be69369d00ddef5d3a25117d09a8c", + "balance": 10 + }, + { + "addr": "20573479053979b98d2ad09ef31a0750f22c77709bed51c4e64946bd1e376f31", + "balance": 100 + } + ] +} \ No newline at end of file diff --git a/integration_tests/src/lib.rs b/integration_tests/src/lib.rs index c539bd4..af98f4d 100644 --- a/integration_tests/src/lib.rs +++ b/integration_tests/src/lib.rs @@ -1,5 +1,77 @@ +use std::{path::PathBuf, sync::Arc}; + use anyhow::Result; +use clap::Parser; +use common::rpc_primitives::RpcConfig; +use log::info; +use node_core::NodeCore; +use sequencer_core::SequencerCore; +use tokio::{sync::Mutex, task::JoinHandle}; + +#[derive(Parser, Debug)] +#[clap(version)] +struct Args { + /// Path to configs + home_dir: PathBuf, +} pub async fn main_tests_runner() -> Result<()> { - Ok(()) + env_logger::init(); + + let args = Args::parse(); + let Args { home_dir } = args; + + let sequencer_config = sequencer_runner::config::from_file(home_dir.join("sequencer_config.json"))?; + let node_config = node_runner::config::from_file(home_dir.join("node_config.json"))?; + + let block_timeout = sequencer_config.block_create_timeout_millis; + let sequencer_port = sequencer_config.port; + + let sequencer_core = SequencerCore::start_from_config(sequencer_config); + + info!("Sequencer core set up"); + + let seq_core_wrapped = Arc::new(Mutex::new(sequencer_core)); + + let http_server = sequencer_rpc::new_http_server(RpcConfig::with_port(sequencer_port), seq_core_wrapped.clone())?; + info!("HTTP server started"); + let _http_server_handle = http_server.handle(); + tokio::spawn(http_server); + + info!("Starting main sequencer loop"); + + let _sequencer_loop_handle: JoinHandle> = tokio::spawn(async move { + loop { + tokio::time::sleep(std::time::Duration::from_millis(block_timeout)).await; + + info!("Collecting transactions from mempool, block creation"); + + let id = { + let mut state = seq_core_wrapped.lock().await; + + state.produce_new_block_with_mempool_transactions()? + }; + + info!("Block with id {id} created"); + + info!("Waiting for new transactions"); + } + }); + + let node_port = node_config.port; + + let node_core = NodeCore::start_from_config_update_chain(node_config.clone()).await?; + let wrapped_node_core = Arc::new(Mutex::new(node_core)); + + let http_server = node_rpc::new_http_server( + RpcConfig::with_port(node_port), + node_config.clone(), + wrapped_node_core.clone(), + )?; + info!("HTTP server started"); + let _http_server_handle = http_server.handle(); + tokio::spawn(http_server); + + #[allow(clippy::empty_loop)] + loop {} } From 6df4a04f841cb88945042dfce2ec8a9b9dd26186 Mon Sep 17 00:00:00 2001 From: Oleksandr Pravdyvyi Date: Wed, 30 Jul 2025 14:01:40 +0300 Subject: [PATCH 3/9] feat: first scenario implemented --- Cargo.lock | 1 + integration_tests/Cargo.toml | 1 + .../configs/debug/node/node_config.json | 253 ++++++++++++++++++ .../configs/debug/node_config.json | 17 -- .../debug/sequencer/sequencer_config.json | 19 ++ .../configs/debug/sequencer_config.json | 19 -- integration_tests/src/lib.rs | 72 ++++- node_core/src/lib.rs | 6 +- node_core/src/sequencer_client/json.rs | 8 + node_core/src/sequencer_client/mod.rs | 23 +- sequencer_core/src/lib.rs | 5 + 11 files changed, 370 insertions(+), 54 deletions(-) create mode 100644 integration_tests/configs/debug/node/node_config.json delete mode 100644 integration_tests/configs/debug/node_config.json create mode 100644 integration_tests/configs/debug/sequencer/sequencer_config.json delete mode 100644 integration_tests/configs/debug/sequencer_config.json diff --git a/Cargo.lock b/Cargo.lock index bf0838b..de96e5f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2389,6 +2389,7 @@ dependencies = [ "clap", "common", "env_logger", + "hex", "log", "node_core", "node_rpc", diff --git a/integration_tests/Cargo.toml b/integration_tests/Cargo.toml index fcc7cc6..9558b9f 100644 --- a/integration_tests/Cargo.toml +++ b/integration_tests/Cargo.toml @@ -14,6 +14,7 @@ actix.workspace = true actix-web.workspace = true tokio.workspace = true toml.workspace = true +hex.workspace = true [dependencies.clap] features = ["derive", "env"] diff --git a/integration_tests/configs/debug/node/node_config.json b/integration_tests/configs/debug/node/node_config.json new file mode 100644 index 0000000..ec27ac4 --- /dev/null +++ b/integration_tests/configs/debug/node/node_config.json @@ -0,0 +1,253 @@ +{ + "home": "./node", + "override_rust_log": null, + "sequencer_addr": "http://127.0.0.1:3040", + "seq_poll_timeout_secs": 10, + "port": 3041, + "gas_config": { + "gas_fee_per_byte_deploy": 100, + "gas_fee_per_input_buffer_runtime": 1000, + "gas_fee_per_byte_runtime": 10, + "gas_cost_runtime": 100, + "gas_cost_deploy": 1000, + "gas_limit_deploy": 30000000, + "gas_limit_runtime": 30000000 + }, + "shapshot_frequency_in_blocks": 10, + "initial_accounts": [ + { + "address": [ + 13, + 150, + 223, + 204, + 65, + 64, + 25, + 56, + 12, + 157, + 222, + 12, + 211, + 220, + 229, + 170, + 201, + 15, + 181, + 68, + 59, + 248, + 113, + 16, + 135, + 65, + 174, + 175, + 222, + 85, + 42, + 215 + ], + "balance": 10000, + "key_holder": { + "address": [ + 13, + 150, + 223, + 204, + 65, + 64, + 25, + 56, + 12, + 157, + 222, + 12, + 211, + 220, + 229, + 170, + 201, + 15, + 181, + 68, + 59, + 248, + 113, + 16, + 135, + 65, + 174, + 175, + 222, + 85, + 42, + 215 + ], + "nullifer_public_key": "03A340BECA9FAAB444CED0140681D72EA1318B5C611704FEE017DA9836B17DB718", + "pub_account_signing_key": [ + 133, + 143, + 177, + 187, + 252, + 66, + 237, + 236, + 234, + 252, + 244, + 138, + 5, + 151, + 3, + 99, + 217, + 231, + 112, + 217, + 77, + 211, + 58, + 218, + 176, + 68, + 99, + 53, + 152, + 228, + 198, + 190 + ], + "top_secret_key_holder": { + "secret_spending_key": "7BC46784DB1BC67825D8F029436846712BFDF9B5D79EA3AB11D39A52B9B229D4" + }, + "utxo_secret_key_holder": { + "nullifier_secret_key": "BB54A8D3C9C51B82C431082D1845A74677B0EF829A11B517E1D9885DE3139506", + "viewing_secret_key": "AD923E92F6A5683E30140CEAB2702AFB665330C1EE4EFA70FAF29767B6B52BAF" + }, + "viewing_public_key": "0361220C5D277E7A1709340FD31A52600C1432B9C45B9BCF88A43581D58824A8B6" + }, + "utxos": {} + }, + { + "address": [ + 151, + 72, + 112, + 233, + 190, + 141, + 10, + 192, + 138, + 168, + 59, + 63, + 199, + 167, + 166, + 134, + 41, + 29, + 135, + 50, + 80, + 138, + 186, + 152, + 179, + 96, + 128, + 243, + 156, + 44, + 243, + 100 + ], + "balance": 20000, + "key_holder": { + "address": [ + 151, + 72, + 112, + 233, + 190, + 141, + 10, + 192, + 138, + 168, + 59, + 63, + 199, + 167, + 166, + 134, + 41, + 29, + 135, + 50, + 80, + 138, + 186, + 152, + 179, + 96, + 128, + 243, + 156, + 44, + 243, + 100 + ], + "nullifer_public_key": "02172F50274DE67C4087C344F5D58E11DF761D90285B095060E0994FAA6BCDE271", + "pub_account_signing_key": [ + 54, + 90, + 62, + 225, + 71, + 225, + 228, + 148, + 143, + 53, + 210, + 23, + 137, + 158, + 171, + 156, + 48, + 7, + 139, + 52, + 117, + 242, + 214, + 7, + 99, + 29, + 122, + 184, + 59, + 116, + 144, + 107 + ], + "top_secret_key_holder": { + "secret_spending_key": "80A186737C8D38B4288A03F0F589957D9C040D79C19F3E0CC4BA80F8494E5179" + }, + "utxo_secret_key_holder": { + "nullifier_secret_key": "746928E63F0984F6F4818933493CE9C067562D9CB932FDC06D82C86CDF6D7122", + "viewing_secret_key": "89176CF4BC9E673807643FD52110EF99D4894335AFB10D881AC0B5041FE1FCB7" + }, + "viewing_public_key": "026072A8F83FEC3472E30CDD4767683F30B91661D25B1040AD9A5FC2E01D659F99" + }, + "utxos": {} + } + ] +} \ No newline at end of file diff --git a/integration_tests/configs/debug/node_config.json b/integration_tests/configs/debug/node_config.json deleted file mode 100644 index c948b82..0000000 --- a/integration_tests/configs/debug/node_config.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "home": ".", - "override_rust_log": null, - "sequencer_addr": "http://127.0.0.1:3040", - "seq_poll_timeout_secs": 10, - "port": 3041, - "gas_config": { - "gas_fee_per_byte_deploy": 100, - "gas_fee_per_input_buffer_runtime": 1000, - "gas_fee_per_byte_runtime": 10, - "gas_cost_runtime": 100, - "gas_cost_deploy": 1000, - "gas_limit_deploy": 30000000, - "gas_limit_runtime": 30000000 - }, - "shapshot_frequency_in_blocks": 10 -} \ No newline at end of file diff --git a/integration_tests/configs/debug/sequencer/sequencer_config.json b/integration_tests/configs/debug/sequencer/sequencer_config.json new file mode 100644 index 0000000..9eb086a --- /dev/null +++ b/integration_tests/configs/debug/sequencer/sequencer_config.json @@ -0,0 +1,19 @@ +{ + "home": "./sequencer", + "override_rust_log": null, + "genesis_id": 1, + "is_genesis_random": true, + "max_num_tx_in_block": 20, + "block_create_timeout_millis": 10000, + "port": 3040, + "initial_accounts": [ + { + "addr": "0d96dfcc414019380c9dde0cd3dce5aac90fb5443bf871108741aeafde552ad7", + "balance": 10000 + }, + { + "addr": "974870e9be8d0ac08aa83b3fc7a7a686291d8732508aba98b36080f39c2cf364", + "balance": 20000 + } + ] +} \ No newline at end of file diff --git a/integration_tests/configs/debug/sequencer_config.json b/integration_tests/configs/debug/sequencer_config.json deleted file mode 100644 index 18d1b72..0000000 --- a/integration_tests/configs/debug/sequencer_config.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "home": ".", - "override_rust_log": null, - "genesis_id": 1, - "is_genesis_random": true, - "max_num_tx_in_block": 20, - "block_create_timeout_millis": 10000, - "port": 3040, - "initial_accounts": [ - { - "addr": "bfd91e6703273a115ad7f099ef32f621243be69369d00ddef5d3a25117d09a8c", - "balance": 10 - }, - { - "addr": "20573479053979b98d2ad09ef31a0750f22c77709bed51c4e64946bd1e376f31", - "balance": 100 - } - ] -} \ No newline at end of file diff --git a/integration_tests/src/lib.rs b/integration_tests/src/lib.rs index af98f4d..375a523 100644 --- a/integration_tests/src/lib.rs +++ b/integration_tests/src/lib.rs @@ -1,4 +1,4 @@ -use std::{path::PathBuf, sync::Arc}; +use std::{path::PathBuf, sync::Arc, time::Duration}; use anyhow::Result; use clap::Parser; @@ -15,14 +15,23 @@ struct Args { home_dir: PathBuf, } +pub const ACC_SENDER: &str = "0d96dfcc414019380c9dde0cd3dce5aac90fb5443bf871108741aeafde552ad7"; +pub const ACC_RECEIVER: &str = "974870e9be8d0ac08aa83b3fc7a7a686291d8732508aba98b36080f39c2cf364"; + pub async fn main_tests_runner() -> Result<()> { env_logger::init(); let args = Args::parse(); let Args { home_dir } = args; - let sequencer_config = sequencer_runner::config::from_file(home_dir.join("sequencer_config.json"))?; - let node_config = node_runner::config::from_file(home_dir.join("node_config.json"))?; + let home_dir_sequencer = home_dir.join("sequencer"); + let home_dir_node = home_dir.join("node"); + + let sequencer_config = + sequencer_runner::config::from_file(home_dir_sequencer.join("sequencer_config.json")) + .unwrap(); + let node_config = + node_runner::config::from_file(home_dir_node.join("node_config.json")).unwrap(); let block_timeout = sequencer_config.block_create_timeout_millis; let sequencer_port = sequencer_config.port; @@ -33,14 +42,17 @@ pub async fn main_tests_runner() -> Result<()> { let seq_core_wrapped = Arc::new(Mutex::new(sequencer_core)); - let http_server = sequencer_rpc::new_http_server(RpcConfig::with_port(sequencer_port), seq_core_wrapped.clone())?; + let http_server = sequencer_rpc::new_http_server( + RpcConfig::with_port(sequencer_port), + seq_core_wrapped.clone(), + )?; info!("HTTP server started"); - let _http_server_handle = http_server.handle(); + let seq_http_server_handle = http_server.handle(); tokio::spawn(http_server); info!("Starting main sequencer loop"); - let _sequencer_loop_handle: JoinHandle> = tokio::spawn(async move { + let sequencer_loop_handle: JoinHandle> = tokio::spawn(async move { loop { tokio::time::sleep(std::time::Duration::from_millis(block_timeout)).await; @@ -69,9 +81,51 @@ pub async fn main_tests_runner() -> Result<()> { wrapped_node_core.clone(), )?; info!("HTTP server started"); - let _http_server_handle = http_server.handle(); + let node_http_server_handle = http_server.handle(); tokio::spawn(http_server); - #[allow(clippy::empty_loop)] - loop {} + info!("Waiting for first block creation"); + tokio::time::sleep(Duration::from_secs(12)).await; + + let acc_sender = hex::decode(ACC_SENDER).unwrap().try_into().unwrap(); + let acc_receiver = hex::decode(ACC_RECEIVER).unwrap().try_into().unwrap(); + + { + let guard = wrapped_node_core.lock().await; + + let res = guard + .send_public_native_token_transfer(acc_sender, acc_receiver, 100) + .await + .unwrap(); + + info!("Res of tx_send is {res:#?}"); + + info!("Waiting for next block creation"); + tokio::time::sleep(Duration::from_secs(12)).await; + + info!("Checking correct balance move"); + let acc_1_balance = guard + .sequencer_client + .get_account_balance(ACC_SENDER.to_string()) + .await + .unwrap(); + let acc_2_balance = guard + .sequencer_client + .get_account_balance(ACC_RECEIVER.to_string()) + .await + .unwrap(); + + info!("Balance of sender : {acc_1_balance:#?}"); + info!("Balance of receiver : {acc_2_balance:#?}"); + } + + info!("Success!"); + + info!("Cleanup"); + + node_http_server_handle.stop(true).await; + sequencer_loop_handle.abort(); + seq_http_server_handle.stop(true).await; + + Ok(()) } diff --git a/node_core/src/lib.rs b/node_core/src/lib.rs index a8ca0b9..1d5259f 100644 --- a/node_core/src/lib.rs +++ b/node_core/src/lib.rs @@ -103,12 +103,8 @@ impl NodeCore { let genesis_block = client.get_block(genesis_id.genesis_id).await?.block; - let initial_accounts_ser = client.get_initial_testnet_accounts().await?; - let initial_accounts: Vec = - initial_accounts_ser.into_iter().map(Into::into).collect(); - let (mut storage, mut chain_height) = NodeChainStore::new(config.clone(), genesis_block)?; - for acc in initial_accounts { + for acc in config.clone().initial_accounts { storage.acc_map.insert(acc.address, acc); } diff --git a/node_core/src/sequencer_client/json.rs b/node_core/src/sequencer_client/json.rs index df94ca2..ad1d746 100644 --- a/node_core/src/sequencer_client/json.rs +++ b/node_core/src/sequencer_client/json.rs @@ -46,3 +46,11 @@ pub struct SequencerRpcResponse { pub result: serde_json::Value, pub id: u64, } + +#[derive(Debug, Serialize, Deserialize, Clone)] +///Helperstruct for account serialization +pub struct AccountInitialData { + ///Hex encoded `AccountAddress` + pub addr: String, + pub balance: u64, +} diff --git a/node_core/src/sequencer_client/mod.rs b/node_core/src/sequencer_client/mod.rs index e24b840..018d4ef 100644 --- a/node_core/src/sequencer_client/mod.rs +++ b/node_core/src/sequencer_client/mod.rs @@ -1,8 +1,7 @@ -use accounts::account_core::{Account, AccountForSerialization}; +use accounts::account_core::Account; use anyhow::Result; use common::rpc_primitives::requests::{ - GetBlockDataRequest, GetBlockDataResponse, GetGenesisIdRequest, GetGenesisIdResponse, - GetInitialTestnetAccountsRequest, RegisterAccountRequest, RegisterAccountResponse, + GetAccountBalanceRequest, GetAccountBalanceResponse, GetBlockDataRequest, GetBlockDataResponse, GetGenesisIdRequest, GetGenesisIdResponse, GetInitialTestnetAccountsRequest, RegisterAccountRequest, RegisterAccountResponse }; use common::transaction::Transaction; use common::{SequencerClientError, SequencerRpcError}; @@ -11,6 +10,7 @@ use reqwest::Client; use serde_json::Value; use crate::config::NodeConfig; +use crate::sequencer_client::json::AccountInitialData; pub mod json; @@ -69,6 +69,21 @@ impl SequencerClient { Ok(resp_deser) } + pub async fn get_account_balance( + &self, + address: String, + ) -> Result { + let block_req = GetAccountBalanceRequest { address }; + + let req = serde_json::to_value(block_req)?; + + let resp = self.call_method_with_payload("get_account_balance", req).await?; + + let resp_deser = serde_json::from_value(resp)?; + + Ok(resp_deser) + } + pub async fn send_tx( &self, transaction: Transaction, @@ -124,7 +139,7 @@ impl SequencerClient { pub async fn get_initial_testnet_accounts( &self, - ) -> Result, SequencerClientError> { + ) -> Result, SequencerClientError> { let acc_req = GetInitialTestnetAccountsRequest {}; let req = serde_json::to_value(acc_req).unwrap(); diff --git a/sequencer_core/src/lib.rs b/sequencer_core/src/lib.rs index 3786a2b..5a6fd4d 100644 --- a/sequencer_core/src/lib.rs +++ b/sequencer_core/src/lib.rs @@ -478,6 +478,9 @@ mod tests { assert_eq!(sequencer.sequencer_config.max_num_tx_in_block, 10); assert_eq!(sequencer.sequencer_config.port, 8080); + println!("Initial_acc1 {:#?}", config.initial_accounts[0].addr.clone()); + println!("Initial_acc1 {:#?}", config.initial_accounts[1].addr.clone()); + let acc1_addr = hex::decode(config.initial_accounts[0].addr.clone()) .unwrap() .try_into() @@ -487,6 +490,8 @@ mod tests { .try_into() .unwrap(); + assert_eq!(2,3); + assert!(sequencer.store.acc_store.contains_account(&acc1_addr)); assert!(sequencer.store.acc_store.contains_account(&acc2_addr)); From aa142eed07a0c2efdbb4c764a61d9d1adee0f797 Mon Sep 17 00:00:00 2001 From: Oleksandr Pravdyvyi Date: Wed, 30 Jul 2025 14:14:46 +0300 Subject: [PATCH 4/9] fix: fmt commit --- node_core/src/sequencer_client/mod.rs | 8 ++++++-- sequencer_core/src/lib.rs | 5 ----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/node_core/src/sequencer_client/mod.rs b/node_core/src/sequencer_client/mod.rs index 018d4ef..834e862 100644 --- a/node_core/src/sequencer_client/mod.rs +++ b/node_core/src/sequencer_client/mod.rs @@ -1,7 +1,9 @@ use accounts::account_core::Account; use anyhow::Result; use common::rpc_primitives::requests::{ - GetAccountBalanceRequest, GetAccountBalanceResponse, GetBlockDataRequest, GetBlockDataResponse, GetGenesisIdRequest, GetGenesisIdResponse, GetInitialTestnetAccountsRequest, RegisterAccountRequest, RegisterAccountResponse + GetAccountBalanceRequest, GetAccountBalanceResponse, GetBlockDataRequest, GetBlockDataResponse, + GetGenesisIdRequest, GetGenesisIdResponse, GetInitialTestnetAccountsRequest, + RegisterAccountRequest, RegisterAccountResponse, }; use common::transaction::Transaction; use common::{SequencerClientError, SequencerRpcError}; @@ -77,7 +79,9 @@ impl SequencerClient { let req = serde_json::to_value(block_req)?; - let resp = self.call_method_with_payload("get_account_balance", req).await?; + let resp = self + .call_method_with_payload("get_account_balance", req) + .await?; let resp_deser = serde_json::from_value(resp)?; diff --git a/sequencer_core/src/lib.rs b/sequencer_core/src/lib.rs index 5a6fd4d..3786a2b 100644 --- a/sequencer_core/src/lib.rs +++ b/sequencer_core/src/lib.rs @@ -478,9 +478,6 @@ mod tests { assert_eq!(sequencer.sequencer_config.max_num_tx_in_block, 10); assert_eq!(sequencer.sequencer_config.port, 8080); - println!("Initial_acc1 {:#?}", config.initial_accounts[0].addr.clone()); - println!("Initial_acc1 {:#?}", config.initial_accounts[1].addr.clone()); - let acc1_addr = hex::decode(config.initial_accounts[0].addr.clone()) .unwrap() .try_into() @@ -490,8 +487,6 @@ mod tests { .try_into() .unwrap(); - assert_eq!(2,3); - assert!(sequencer.store.acc_store.contains_account(&acc1_addr)); assert!(sequencer.store.acc_store.contains_account(&acc2_addr)); From 7a6a958179830734f1835ee1f8ee989bb5c465c9 Mon Sep 17 00:00:00 2001 From: Oleksandr Pravdyvyi Date: Thu, 31 Jul 2025 14:40:23 +0300 Subject: [PATCH 5/9] fix: integration tests added --- Cargo.lock | 1 + ci_scripts/test-ubuntu.sh | 4 +- integration_tests/Cargo.toml | 1 + integration_tests/src/lib.rs | 297 +++++++++++++++--- .../src/sequencer_store/accounts_store.rs | 6 +- 5 files changed, 266 insertions(+), 43 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index de96e5f..99b6f97 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2399,6 +2399,7 @@ dependencies = [ "sequencer_runner", "serde", "serde_json", + "tempfile", "tokio", "toml 0.7.8", ] diff --git a/ci_scripts/test-ubuntu.sh b/ci_scripts/test-ubuntu.sh index 745a332..47d79fa 100644 --- a/ci_scripts/test-ubuntu.sh +++ b/ci_scripts/test-ubuntu.sh @@ -4,4 +4,6 @@ curl -L https://risczero.com/install | bash /home/runner/.risc0/bin/rzup install source env.sh -cargo test --release \ No newline at end of file +cargo test --release +cd integration_tests +cargo run $(pwd)/configs/debug all \ No newline at end of file diff --git a/integration_tests/Cargo.toml b/integration_tests/Cargo.toml index 9558b9f..0e96490 100644 --- a/integration_tests/Cargo.toml +++ b/integration_tests/Cargo.toml @@ -15,6 +15,7 @@ actix-web.workspace = true tokio.workspace = true toml.workspace = true hex.workspace = true +tempfile.workspace = true [dependencies.clap] features = ["derive", "env"] diff --git a/integration_tests/src/lib.rs b/integration_tests/src/lib.rs index 375a523..d707be7 100644 --- a/integration_tests/src/lib.rs +++ b/integration_tests/src/lib.rs @@ -1,11 +1,13 @@ use std::{path::PathBuf, sync::Arc, time::Duration}; +use actix_web::dev::ServerHandle; use anyhow::Result; use clap::Parser; use common::rpc_primitives::RpcConfig; use log::info; -use node_core::NodeCore; -use sequencer_core::SequencerCore; +use node_core::{NodeCore, config::NodeConfig}; +use sequencer_core::{SequencerCore, config::SequencerConfig}; +use tempfile::TempDir; use tokio::{sync::Mutex, task::JoinHandle}; #[derive(Parser, Debug)] @@ -13,26 +15,38 @@ use tokio::{sync::Mutex, task::JoinHandle}; struct Args { /// Path to configs home_dir: PathBuf, + /// Test name + test_name: String, } pub const ACC_SENDER: &str = "0d96dfcc414019380c9dde0cd3dce5aac90fb5443bf871108741aeafde552ad7"; pub const ACC_RECEIVER: &str = "974870e9be8d0ac08aa83b3fc7a7a686291d8732508aba98b36080f39c2cf364"; -pub async fn main_tests_runner() -> Result<()> { - env_logger::init(); - - let args = Args::parse(); - let Args { home_dir } = args; +pub const TIME_TO_WAIT_FOR_BLOCK_SECONDS: u64 = 12; +#[allow(clippy::type_complexity)] +pub async fn pre_test( + home_dir: PathBuf, +) -> Result<( + ServerHandle, + JoinHandle>, + ServerHandle, + TempDir, + TempDir, + Arc>, +)> { let home_dir_sequencer = home_dir.join("sequencer"); let home_dir_node = home_dir.join("node"); - let sequencer_config = + let mut sequencer_config = sequencer_runner::config::from_file(home_dir_sequencer.join("sequencer_config.json")) .unwrap(); - let node_config = + let mut node_config = node_runner::config::from_file(home_dir_node.join("node_config.json")).unwrap(); + let (temp_dir_node, temp_dir_sequencer) = + replace_home_dir_with_temp_dir_in_configs(&mut node_config, &mut sequencer_config); + let block_timeout = sequencer_config.block_create_timeout_millis; let sequencer_port = sequencer_config.port; @@ -73,6 +87,7 @@ pub async fn main_tests_runner() -> Result<()> { let node_port = node_config.port; let node_core = NodeCore::start_from_config_update_chain(node_config.clone()).await?; + let wrapped_node_core = Arc::new(Mutex::new(node_core)); let http_server = node_rpc::new_http_server( @@ -84,42 +99,42 @@ pub async fn main_tests_runner() -> Result<()> { let node_http_server_handle = http_server.handle(); tokio::spawn(http_server); - info!("Waiting for first block creation"); - tokio::time::sleep(Duration::from_secs(12)).await; + Ok(( + seq_http_server_handle, + sequencer_loop_handle, + node_http_server_handle, + temp_dir_node, + temp_dir_sequencer, + wrapped_node_core, + )) +} - let acc_sender = hex::decode(ACC_SENDER).unwrap().try_into().unwrap(); - let acc_receiver = hex::decode(ACC_RECEIVER).unwrap().try_into().unwrap(); +pub fn replace_home_dir_with_temp_dir_in_configs( + node_config: &mut NodeConfig, + sequencer_config: &mut SequencerConfig, +) -> (TempDir, TempDir) { + let temp_dir_node = tempfile::tempdir().unwrap(); + let temp_dir_sequencer = tempfile::tempdir().unwrap(); - { - let guard = wrapped_node_core.lock().await; + node_config.home = temp_dir_node.path().to_path_buf(); + sequencer_config.home = temp_dir_sequencer.path().to_path_buf(); - let res = guard - .send_public_native_token_transfer(acc_sender, acc_receiver, 100) - .await - .unwrap(); + (temp_dir_node, temp_dir_sequencer) +} - info!("Res of tx_send is {res:#?}"); - - info!("Waiting for next block creation"); - tokio::time::sleep(Duration::from_secs(12)).await; - - info!("Checking correct balance move"); - let acc_1_balance = guard - .sequencer_client - .get_account_balance(ACC_SENDER.to_string()) - .await - .unwrap(); - let acc_2_balance = guard - .sequencer_client - .get_account_balance(ACC_RECEIVER.to_string()) - .await - .unwrap(); - - info!("Balance of sender : {acc_1_balance:#?}"); - info!("Balance of receiver : {acc_2_balance:#?}"); - } - - info!("Success!"); +#[allow(clippy::type_complexity)] +pub async fn post_test( + residual: ( + ServerHandle, + JoinHandle>, + ServerHandle, + TempDir, + TempDir, + Arc>, + ), +) { + let (seq_http_server_handle, sequencer_loop_handle, node_http_server_handle, _, _, _) = + residual; info!("Cleanup"); @@ -127,5 +142,205 @@ pub async fn main_tests_runner() -> Result<()> { sequencer_loop_handle.abort(); seq_http_server_handle.stop(true).await; + //At this point all of the references to node_core and sequencer_core must be lost. + //So they are dropped and tempdirs will be dropped too, +} + +pub async fn test_success(wrapped_node_core: Arc>) { + let acc_sender = hex::decode(ACC_SENDER).unwrap().try_into().unwrap(); + let acc_receiver = hex::decode(ACC_RECEIVER).unwrap().try_into().unwrap(); + + let guard = wrapped_node_core.lock().await; + + let _res = guard + .send_public_native_token_transfer(acc_sender, acc_receiver, 100) + .await + .unwrap(); + + info!("Waiting for next block creation"); + tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await; + + info!("Checking correct balance move"); + let acc_1_balance = guard + .sequencer_client + .get_account_balance(ACC_SENDER.to_string()) + .await + .unwrap(); + let acc_2_balance = guard + .sequencer_client + .get_account_balance(ACC_RECEIVER.to_string()) + .await + .unwrap(); + + info!("Balance of sender : {acc_1_balance:#?}"); + info!("Balance of receiver : {acc_2_balance:#?}"); + + assert_eq!(acc_1_balance.balance, 9900); + assert_eq!(acc_2_balance.balance, 20100); + + info!("Success!"); +} + +pub async fn test_success_move_to_another_account(wrapped_node_core: Arc>) { + let acc_sender = hex::decode(ACC_SENDER).unwrap().try_into().unwrap(); + let acc_receiver_new_acc = [42; 32]; + + let hex_acc_reveiver_new_acc = hex::encode(acc_receiver_new_acc); + + let guard = wrapped_node_core.lock().await; + + let _res = guard + .send_public_native_token_transfer(acc_sender, acc_receiver_new_acc, 100) + .await + .unwrap(); + + info!("Waiting for next block creation"); + tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await; + + info!("Checking correct balance move"); + let acc_1_balance = guard + .sequencer_client + .get_account_balance(ACC_SENDER.to_string()) + .await + .unwrap(); + let acc_2_balance = guard + .sequencer_client + .get_account_balance(hex_acc_reveiver_new_acc) + .await + .unwrap(); + + info!("Balance of sender : {acc_1_balance:#?}"); + info!("Balance of receiver : {acc_2_balance:#?}"); + + assert_eq!(acc_1_balance.balance, 9900); + assert_eq!(acc_2_balance.balance, 100); + + info!("Success!"); +} + +pub async fn test_failure(wrapped_node_core: Arc>) { + let acc_sender = hex::decode(ACC_SENDER).unwrap().try_into().unwrap(); + let acc_receiver = hex::decode(ACC_RECEIVER).unwrap().try_into().unwrap(); + + let guard = wrapped_node_core.lock().await; + + let _res = guard + .send_public_native_token_transfer(acc_sender, acc_receiver, 100000) + .await + .unwrap(); + + info!("Waiting for next block creation"); + tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await; + + info!("Checking correct balance move"); + let acc_1_balance = guard + .sequencer_client + .get_account_balance(ACC_SENDER.to_string()) + .await + .unwrap(); + let acc_2_balance = guard + .sequencer_client + .get_account_balance(ACC_RECEIVER.to_string()) + .await + .unwrap(); + + info!("Balance of sender : {acc_1_balance:#?}"); + info!("Balance of receiver : {acc_2_balance:#?}"); + + assert_eq!(acc_1_balance.balance, 10000); + assert_eq!(acc_2_balance.balance, 20000); + + info!("Success!"); +} + +pub async fn main_tests_runner() -> Result<()> { + env_logger::init(); + + let args = Args::parse(); + let Args { + home_dir, + test_name, + } = args; + + match test_name.as_str() { + "test_success_move_to_another_account" => { + let res = pre_test(home_dir).await.unwrap(); + + let wrapped_node_core = res.5.clone(); + + info!("Waiting for first block creation"); + tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await; + + test_success_move_to_another_account(wrapped_node_core.clone()).await; + + post_test(res).await; + } + "test_success" => { + let res = pre_test(home_dir).await.unwrap(); + + let wrapped_node_core = res.5.clone(); + + info!("Waiting for first block creation"); + tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await; + + test_success(wrapped_node_core.clone()).await; + + post_test(res).await; + } + "test_failure" => { + let res = pre_test(home_dir).await.unwrap(); + + let wrapped_node_core = res.5.clone(); + + info!("Waiting for first block creation"); + tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await; + + test_failure(wrapped_node_core.clone()).await; + + post_test(res).await; + } + "all" => { + { + let res = pre_test(home_dir.clone()).await.unwrap(); + + let wrapped_node_core = res.5.clone(); + + info!("Waiting for first block creation"); + tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await; + + test_success_move_to_another_account(wrapped_node_core.clone()).await; + + post_test(res).await; + } + { + let res = pre_test(home_dir.clone()).await.unwrap(); + + let wrapped_node_core = res.5.clone(); + + info!("Waiting for first block creation"); + tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await; + + test_success(wrapped_node_core.clone()).await; + + post_test(res).await; + } + { + let res = pre_test(home_dir.clone()).await.unwrap(); + + let wrapped_node_core = res.5.clone(); + + info!("Waiting for first block creation"); + tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await; + + test_failure(wrapped_node_core.clone()).await; + + post_test(res).await; + } + } + _ => { + anyhow::bail!("Unknown test name"); + } + } + Ok(()) } diff --git a/sequencer_core/src/sequencer_store/accounts_store.rs b/sequencer_core/src/sequencer_store/accounts_store.rs index 8dd2070..9d5b785 100644 --- a/sequencer_core/src/sequencer_store/accounts_store.rs +++ b/sequencer_core/src/sequencer_store/accounts_store.rs @@ -81,6 +81,10 @@ impl SequencerAccountsStore { } else { self.register_account(*account_addr); + let acc = self.accounts.get_mut(account_addr).unwrap(); + + acc.balance = new_balance; + 0 } } @@ -254,6 +258,6 @@ mod tests { assert_eq!(ret, 0); assert!(seq_acc_store.contains_account(&[1; 32])); - assert_eq!(seq_acc_store.get_account_balance(&[1; 32]), 0); + assert_eq!(seq_acc_store.get_account_balance(&[1; 32]), 100); } } From f5d9990cc8441c8e9e32feb6c3a0ca4c8e8c707e Mon Sep 17 00:00:00 2001 From: Oleksandr Pravdyvyi Date: Thu, 31 Jul 2025 15:41:36 +0300 Subject: [PATCH 6/9] fix: macro for test functions --- .github/workflows/ci.yml | 2 +- integration_tests/src/lib.rs | 87 +++++++++--------------------------- 2 files changed, 22 insertions(+), 67 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7f923d..f3b7c8a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ name: General jobs: ubuntu-latest-pipeline: runs-on: ubuntu-latest - timeout-minutes: 60 + timeout-minutes: 120 name: ubuntu-latest-pipeline steps: diff --git a/integration_tests/src/lib.rs b/integration_tests/src/lib.rs index d707be7..b01fdbd 100644 --- a/integration_tests/src/lib.rs +++ b/integration_tests/src/lib.rs @@ -253,6 +253,21 @@ pub async fn test_failure(wrapped_node_core: Arc>) { info!("Success!"); } +macro_rules! test_cleanup_wrap { + ($home_dir:ident, $test_func:ident) => {{ + let res = pre_test($home_dir.clone()).await.unwrap(); + + let wrapped_node_core = res.5.clone(); + + info!("Waiting for first block creation"); + tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await; + + $test_func(wrapped_node_core.clone()).await; + + post_test(res).await; + }}; +} + pub async fn main_tests_runner() -> Result<()> { env_logger::init(); @@ -264,78 +279,18 @@ pub async fn main_tests_runner() -> Result<()> { match test_name.as_str() { "test_success_move_to_another_account" => { - let res = pre_test(home_dir).await.unwrap(); - - let wrapped_node_core = res.5.clone(); - - info!("Waiting for first block creation"); - tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await; - - test_success_move_to_another_account(wrapped_node_core.clone()).await; - - post_test(res).await; + test_cleanup_wrap!(home_dir, test_success_move_to_another_account); } "test_success" => { - let res = pre_test(home_dir).await.unwrap(); - - let wrapped_node_core = res.5.clone(); - - info!("Waiting for first block creation"); - tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await; - - test_success(wrapped_node_core.clone()).await; - - post_test(res).await; + test_cleanup_wrap!(home_dir, test_success); } "test_failure" => { - let res = pre_test(home_dir).await.unwrap(); - - let wrapped_node_core = res.5.clone(); - - info!("Waiting for first block creation"); - tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await; - - test_failure(wrapped_node_core.clone()).await; - - post_test(res).await; + test_cleanup_wrap!(home_dir, test_failure); } "all" => { - { - let res = pre_test(home_dir.clone()).await.unwrap(); - - let wrapped_node_core = res.5.clone(); - - info!("Waiting for first block creation"); - tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await; - - test_success_move_to_another_account(wrapped_node_core.clone()).await; - - post_test(res).await; - } - { - let res = pre_test(home_dir.clone()).await.unwrap(); - - let wrapped_node_core = res.5.clone(); - - info!("Waiting for first block creation"); - tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await; - - test_success(wrapped_node_core.clone()).await; - - post_test(res).await; - } - { - let res = pre_test(home_dir.clone()).await.unwrap(); - - let wrapped_node_core = res.5.clone(); - - info!("Waiting for first block creation"); - tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await; - - test_failure(wrapped_node_core.clone()).await; - - post_test(res).await; - } + test_cleanup_wrap!(home_dir, test_success_move_to_another_account); + test_cleanup_wrap!(home_dir, test_success); + test_cleanup_wrap!(home_dir, test_failure); } _ => { anyhow::bail!("Unknown test name"); From 5d42e53b1807892772439a6303b2274a32afcab9 Mon Sep 17 00:00:00 2001 From: Oleksandr Pravdyvyi Date: Fri, 1 Aug 2025 18:32:30 +0300 Subject: [PATCH 7/9] fix: comments fix --- integration_tests/src/lib.rs | 45 +++---------------- sequencer_runner/src/lib.rs | 83 +++++++++++++++++++++--------------- 2 files changed, 54 insertions(+), 74 deletions(-) diff --git a/integration_tests/src/lib.rs b/integration_tests/src/lib.rs index b01fdbd..2ddfb9c 100644 --- a/integration_tests/src/lib.rs +++ b/integration_tests/src/lib.rs @@ -6,7 +6,8 @@ use clap::Parser; use common::rpc_primitives::RpcConfig; use log::info; use node_core::{NodeCore, config::NodeConfig}; -use sequencer_core::{SequencerCore, config::SequencerConfig}; +use sequencer_core::config::SequencerConfig; +use sequencer_runner::startup_sequencer; use tempfile::TempDir; use tokio::{sync::Mutex, task::JoinHandle}; @@ -47,42 +48,8 @@ pub async fn pre_test( let (temp_dir_node, temp_dir_sequencer) = replace_home_dir_with_temp_dir_in_configs(&mut node_config, &mut sequencer_config); - let block_timeout = sequencer_config.block_create_timeout_millis; - let sequencer_port = sequencer_config.port; - - let sequencer_core = SequencerCore::start_from_config(sequencer_config); - - info!("Sequencer core set up"); - - let seq_core_wrapped = Arc::new(Mutex::new(sequencer_core)); - - let http_server = sequencer_rpc::new_http_server( - RpcConfig::with_port(sequencer_port), - seq_core_wrapped.clone(), - )?; - info!("HTTP server started"); - let seq_http_server_handle = http_server.handle(); - tokio::spawn(http_server); - - info!("Starting main sequencer loop"); - - let sequencer_loop_handle: JoinHandle> = tokio::spawn(async move { - loop { - tokio::time::sleep(std::time::Duration::from_millis(block_timeout)).await; - - info!("Collecting transactions from mempool, block creation"); - - let id = { - let mut state = seq_core_wrapped.lock().await; - - state.produce_new_block_with_mempool_transactions()? - }; - - info!("Block with id {id} created"); - - info!("Waiting for new transactions"); - } - }); + let (seq_http_server_handle, sequencer_loop_handle) = + startup_sequencer(sequencer_config).await?; let node_port = node_config.port; @@ -185,7 +152,7 @@ pub async fn test_success_move_to_another_account(wrapped_node_core: Arc Result<(ServerHandle, JoinHandle>)> { + let block_timeout = app_config.block_create_timeout_millis; + let port = app_config.port; + + let sequencer_core = SequencerCore::start_from_config(app_config); + + info!("Sequencer core set up"); + + let seq_core_wrapped = Arc::new(Mutex::new(sequencer_core)); + + let http_server = new_http_server(RpcConfig::with_port(port), seq_core_wrapped.clone())?; + info!("HTTP server started"); + let http_server_handle = http_server.handle(); + tokio::spawn(http_server); + + info!("Starting main sequencer loop"); + + let main_loop_handle = tokio::spawn(async move { + loop { + tokio::time::sleep(std::time::Duration::from_millis(block_timeout)).await; + + info!("Collecting transactions from mempool, block creation"); + + let id = { + let mut state = seq_core_wrapped.lock().await; + + state.produce_new_block_with_mempool_transactions()? + }; + + info!("Block with id {id} created"); + + info!("Waiting for new transactions"); + } + }); + + Ok((http_server_handle, main_loop_handle)) +} + pub async fn main_runner() -> Result<()> { + env_logger::init(); + let args = Args::parse(); let Args { home_dir } = args; let app_config = config::from_file(home_dir.join("sequencer_config.json"))?; - let block_timeout = app_config.block_create_timeout_millis; - let port = app_config.port; - if let Some(ref rust_log) = app_config.override_rust_log { info!("RUST_LOG env var set to {rust_log:?}"); std::env::set_var(RUST_LOG, rust_log); } - env_logger::init(); + //ToDo: Add restart on failures + let (_, _) = startup_sequencer(app_config).await?; - let sequencer_core = SequencerCore::start_from_config(app_config); - - info!("Sequncer core set up"); - - let seq_core_wrapped = Arc::new(Mutex::new(sequencer_core)); - - let http_server = new_http_server(RpcConfig::with_port(port), seq_core_wrapped.clone())?; - info!("HTTP server started"); - let _http_server_handle = http_server.handle(); - tokio::spawn(http_server); - - info!("Starting main sequencer loop"); - - #[allow(clippy::empty_loop)] - loop { - tokio::time::sleep(std::time::Duration::from_millis(block_timeout)).await; - - info!("Collecting transactions from mempool, block creation"); - - let id = { - let mut state = seq_core_wrapped.lock().await; - - state.produce_new_block_with_mempool_transactions()? - }; - - info!("Block with id {id} created"); - - info!("Waiting for new transactions"); - } + Ok(()) } From c17160602c7a3079dfbc8d4260cbc854c2b1aade Mon Sep 17 00:00:00 2001 From: Oleksandr Pravdyvyi Date: Mon, 4 Aug 2025 10:40:08 +0300 Subject: [PATCH 8/9] fix: ci try retry --- Cargo.lock | 466 +++++++++++++++++++++++++++++------------------------ 1 file changed, 251 insertions(+), 215 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 99b6f97..5d64132 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -108,7 +108,7 @@ dependencies = [ "mime", "percent-encoding", "pin-project-lite", - "rand 0.9.1", + "rand 0.9.2", "sha1", "smallvec", "tokio", @@ -123,7 +123,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -237,7 +237,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -248,7 +248,7 @@ checksum = "b6ac1e58cded18cb28ddc17143c4dea5345b3ad575e14f32f66e4054a56eb271" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -288,9 +288,9 @@ dependencies = [ [[package]] name = "adler2" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aead" @@ -434,7 +434,7 @@ checksum = "e7e89fe77d1f0f4fe5b96dfc940923d88d17b6a773808124f21e764dfb063c6a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -450,7 +450,7 @@ dependencies = [ "ark-std", "educe", "fnv", - "hashbrown 0.15.3", + "hashbrown 0.15.4", "itertools 0.13.0", "num-bigint 0.4.6", "num-integer", @@ -485,7 +485,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" dependencies = [ "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -498,7 +498,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -528,7 +528,7 @@ dependencies = [ "ark-std", "educe", "fnv", - "hashbrown 0.15.3", + "hashbrown 0.15.4", ] [[package]] @@ -581,7 +581,7 @@ checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -646,9 +646,9 @@ checksum = "7460f7dd8e100147b82a63afca1a20eb6c231ee36b90ba7272e14951cb58af59" [[package]] name = "autocfg" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "backtrace" @@ -685,9 +685,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" -version = "1.7.3" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" +checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" [[package]] name = "bincode" @@ -716,7 +716,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -782,11 +782,11 @@ dependencies = [ [[package]] name = "bonsai-sdk" version = "1.4.0" -source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#c6297fc2075cb66aadb733ee677223b5a7f8c85a" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#03853380e36e1a093bf06d306601f7358151e2ed" dependencies = [ "duplicate", "maybe-async", - "reqwest 0.12.18", + "reqwest 0.12.22", "serde", "thiserror 1.0.69", ] @@ -811,20 +811,20 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "bumpalo" -version = "3.17.0" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "bytemuck" -version = "1.23.0" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9134a6ef01ce4b366b50689c94f82c14bc72bc5d0386829828a2e2752ef7958c" +checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" dependencies = [ "bytemuck_derive", ] @@ -837,7 +837,7 @@ checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -876,9 +876,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.9" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" +checksum = "0da45bc31171d8d6960122e222a67740df867c1dd53b4d51caa297084c185cab" dependencies = [ "serde", ] @@ -908,9 +908,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.24" +version = "1.2.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16595d3be041c03b09d08d0858631facccee9221e579704070e6e9e4915d3bc7" +checksum = "c3a42d84bb6b69d3a8b3eaacf0d88f179e1929695e1ad012b6cf64d9caaa5fd2" dependencies = [ "jobserver", "libc", @@ -928,9 +928,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" [[package]] name = "cfg_aliases" @@ -1000,9 +1000,12 @@ dependencies = [ [[package]] name = "cobs" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" +checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" +dependencies = [ + "thiserror 2.0.12", +] [[package]] name = "common" @@ -1095,9 +1098,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ "cfg-if", ] @@ -1247,7 +1250,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1258,7 +1261,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1300,7 +1303,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1321,7 +1324,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1331,7 +1334,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1344,7 +1347,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1364,7 +1367,7 @@ checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "unicode-xid", ] @@ -1418,7 +1421,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1442,7 +1445,7 @@ dependencies = [ "digest", "futures", "rand 0.8.5", - "reqwest 0.12.18", + "reqwest 0.12.22", "thiserror 1.0.69", "tokio", ] @@ -1481,7 +1484,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1555,7 +1558,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1575,7 +1578,7 @@ checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1609,12 +1612,12 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -1668,9 +1671,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" +checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" dependencies = [ "crc32fast", "miniz_oxide", @@ -1715,7 +1718,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1801,7 +1804,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1854,7 +1857,7 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "wasm-bindgen", ] @@ -1926,9 +1929,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" dependencies = [ "bytes", "fnv", @@ -1936,7 +1939,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.9.0", + "indexmap 2.10.0", "slab", "tokio", "tokio-util", @@ -1972,9 +1975,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.3" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" dependencies = [ "allocator-api2", ] @@ -2025,9 +2028,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f154ce46856750ed433c8649605bf7ed2de3bc35fd9d2a9f30cddd873c80cb08" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "hex" @@ -2178,9 +2181,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.6" +version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a01595e11bdcec50946522c32dde3fc6914743000a68b93000965f2f02406d" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ "http 1.3.1", "hyper 1.6.0", @@ -2208,9 +2211,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.13" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c293b6b3d21eca78250dc7dbebd6b9210ec5530e038cbfe0661b5c47ab06e8" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" dependencies = [ "base64 0.22.1", "bytes", @@ -2224,7 +2227,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.5.10", + "socket2 0.6.0", "tokio", "tower-service", "tracing", @@ -2361,12 +2364,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", - "hashbrown 0.15.3", + "hashbrown 0.15.4", ] [[package]] @@ -2413,6 +2416,17 @@ dependencies = [ "rustversion", ] +[[package]] +name = "io-uring" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +dependencies = [ + "bitflags 2.9.1", + "cfg-if", + "libc", +] + [[package]] name = "ipnet" version = "2.11.0" @@ -2435,7 +2449,7 @@ version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ - "hermit-abi 0.5.1", + "hermit-abi 0.5.2", "libc", "windows-sys 0.59.0", ] @@ -2552,7 +2566,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -2572,9 +2586,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.172" +version = "0.2.174" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" +checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" [[package]] name = "libloading" @@ -2583,7 +2597,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.53.0", + "windows-targets 0.53.3", ] [[package]] @@ -2594,9 +2608,9 @@ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "libredox" -version = "0.1.3" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" dependencies = [ "bitflags 2.9.1", "libc", @@ -2676,9 +2690,9 @@ checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" [[package]] name = "lock_api" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" dependencies = [ "autocfg", "scopeguard", @@ -2801,20 +2815,20 @@ checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "memmap2" -version = "0.9.5" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" +checksum = "483758ad303d734cec05e5c12b41d7e93e6a6390c5e9dae6bdeb7c1259012d28" dependencies = [ "libc", ] @@ -2871,9 +2885,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", ] @@ -2892,7 +2906,7 @@ checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "windows-sys 0.59.0", ] @@ -3082,7 +3096,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3177,7 +3191,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3212,9 +3226,9 @@ checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" [[package]] name = "parking_lot" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" dependencies = [ "lock_api", "parking_lot_core", @@ -3222,9 +3236,9 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ "cfg-if", "libc", @@ -3302,9 +3316,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" [[package]] name = "portable-atomic-util" @@ -3317,9 +3331,9 @@ dependencies = [ [[package]] name = "postcard" -version = "1.1.1" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "170a2601f67cc9dba8edd8c4870b15f71a6a2dc196daec8c83f72b59dff628a8" +checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24" dependencies = [ "cobs", "embedded-io 0.4.0", @@ -3354,12 +3368,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.32" +version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "664ec5419c51e34154eec046ebcba56312d5a2fc3b09a06da188e1ad21afadf6" +checksum = "ff24dfcda44452b9816fff4cd4227e1bb73ff5a2f1bc1105aa92fb8565ce44d2" dependencies = [ "proc-macro2", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3368,7 +3382,7 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" dependencies = [ - "toml_edit 0.22.26", + "toml_edit 0.22.27", ] [[package]] @@ -3424,7 +3438,7 @@ dependencies = [ "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3470,7 +3484,7 @@ dependencies = [ "bytes", "getrandom 0.3.3", "lru-slab", - "rand 0.9.1", + "rand 0.9.2", "ring", "rustc-hash 2.1.1", "rustls", @@ -3484,9 +3498,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4e529991f949c5e25755532370b8af5d114acae52326361d68d47af64aa842" +checksum = "fcebb1209ee276352ef14ff8732e24cc2b02bbac986cd74a4c81bcb2f9881970" dependencies = [ "cfg_aliases", "libc", @@ -3507,9 +3521,9 @@ dependencies = [ [[package]] name = "r-efi" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "radium" @@ -3530,9 +3544,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", @@ -3604,9 +3618,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.12" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ "bitflags 2.9.1", ] @@ -3699,9 +3713,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.18" +version = "0.12.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98ff6b0dbbe4d5a37318f433d4fc82babd21631f194d370409ceb2e40b2f0b5" +checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531" dependencies = [ "base64 0.22.1", "bytes", @@ -3714,11 +3728,8 @@ dependencies = [ "hyper 1.6.0", "hyper-rustls", "hyper-util", - "ipnet", "js-sys", "log", - "mime", - "once_cell", "percent-encoding", "pin-project-lite", "quinn", @@ -3775,7 +3786,7 @@ checksum = "3df6368f71f205ff9c33c076d170dd56ebf68e8161c733c0caa07a7a5509ed53" [[package]] name = "risc0-binfmt" version = "2.0.2" -source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#c6297fc2075cb66aadb733ee677223b5a7f8c85a" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#03853380e36e1a093bf06d306601f7358151e2ed" dependencies = [ "anyhow", "borsh", @@ -3792,8 +3803,8 @@ dependencies = [ [[package]] name = "risc0-build" -version = "2.3.0" -source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#c6297fc2075cb66aadb733ee677223b5a7f8c85a" +version = "2.3.1" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#03853380e36e1a093bf06d306601f7358151e2ed" dependencies = [ "anyhow", "cargo_metadata", @@ -3816,7 +3827,7 @@ dependencies = [ [[package]] name = "risc0-build-kernel" version = "2.0.0" -source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#c6297fc2075cb66aadb733ee677223b5a7f8c85a" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#03853380e36e1a093bf06d306601f7358151e2ed" dependencies = [ "cc", "directories", @@ -3830,7 +3841,7 @@ dependencies = [ [[package]] name = "risc0-circuit-keccak" version = "3.0.0" -source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#c6297fc2075cb66aadb733ee677223b5a7f8c85a" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#03853380e36e1a093bf06d306601f7358151e2ed" dependencies = [ "anyhow", "bytemuck", @@ -3851,7 +3862,7 @@ dependencies = [ [[package]] name = "risc0-circuit-keccak-sys" version = "3.0.0" -source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#c6297fc2075cb66aadb733ee677223b5a7f8c85a" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#03853380e36e1a093bf06d306601f7358151e2ed" dependencies = [ "cc", "cust", @@ -3866,7 +3877,7 @@ dependencies = [ [[package]] name = "risc0-circuit-recursion" version = "3.0.0" -source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#c6297fc2075cb66aadb733ee677223b5a7f8c85a" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#03853380e36e1a093bf06d306601f7358151e2ed" dependencies = [ "anyhow", "bytemuck", @@ -3891,7 +3902,7 @@ dependencies = [ [[package]] name = "risc0-circuit-recursion-sys" version = "3.0.0" -source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#c6297fc2075cb66aadb733ee677223b5a7f8c85a" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#03853380e36e1a093bf06d306601f7358151e2ed" dependencies = [ "glob", "risc0-build-kernel", @@ -3903,7 +3914,7 @@ dependencies = [ [[package]] name = "risc0-circuit-rv32im" version = "3.0.0" -source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#c6297fc2075cb66aadb733ee677223b5a7f8c85a" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#03853380e36e1a093bf06d306601f7358151e2ed" dependencies = [ "anyhow", "auto_ops", @@ -3934,7 +3945,7 @@ dependencies = [ [[package]] name = "risc0-circuit-rv32im-sys" version = "3.0.0" -source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#c6297fc2075cb66aadb733ee677223b5a7f8c85a" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#03853380e36e1a093bf06d306601f7358151e2ed" dependencies = [ "cc", "cust", @@ -3949,7 +3960,7 @@ dependencies = [ [[package]] name = "risc0-core" version = "2.0.0" -source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#c6297fc2075cb66aadb733ee677223b5a7f8c85a" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#03853380e36e1a093bf06d306601f7358151e2ed" dependencies = [ "bytemuck", "bytemuck_derive", @@ -3961,7 +3972,7 @@ dependencies = [ [[package]] name = "risc0-groth16" version = "2.0.2" -source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#c6297fc2075cb66aadb733ee677223b5a7f8c85a" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#03853380e36e1a093bf06d306601f7358151e2ed" dependencies = [ "anyhow", "ark-bn254", @@ -3985,7 +3996,7 @@ dependencies = [ [[package]] name = "risc0-sys" version = "1.4.0" -source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#c6297fc2075cb66aadb733ee677223b5a7f8c85a" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#03853380e36e1a093bf06d306601f7358151e2ed" dependencies = [ "anyhow", "cust", @@ -3996,7 +4007,7 @@ dependencies = [ [[package]] name = "risc0-zkos-v1compat" version = "2.0.1" -source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#c6297fc2075cb66aadb733ee677223b5a7f8c85a" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#03853380e36e1a093bf06d306601f7358151e2ed" dependencies = [ "include_bytes_aligned", "no_std_strings", @@ -4005,7 +4016,7 @@ dependencies = [ [[package]] name = "risc0-zkp" version = "2.0.2" -source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#c6297fc2075cb66aadb733ee677223b5a7f8c85a" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#03853380e36e1a093bf06d306601f7358151e2ed" dependencies = [ "anyhow", "blake2", @@ -4035,8 +4046,8 @@ dependencies = [ [[package]] name = "risc0-zkvm" -version = "2.3.0" -source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#c6297fc2075cb66aadb733ee677223b5a7f8c85a" +version = "2.3.1" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#03853380e36e1a093bf06d306601f7358151e2ed" dependencies = [ "addr2line 0.22.0", "anyhow", @@ -4082,7 +4093,7 @@ dependencies = [ [[package]] name = "risc0-zkvm-platform" version = "2.0.3" -source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#c6297fc2075cb66aadb733ee677223b5a7f8c85a" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#03853380e36e1a093bf06d306601f7358151e2ed" dependencies = [ "bytemuck", "cfg-if", @@ -4123,9 +4134,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hash" @@ -4163,22 +4174,22 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ "bitflags 2.9.1", "errno", "libc", "linux-raw-sys 0.9.4", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "rustls" -version = "0.23.27" +version = "0.23.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "730944ca083c1c233a75c09f199e973ca499344a2b7ba9e755c457e86fb4a321" +checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" dependencies = [ "once_cell", "ring", @@ -4209,9 +4220,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.3" +version = "0.103.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" +checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" dependencies = [ "ring", "rustls-pki-types", @@ -4244,14 +4255,14 @@ checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "rzup" version = "0.4.1" -source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#c6297fc2075cb66aadb733ee677223b5a7f8c85a" +source = "git+https://github.com/risc0/risc0.git?branch=release-2.3#03853380e36e1a093bf06d306601f7358151e2ed" dependencies = [ "semver", "serde", "strum", "tempfile", "thiserror 2.0.12", - "toml 0.8.22", + "toml 0.8.23", "yaml-rust2", ] @@ -4472,14 +4483,14 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" dependencies = [ "itoa", "memchr", @@ -4489,9 +4500,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" dependencies = [ "serde", ] @@ -4548,9 +4559,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.5" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" dependencies = [ "libc", ] @@ -4573,18 +4584,15 @@ checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "slab" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" [[package]] name = "smallvec" -version = "1.15.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" @@ -4606,6 +4614,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "spin" version = "0.9.8" @@ -4627,9 +4645,9 @@ dependencies = [ [[package]] name = "sppark" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16bf457036c0a778140ce4c3bcf9ff30c5c70a9d9c0bb04fe513af025b647b2c" +checksum = "6bdc4f02f557e3037bbe2a379cac8be6e014a67beb7bf0996b536979392f6361" dependencies = [ "cc", "which", @@ -4642,7 +4660,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d904e7009df136af5297832a3ace3370cd14ff1546a232f4f185036c2736fcac" dependencies = [ "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4704,7 +4722,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4726,9 +4744,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.101" +version = "2.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" dependencies = [ "proc-macro2", "quote", @@ -4758,7 +4776,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4797,7 +4815,7 @@ dependencies = [ "fastrand", "getrandom 0.3.3", "once_cell", - "rustix 1.0.7", + "rustix 1.0.8", "windows-sys 0.59.0", ] @@ -4849,7 +4867,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4860,7 +4878,7 @@ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4930,19 +4948,21 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.45.1" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "bytes", + "io-uring", "libc", "mio", "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.10", - "windows-sys 0.52.0", + "slab", + "socket2 0.6.0", + "windows-sys 0.59.0", ] [[package]] @@ -4967,9 +4987,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.15" +version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ "bytes", "futures-core", @@ -4992,21 +5012,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.26", + "toml_edit 0.22.27", ] [[package]] name = "toml_datetime" -version = "0.6.9" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" dependencies = [ "serde", ] @@ -5017,7 +5037,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.9.0", + "indexmap 2.10.0", "serde", "serde_spanned", "toml_datetime", @@ -5026,23 +5046,23 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.26" +version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ - "indexmap 2.9.0", + "indexmap 2.10.0", "serde", "serde_spanned", "toml_datetime", "toml_write", - "winnow 0.7.10", + "winnow 0.7.12", ] [[package]] name = "toml_write" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb942dfe1d8e29a7ee7fcbde5bd2b9a25fb89aa70caea2eba3bee836ff41076" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" [[package]] name = "tower" @@ -5061,9 +5081,9 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.4" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdb0c213ca27a9f57ab69ddb290fd80d970922355b83ae380b395d3986b8a2e" +checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ "bitflags 2.9.1", "bytes", @@ -5103,20 +5123,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.28" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "tracing-core" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ "once_cell", "valuable", @@ -5180,7 +5200,7 @@ checksum = "35f5380909ffc31b4de4f4bdf96b877175a016aa2ca98cee39fcfd8c4d53d952" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5295,9 +5315,9 @@ dependencies = [ [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" @@ -5330,7 +5350,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "wasm-bindgen-shared", ] @@ -5365,7 +5385,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5414,9 +5434,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2853738d1cc4f2da3a225c18ec6c3721abb31961096e9dbf5ab35fa88b19cfdb" +checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2" dependencies = [ "rustls-pki-types", ] @@ -5464,6 +5484,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + [[package]] name = "windows-sys" version = "0.48.0" @@ -5491,6 +5517,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.3", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -5524,10 +5559,11 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.0" +version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ + "windows-link", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", @@ -5687,9 +5723,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.10" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec" +checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" dependencies = [ "memchr", ] @@ -5768,28 +5804,28 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.25" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" +checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.25" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" +checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5809,7 +5845,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "synstructure", ] @@ -5830,7 +5866,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5863,7 +5899,7 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5877,7 +5913,7 @@ dependencies = [ "crossbeam-utils", "displaydoc", "flate2", - "indexmap 2.9.0", + "indexmap 2.10.0", "memchr", "thiserror 2.0.12", "zopfli", From 2657e64df8916d636874cdbab883dadbe8961323 Mon Sep 17 00:00:00 2001 From: Oleksandr Pravdyvyi Date: Mon, 4 Aug 2025 13:46:41 +0300 Subject: [PATCH 9/9] fix: ci fix --- integration_tests/src/lib.rs | 6 +++--- node_core/src/lib.rs | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/integration_tests/src/lib.rs b/integration_tests/src/lib.rs index 2ddfb9c..a2c10c5 100644 --- a/integration_tests/src/lib.rs +++ b/integration_tests/src/lib.rs @@ -120,7 +120,7 @@ pub async fn test_success(wrapped_node_core: Arc>) { let guard = wrapped_node_core.lock().await; let _res = guard - .send_public_native_token_transfer(acc_sender, acc_receiver, 100) + .send_public_native_token_transfer(acc_sender, 0, acc_receiver, 100) .await .unwrap(); @@ -157,7 +157,7 @@ pub async fn test_success_move_to_another_account(wrapped_node_core: Arc>) { let guard = wrapped_node_core.lock().await; let _res = guard - .send_public_native_token_transfer(acc_sender, acc_receiver, 100000) + .send_public_native_token_transfer(acc_sender, 0, acc_receiver, 100000) .await .unwrap(); diff --git a/node_core/src/lib.rs b/node_core/src/lib.rs index 190869c..f613dbb 100644 --- a/node_core/src/lib.rs +++ b/node_core/src/lib.rs @@ -947,8 +947,6 @@ impl NodeCore { // Ok(self.sequencer_client.send_tx(tx, tx_roots).await?) // } - // ToDo: Currently untested due to need for end-to-end integration tests. - // Add integration tests to cover this functionality pub async fn send_public_native_token_transfer( &self, from: AccountAddress,