From 3977a90682549e3479cf3c233ca883b9feb29540 Mon Sep 17 00:00:00 2001 From: Andrus Salumets Date: Tue, 27 Jan 2026 13:12:45 +0100 Subject: [PATCH 01/11] Add node config overrides (#14) --- examples/tests/dynamic_join.rs | 1 + examples/tests/manual_cluster.rs | 2 + examples/tests/node_config_override.rs | 113 ++++++++++++++++++ testing-framework/core/src/nodes/node.rs | 19 +++ .../core/src/scenario/capabilities.rs | 19 ++- .../core/src/scenario/definition.rs | 36 ++++-- testing-framework/core/src/topology/config.rs | 42 ++++++- .../core/src/topology/deployment.rs | 51 ++++---- .../core/src/topology/generation.rs | 10 +- .../local/src/node_control/config.rs | 8 +- .../deployers/local/src/node_control/mod.rs | 38 +++++- 11 files changed, 288 insertions(+), 51 deletions(-) create mode 100644 examples/tests/node_config_override.rs diff --git a/examples/tests/dynamic_join.rs b/examples/tests/dynamic_join.rs index d892b5a..6c9f316 100644 --- a/examples/tests/dynamic_join.rs +++ b/examples/tests/dynamic_join.rs @@ -85,6 +85,7 @@ impl Workload for JoinNodeWithPeersWorkload { let options = StartNodeOptions { peers: PeerSelection::Named(self.peers.clone()), + config_patch: None, }; let node = handle.start_node_with(&self.name, options).await?; let client = node.api; diff --git a/examples/tests/manual_cluster.rs b/examples/tests/manual_cluster.rs index 4af827e..805238c 100644 --- a/examples/tests/manual_cluster.rs +++ b/examples/tests/manual_cluster.rs @@ -32,6 +32,7 @@ async fn manual_cluster_two_clusters_merge() -> Result<()> { "a", StartNodeOptions { peers: PeerSelection::None, + config_patch: None, }, ) .await? @@ -46,6 +47,7 @@ async fn manual_cluster_two_clusters_merge() -> Result<()> { "c", StartNodeOptions { peers: PeerSelection::Named(vec!["node-a".to_owned()]), + config_patch: None, }, ) .await? diff --git a/examples/tests/node_config_override.rs b/examples/tests/node_config_override.rs new file mode 100644 index 0000000..805e65a --- /dev/null +++ b/examples/tests/node_config_override.rs @@ -0,0 +1,113 @@ +use std::{ + net::{SocketAddr, TcpListener}, + time::Duration, +}; + +use anyhow::Result; +use testing_framework_core::{ + nodes::ApiClient, + scenario::{Deployer, PeerSelection, ScenarioBuilder, StartNodeOptions}, + topology::config::TopologyConfig, +}; +use testing_framework_runner_local::LocalDeployer; +use tracing_subscriber::fmt::try_init; + +#[tokio::test] +#[ignore = "run manually with `cargo test -p runner-examples -- --ignored manual_cluster_api_port_override`"] +async fn manual_cluster_api_port_override() -> Result<()> { + let _ = try_init(); + // Required env vars (set on the command line when running this test): + // - `POL_PROOF_DEV_MODE=true` + // - `LOGOS_BLOCKCHAIN_NODE_BIN=...` + // - `LOGOS_BLOCKCHAIN_CIRCUITS=...` + // - `RUST_LOG=info` (optional) + + let api_port = random_api_port(); + + let deployer = LocalDeployer::new(); + let cluster = deployer.manual_cluster(TopologyConfig::with_node_numbers(1))?; + + let node = cluster + .start_node_with( + "override-api", + StartNodeOptions { + peers: PeerSelection::None, + config_patch: None, + } + .create_patch(move |mut config| { + println!("overriding API port to {api_port}"); + + let current_addr = config.http.backend_settings.address; + + config.http.backend_settings.address = SocketAddr::new(current_addr.ip(), api_port); + + Ok(config) + }), + ) + .await? + .api; + + node.consensus_info() + .await + .expect("consensus_info should succeed"); + + assert_eq!(resolved_port(&node), api_port); + + Ok(()) +} + +#[tokio::test] +#[ignore = "run manually with `cargo test -p runner-examples -- --ignored scenario_builder_api_port_override`"] +async fn scenario_builder_api_port_override() -> Result<()> { + let _ = try_init(); + // Required env vars (set on the command line when running this test): + // - `POL_PROOF_DEV_MODE=true` + // - `LOGOS_BLOCKCHAIN_NODE_BIN=...` + // - `LOGOS_BLOCKCHAIN_CIRCUITS=...` + // - `RUST_LOG=info` (optional) + let api_port = random_api_port(); + + let mut scenario = ScenarioBuilder::topology_with(|t| { + t.network_star() + .nodes(1) + .node_config_patch_with(0, move |mut config| { + println!("overriding API port to {api_port}"); + + let current_addr = config.http.backend_settings.address; + + config.http.backend_settings.address = SocketAddr::new(current_addr.ip(), api_port); + + Ok(config) + }) + }) + .with_run_duration(Duration::from_secs(1)) + .build()?; + + let deployer = LocalDeployer::default(); + let runner = deployer.deploy(&scenario).await?; + let handle = runner.run(&mut scenario).await?; + + let client = handle + .context() + .node_clients() + .any_client() + .ok_or_else(|| anyhow::anyhow!("scenario did not expose any node clients"))?; + + client + .consensus_info() + .await + .expect("consensus_info should succeed"); + + assert_eq!(resolved_port(&client), api_port); + + Ok(()) +} + +fn random_api_port() -> u16 { + let listener = TcpListener::bind("127.0.0.1:0").expect("bind random API port"); + listener.local_addr().expect("read API port").port() +} + +fn resolved_port(client: &ApiClient) -> u16 { + client.base_url().port().unwrap_or_default() +} diff --git a/testing-framework/core/src/nodes/node.rs b/testing-framework/core/src/nodes/node.rs index 581ff14..ac49c68 100644 --- a/testing-framework/core/src/nodes/node.rs +++ b/testing-framework/core/src/nodes/node.rs @@ -16,6 +16,8 @@ use crate::{ node::{NodeAddresses, NodeConfigCommon, NodeHandle, SpawnNodeError, spawn_node}, }, }, + scenario::DynError, + topology::config::NodeConfigPatch, }; const BIN_PATH: &str = "target/debug/logos-blockchain-node"; @@ -34,6 +36,23 @@ pub struct Node { handle: NodeHandle, } +pub fn apply_node_config_patches<'a>( + mut config: Config, + patches: impl IntoIterator, +) -> Result { + for patch in patches { + config = patch(config)?; + } + Ok(config) +} + +pub fn apply_node_config_patch( + config: Config, + patch: &NodeConfigPatch, +) -> Result { + apply_node_config_patches(config, [patch]) +} + impl Deref for Node { type Target = NodeHandle; diff --git a/testing-framework/core/src/scenario/capabilities.rs b/testing-framework/core/src/scenario/capabilities.rs index 5695d19..1c05590 100644 --- a/testing-framework/core/src/scenario/capabilities.rs +++ b/testing-framework/core/src/scenario/capabilities.rs @@ -1,8 +1,10 @@ +use std::sync::Arc; + use async_trait::async_trait; use reqwest::Url; use super::DynError; -use crate::nodes::ApiClient; +use crate::{nodes::ApiClient, topology::config::NodeConfigPatch}; /// Marker type used by scenario builders to request node control support. #[derive(Clone, Copy, Debug, Default)] @@ -34,20 +36,33 @@ pub enum PeerSelection { } /// Options for dynamically starting a node. -#[derive(Clone, Debug)] +#[derive(Clone)] pub struct StartNodeOptions { /// How to select initial peers on startup. pub peers: PeerSelection, + /// Optional node config patch applied before spawn. + pub config_patch: Option, } impl Default for StartNodeOptions { fn default() -> Self { Self { peers: PeerSelection::DefaultLayout, + config_patch: None, } } } +impl StartNodeOptions { + pub fn create_patch(mut self, f: F) -> Self + where + F: Fn(nomos_node::Config) -> Result + Send + Sync + 'static, + { + self.config_patch = Some(Arc::new(f)); + self + } +} + /// Trait implemented by scenario capability markers to signal whether node /// control is required. pub trait RequiresNodeControl { diff --git a/testing-framework/core/src/scenario/definition.rs b/testing-framework/core/src/scenario/definition.rs index 522d0ab..dceb3c9 100644 --- a/testing-framework/core/src/scenario/definition.rs +++ b/testing-framework/core/src/scenario/definition.rs @@ -1,5 +1,6 @@ use std::{num::NonZeroUsize, sync::Arc, time::Duration}; +use nomos_node::Config as NodeConfig; use thiserror::Error; use tracing::{debug, info}; @@ -8,7 +9,7 @@ use super::{ workload::Workload, }; use crate::topology::{ - config::{TopologyBuildError, TopologyBuilder, TopologyConfig}, + config::{NodeConfigPatch, TopologyBuildError, TopologyBuilder, TopologyConfig}, configs::{network::Libp2pNetworkLayout, wallet::WalletConfig}, generation::GeneratedTopology, }; @@ -302,16 +303,37 @@ impl TopologyConfigurator { self } + /// Apply a config patch for a specific node index. + #[must_use] + pub fn node_config_patch(mut self, index: usize, patch: NodeConfigPatch) -> Self { + self.builder.topology = self.builder.topology.with_node_config_patch(index, patch); + self + } + + /// Apply a config patch for a specific node index. + #[must_use] + pub fn node_config_patch_with(mut self, index: usize, f: F) -> Self + where + F: Fn(NodeConfig) -> Result + Send + Sync + 'static, + { + self.builder.topology = self + .builder + .topology + .with_node_config_patch(index, Arc::new(f)); + self + } + /// Finalize and return the underlying scenario builder. #[must_use] pub fn apply(self) -> Builder { - let mut config = TopologyConfig::with_node_numbers(self.nodes); - if self.network_star { - config.network_params.libp2p_network_layout = Libp2pNetworkLayout::Star; - } - let mut builder = self.builder; - builder.topology = TopologyBuilder::new(config); + builder.topology = builder.topology.with_node_count(self.nodes); + + if self.network_star { + builder.topology = builder + .topology + .with_network_layout(Libp2pNetworkLayout::Star); + } builder } } diff --git a/testing-framework/core/src/topology/config.rs b/testing-framework/core/src/topology/config.rs index ebcd3e1..69e9bc3 100644 --- a/testing-framework/core/src/topology/config.rs +++ b/testing-framework/core/src/topology/config.rs @@ -1,7 +1,10 @@ +use std::{collections::HashMap, sync::Arc}; + use nomos_core::{ mantle::GenesisTx as _, sdp::{Locator, ServiceType}, }; +use nomos_node::Config as NodeConfig; use testing_framework_config::topology::{ configs::{ api::{ApiConfigError, create_api_configs}, @@ -18,12 +21,18 @@ use testing_framework_config::topology::{ }; use thiserror::Error; -use crate::topology::{ - configs::{GeneralConfig, time::default_time_config}, - generation::{GeneratedNodeConfig, GeneratedTopology}, - utils::{TopologyResolveError, create_kms_configs, resolve_ids, resolve_ports}, +use crate::{ + scenario::DynError, + topology::{ + configs::{GeneralConfig, time::default_time_config}, + generation::{GeneratedNodeConfig, GeneratedTopology}, + utils::{TopologyResolveError, create_kms_configs, resolve_ids, resolve_ports}, + }, }; +/// Per-node config patch applied after the default node config is generated. +pub type NodeConfigPatch = Arc Result + Send + Sync>; + #[derive(Debug, Error)] pub enum TopologyBuildError { #[error("topology must include at least one node")] @@ -55,6 +64,7 @@ pub struct TopologyConfig { pub consensus_params: ConsensusParams, pub network_params: NetworkParams, pub wallet_config: WalletConfig, + pub node_config_patches: HashMap, } impl TopologyConfig { @@ -66,6 +76,7 @@ impl TopologyConfig { consensus_params: ConsensusParams::default_for_participants(1), network_params: NetworkParams::default(), wallet_config: WalletConfig::default(), + node_config_patches: HashMap::new(), } } @@ -77,6 +88,7 @@ impl TopologyConfig { consensus_params: ConsensusParams::default_for_participants(2), network_params: NetworkParams::default(), wallet_config: WalletConfig::default(), + node_config_patches: HashMap::new(), } } @@ -90,6 +102,7 @@ impl TopologyConfig { consensus_params: ConsensusParams::default_for_participants(participants), network_params: NetworkParams::default(), wallet_config: WalletConfig::default(), + node_config_patches: HashMap::new(), } } @@ -97,6 +110,17 @@ impl TopologyConfig { pub const fn wallet(&self) -> &WalletConfig { &self.wallet_config } + + #[must_use] + pub fn node_config_patch(&self, index: usize) -> Option<&NodeConfigPatch> { + self.node_config_patches.get(&index) + } + + #[must_use] + pub fn with_node_config_patch(mut self, index: usize, patch: NodeConfigPatch) -> Self { + self.node_config_patches.insert(index, patch); + self + } } /// Builder that produces `GeneratedTopology` instances from a `TopologyConfig`. @@ -132,6 +156,13 @@ impl TopologyBuilder { self } + #[must_use] + /// Apply a config patch for a specific node index. + pub fn with_node_config_patch(mut self, index: usize, patch: NodeConfigPatch) -> Self { + self.config.node_config_patches.insert(index, patch); + self + } + #[must_use] /// Set node counts. pub const fn with_node_count(mut self, nodes: usize) -> Self { @@ -204,6 +235,7 @@ impl TopologyBuilder { &tracing_configs, &kms_configs, &time_config, + &config.node_config_patches, )?; Ok(GeneratedTopology { config, nodes }) @@ -291,6 +323,7 @@ fn build_node_descriptors( tracing_configs: &[testing_framework_config::topology::configs::tracing::GeneralTracingConfig], kms_configs: &[key_management_system_service::backend::preload::PreloadKMSBackendSettings], time_config: &testing_framework_config::topology::configs::time::GeneralTimeConfig, + node_config_patches: &HashMap, ) -> Result, TopologyBuildError> { let mut nodes = Vec::with_capacity(config.n_nodes); @@ -324,6 +357,7 @@ fn build_node_descriptors( id, general, blend_port, + config_patch: node_config_patches.get(&i).cloned(), }; nodes.push(descriptor); diff --git a/testing-framework/core/src/topology/deployment.rs b/testing-framework/core/src/topology/deployment.rs index 7cb2fc2..95d952b 100644 --- a/testing-framework/core/src/topology/deployment.rs +++ b/testing-framework/core/src/topology/deployment.rs @@ -5,12 +5,12 @@ use thiserror::Error; use crate::{ nodes::{ common::node::SpawnNodeError, - node::{Node, create_node_config}, + node::{Node, apply_node_config_patch, create_node_config}, }, + scenario, topology::{ config::{TopologyBuildError, TopologyBuilder, TopologyConfig}, - configs::GeneralConfig, - generation::find_expected_peer_counts, + generation::{GeneratedNodeConfig, find_expected_peer_counts}, readiness::{NetworkReadiness, ReadinessCheck, ReadinessError}, utils::multiaddr_port, }, @@ -29,18 +29,17 @@ pub enum SpawnTopologyError { Build(#[from] TopologyBuildError), #[error(transparent)] Node(#[from] SpawnNodeError), + #[error("node config patch failed for node-{index}: {source}")] + ConfigPatch { + index: usize, + source: scenario::DynError, + }, } impl Topology { pub async fn spawn(config: TopologyConfig) -> Result { let generated = TopologyBuilder::new(config.clone()).build()?; - let n_nodes = config.n_nodes; - let node_configs = generated - .iter() - .map(|node| node.general.clone()) - .collect::>(); - - let nodes = Self::spawn_nodes(node_configs, n_nodes).await?; + let nodes = Self::spawn_nodes(generated.nodes()).await?; Ok(Self { nodes }) } @@ -55,28 +54,32 @@ impl Topology { .with_blend_ports(blend_ports.to_vec()) .build()?; - let node_configs = generated - .iter() - .map(|node| node.general.clone()) - .collect::>(); - - let nodes = Self::spawn_nodes(node_configs, config.n_nodes).await?; + let nodes = Self::spawn_nodes(generated.nodes()).await?; Ok(Self { nodes }) } pub(crate) async fn spawn_nodes( - config: Vec, - n_nodes: usize, + nodes: &[GeneratedNodeConfig], ) -> Result { - let mut nodes = Vec::new(); - for i in 0..n_nodes { - let config = create_node_config(config[i].clone()); - let label = format!("node-{i}"); - nodes.push(Node::spawn(config, &label).await?); + let mut spawned = Vec::new(); + for node in nodes { + let mut config = create_node_config(node.general.clone()); + + if let Some(patch) = node.config_patch.as_ref() { + config = apply_node_config_patch(config, patch).map_err(|source| { + SpawnTopologyError::ConfigPatch { + index: node.index, + source, + } + })?; + } + + let label = format!("node-{}", node.index); + spawned.push(Node::spawn(config, &label).await?); } - Ok(nodes) + Ok(spawned) } #[must_use] diff --git a/testing-framework/core/src/topology/generation.rs b/testing-framework/core/src/topology/generation.rs index e691742..270e4f3 100644 --- a/testing-framework/core/src/topology/generation.rs +++ b/testing-framework/core/src/topology/generation.rs @@ -3,7 +3,7 @@ use std::{collections::HashSet, time::Duration}; use reqwest::{Client, Url}; use crate::topology::{ - config::TopologyConfig, + config::{NodeConfigPatch, TopologyConfig}, configs::{GeneralConfig, wallet::WalletAccount}, deployment::{SpawnTopologyError, Topology}, readiness::{HttpNetworkReadiness, ReadinessCheck, ReadinessError}, @@ -16,6 +16,7 @@ pub struct GeneratedNodeConfig { pub id: [u8; 32], pub general: GeneralConfig, pub blend_port: u16, + pub config_patch: Option, } impl GeneratedNodeConfig { @@ -82,12 +83,7 @@ impl GeneratedTopology { } pub async fn spawn_local(&self) -> Result { - let configs = self - .iter() - .map(|node| node.general.clone()) - .collect::>(); - - let nodes = Topology::spawn_nodes(configs, self.config.n_nodes).await?; + let nodes = Topology::spawn_nodes(self.nodes()).await?; Ok(Topology { nodes }) } diff --git a/testing-framework/deployers/local/src/node_control/config.rs b/testing-framework/deployers/local/src/node_control/config.rs index 26062ad..28673f2 100644 --- a/testing-framework/deployers/local/src/node_control/config.rs +++ b/testing-framework/deployers/local/src/node_control/config.rs @@ -11,7 +11,7 @@ use testing_framework_config::topology::configs::{ use testing_framework_core::{ scenario::{PeerSelection, StartNodeOptions}, topology::{ - config::TopologyConfig, + config::{NodeConfigPatch, TopologyConfig}, configs::GeneralConfig, generation::{GeneratedNodeConfig, GeneratedTopology}, }, @@ -27,7 +27,7 @@ pub(super) fn build_general_config_for( peer_ports_by_name: &HashMap, options: &StartNodeOptions, peer_ports: &[u16], -) -> Result<(GeneralConfig, u16), LocalDynamicError> { +) -> Result<(GeneralConfig, u16, Option), LocalDynamicError> { if let Some(node) = descriptor_for(descriptors, index) { let mut config = node.general.clone(); let initial_peers = resolve_initial_peers( @@ -40,7 +40,7 @@ pub(super) fn build_general_config_for( config.network_config.backend.initial_peers = initial_peers; - return Ok((config, node.network_port())); + return Ok((config, node.network_port(), node.config_patch.clone())); } let id = random_node_id(); @@ -61,7 +61,7 @@ pub(super) fn build_general_config_for( ) .map_err(|source| LocalDynamicError::Config { source })?; - Ok((general_config, network_port)) + Ok((general_config, network_port, None)) } fn descriptor_for(descriptors: &GeneratedTopology, index: usize) -> Option<&GeneratedNodeConfig> { diff --git a/testing-framework/deployers/local/src/node_control/mod.rs b/testing-framework/deployers/local/src/node_control/mod.rs index 7bb0acc..60827a3 100644 --- a/testing-framework/deployers/local/src/node_control/mod.rs +++ b/testing-framework/deployers/local/src/node_control/mod.rs @@ -8,7 +8,7 @@ use testing_framework_config::topology::configs::{consensus, time}; use testing_framework_core::{ nodes::{ ApiClient, - node::{Node, create_node_config}, + node::{Node, apply_node_config_patch, create_node_config}, }, scenario::{DynError, NodeControlHandle, StartNodeOptions, StartedNode}, topology::{ @@ -41,6 +41,8 @@ pub enum LocalDynamicError { InvalidArgument { message: String }, #[error("{message}")] PortAllocation { message: String }, + #[error("node config patch failed: {message}")] + ConfigPatch { message: String }, } pub struct LocalDynamicNodes { @@ -230,7 +232,7 @@ impl LocalDynamicNodes { ) }; - let (general_config, network_port) = build_general_config_for( + let (general_config, network_port, descriptor_patch) = build_general_config_for( &self.descriptors, &self.base_consensus, &self.base_time, @@ -240,7 +242,12 @@ impl LocalDynamicNodes { &peer_ports, )?; - let config = create_node_config(general_config); + let config = build_node_config( + general_config, + descriptor_patch.as_ref(), + options.config_patch.as_ref(), + )?; + let api_client = self .spawn_and_register_node(&node_name, network_port, config) .await?; @@ -275,6 +282,31 @@ impl LocalDynamicNodes { } } +fn build_node_config( + general_config: testing_framework_config::topology::configs::GeneralConfig, + descriptor_patch: Option<&testing_framework_core::topology::config::NodeConfigPatch>, + options_patch: Option<&testing_framework_core::topology::config::NodeConfigPatch>, +) -> Result { + let mut config = create_node_config(general_config); + config = apply_patch_if_needed(config, descriptor_patch)?; + config = apply_patch_if_needed(config, options_patch)?; + + Ok(config) +} + +fn apply_patch_if_needed( + config: NodeConfig, + patch: Option<&testing_framework_core::topology::config::NodeConfigPatch>, +) -> Result { + let Some(patch) = patch else { + return Ok(config); + }; + + apply_node_config_patch(config, patch).map_err(|err| LocalDynamicError::ConfigPatch { + message: err.to_string(), + }) +} + #[async_trait::async_trait] impl NodeControlHandle for LocalDynamicNodes { async fn restart_node(&self, _index: usize) -> Result<(), DynError> { From e2df69b0d5ef2ea4dbabfa7779dfb0c99b66b701 Mon Sep 17 00:00:00 2001 From: Hansie Odendaal <39146854+hansieodendaal@users.noreply.github.com> Date: Thu, 29 Jan 2026 09:33:25 +0200 Subject: [PATCH 02/11] chore: merge master into dev and update configs after merge (#17) * Sdp config structs from logos blockchain (#15) * Update configs after main repo merge --------- Co-authored-by: gusto --- Cargo.lock | 96 +++++++++---------- Cargo.toml | 60 ++++++------ examples/tests/node_config_override.rs | 10 +- testing-framework/configs/src/nodes/node.rs | 39 +++++--- .../configs/src/topology/configs/consensus.rs | 15 ++- testing-framework/core/src/nodes/node.rs | 26 ++--- .../core/src/scenario/capabilities.rs | 5 +- .../core/src/scenario/definition.rs | 4 +- testing-framework/core/src/topology/config.rs | 4 +- .../core/src/topology/deployment.rs | 10 +- .../deployers/local/src/node_control/mod.rs | 18 ++-- .../cfgsync_tf/src/bin/cfgsync-client.rs | 4 +- versions.env | 2 +- 13 files changed, 166 insertions(+), 127 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c239e76..ea66c15 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3389,7 +3389,7 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "logos-blockchain-api-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "bytes", @@ -3415,7 +3415,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "logos-blockchain-blend-crypto", "logos-blockchain-blend-message", @@ -3427,7 +3427,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-crypto" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "blake2", "logos-blockchain-groth16", @@ -3441,7 +3441,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-message" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "blake2", "derivative", @@ -3463,7 +3463,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-network" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "either", "futures", @@ -3481,7 +3481,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-proofs" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "ed25519-dalek", "generic-array 1.3.5", @@ -3496,7 +3496,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-scheduling" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "derivative", @@ -3519,7 +3519,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "fork_stream", @@ -3554,7 +3554,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-broadcast-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "derivative", @@ -3570,7 +3570,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-leader-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "futures", @@ -3586,6 +3586,7 @@ dependencies = [ "logos-blockchain-tx-service", "logos-blockchain-wallet-service", "overwatch", + "rand 0.8.5", "serde", "thiserror 1.0.69", "tokio", @@ -3596,7 +3597,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-network-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "futures", @@ -3624,7 +3625,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "bytes", @@ -3654,7 +3655,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-service-common" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "logos-blockchain-core", "serde", @@ -3663,7 +3664,7 @@ dependencies = [ [[package]] name = "logos-blockchain-circuits-prover" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "logos-blockchain-circuits-utils", "tempfile", @@ -3672,7 +3673,7 @@ dependencies = [ [[package]] name = "logos-blockchain-circuits-utils" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "dirs", ] @@ -3680,7 +3681,7 @@ dependencies = [ [[package]] name = "logos-blockchain-common-http-client" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "futures", "logos-blockchain-chain-broadcast-service", @@ -3697,7 +3698,7 @@ dependencies = [ [[package]] name = "logos-blockchain-core" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "ark-ff 0.4.2", "bincode", @@ -3726,7 +3727,7 @@ dependencies = [ [[package]] name = "logos-blockchain-cryptarchia-engine" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "cfg_eval", "logos-blockchain-utils", @@ -3741,7 +3742,7 @@ dependencies = [ [[package]] name = "logos-blockchain-cryptarchia-sync" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "bytes", "futures", @@ -3760,7 +3761,7 @@ dependencies = [ [[package]] name = "logos-blockchain-groth16" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "ark-bn254 0.4.0", "ark-ec 0.4.2", @@ -3778,7 +3779,7 @@ dependencies = [ [[package]] name = "logos-blockchain-http-api-common" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "axum", "governor", @@ -3793,7 +3794,7 @@ dependencies = [ [[package]] name = "logos-blockchain-key-management-system-keys" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "bytes", @@ -3819,7 +3820,7 @@ dependencies = [ [[package]] name = "logos-blockchain-key-management-system-macros" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "proc-macro2", "quote", @@ -3829,7 +3830,7 @@ dependencies = [ [[package]] name = "logos-blockchain-key-management-system-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "log", @@ -3844,8 +3845,9 @@ dependencies = [ [[package]] name = "logos-blockchain-ledger" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ + "derivative", "logos-blockchain-blend-crypto", "logos-blockchain-blend-message", "logos-blockchain-blend-proofs", @@ -3867,7 +3869,7 @@ dependencies = [ [[package]] name = "logos-blockchain-libp2p" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "backon", @@ -3896,7 +3898,7 @@ dependencies = [ [[package]] name = "logos-blockchain-mmr" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "ark-ff 0.4.2", "logos-blockchain-groth16", @@ -3908,7 +3910,7 @@ dependencies = [ [[package]] name = "logos-blockchain-network-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "futures", @@ -3927,7 +3929,7 @@ dependencies = [ [[package]] name = "logos-blockchain-node" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "axum", @@ -3984,7 +3986,7 @@ dependencies = [ [[package]] name = "logos-blockchain-pol" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", @@ -4000,7 +4002,7 @@ dependencies = [ [[package]] name = "logos-blockchain-poq" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", @@ -4016,7 +4018,7 @@ dependencies = [ [[package]] name = "logos-blockchain-poseidon2" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "ark-bn254 0.4.0", "ark-ff 0.4.2", @@ -4027,25 +4029,23 @@ dependencies = [ [[package]] name = "logos-blockchain-sdp-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "futures", "logos-blockchain-core", "logos-blockchain-key-management-system-keys", - "logos-blockchain-tx-service", "overwatch", "serde", "thiserror 2.0.18", "tokio", - "tokio-stream", "tracing", ] [[package]] name = "logos-blockchain-services-utils" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "futures", @@ -4060,7 +4060,7 @@ dependencies = [ [[package]] name = "logos-blockchain-storage-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "bytes", @@ -4078,7 +4078,7 @@ dependencies = [ [[package]] name = "logos-blockchain-system-sig-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-ctrlc", "async-trait", @@ -4089,7 +4089,7 @@ dependencies = [ [[package]] name = "logos-blockchain-time-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "cfg_eval", @@ -4111,7 +4111,7 @@ dependencies = [ [[package]] name = "logos-blockchain-tracing" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "opentelemetry", "opentelemetry-http", @@ -4134,7 +4134,7 @@ dependencies = [ [[package]] name = "logos-blockchain-tracing-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "logos-blockchain-tracing", @@ -4148,7 +4148,7 @@ dependencies = [ [[package]] name = "logos-blockchain-tx-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "futures", @@ -4170,7 +4170,7 @@ dependencies = [ [[package]] name = "logos-blockchain-utils" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "blake2", @@ -4187,7 +4187,7 @@ dependencies = [ [[package]] name = "logos-blockchain-utxotree" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "ark-ff 0.4.2", "logos-blockchain-core", @@ -4202,7 +4202,7 @@ dependencies = [ [[package]] name = "logos-blockchain-wallet" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "logos-blockchain-core", "logos-blockchain-key-management-system-keys", @@ -4216,7 +4216,7 @@ dependencies = [ [[package]] name = "logos-blockchain-wallet-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "async-trait", "bytes", @@ -4240,7 +4240,7 @@ dependencies = [ [[package]] name = "logos-blockchain-witness-generator" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "tempfile", ] @@ -4248,7 +4248,7 @@ dependencies = [ [[package]] name = "logos-blockchain-zksign" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=47ae18e95f643bde563b4769212b37f6f018fed3#47ae18e95f643bde563b4769212b37f6f018fed3" +source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", diff --git a/Cargo.toml b/Cargo.toml index c262329..e2d0c85 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,39 +40,39 @@ testing-framework-runner-local = { default-features = false, path = "testing-f testing-framework-workflows = { default-features = false, path = "testing-framework/workflows" } # Logos git dependencies (pinned to latest master) -broadcast-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-broadcast-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +broadcast-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-broadcast-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } cfgsync_tf = { default-features = false, path = "testing-framework/tools/cfgsync_tf" } chain-leader = { default-features = false, features = [ "pol-dev-mode", -], git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-leader-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -chain-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-network-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -chain-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -common-http-client = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-common-http-client", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -cryptarchia-engine = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-engine", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -cryptarchia-sync = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-sync", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -groth16 = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-groth16", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -key-management-system-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-key-management-system-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -nomos-api = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-api-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -nomos-blend-message = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-message", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -nomos-blend-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -nomos-core = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-core", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -nomos-http-api-common = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-http-api-common", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -nomos-ledger = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-ledger", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -nomos-libp2p = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-libp2p", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -nomos-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-network-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -nomos-node = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-node", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -nomos-sdp = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-sdp-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -nomos-time = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-time-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -nomos-tracing = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -nomos-tracing-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -nomos-utils = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-utils", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -nomos-wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -poc = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-poc", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -pol = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-pol", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -tests = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tests", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -tx-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tx-service", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } -zksign = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-zksign", rev = "47ae18e95f643bde563b4769212b37f6f018fed3" } +], git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-leader-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +chain-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-network-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +chain-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +common-http-client = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-common-http-client", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +cryptarchia-engine = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-engine", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +cryptarchia-sync = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-sync", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +groth16 = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-groth16", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +key-management-system-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-key-management-system-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +nomos-api = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-api-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +nomos-blend-message = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-message", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +nomos-blend-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +nomos-core = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-core", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +nomos-http-api-common = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-http-api-common", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +nomos-ledger = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-ledger", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +nomos-libp2p = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-libp2p", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +nomos-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-network-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +nomos-node = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-node", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +nomos-sdp = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-sdp-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +nomos-time = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-time-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +nomos-tracing = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +nomos-tracing-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +nomos-utils = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-utils", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +nomos-wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +poc = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-poc", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +pol = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-pol", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +tests = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tests", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +tx-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tx-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +zksign = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-zksign", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } # External crates async-trait = { default-features = false, version = "0.1" } diff --git a/examples/tests/node_config_override.rs b/examples/tests/node_config_override.rs index 805e65a..85f9db2 100644 --- a/examples/tests/node_config_override.rs +++ b/examples/tests/node_config_override.rs @@ -37,9 +37,10 @@ async fn manual_cluster_api_port_override() -> Result<()> { .create_patch(move |mut config| { println!("overriding API port to {api_port}"); - let current_addr = config.http.backend_settings.address; + let current_addr = config.user.http.backend_settings.address; - config.http.backend_settings.address = SocketAddr::new(current_addr.ip(), api_port); + config.user.http.backend_settings.address = + SocketAddr::new(current_addr.ip(), api_port); Ok(config) }), @@ -73,9 +74,10 @@ async fn scenario_builder_api_port_override() -> Result<()> { .node_config_patch_with(0, move |mut config| { println!("overriding API port to {api_port}"); - let current_addr = config.http.backend_settings.address; + let current_addr = config.user.http.backend_settings.address; - config.http.backend_settings.address = SocketAddr::new(current_addr.ip(), api_port); + config.user.http.backend_settings.address = + SocketAddr::new(current_addr.ip(), api_port); Ok(config) }) diff --git a/testing-framework/configs/src/nodes/node.rs b/testing-framework/configs/src/nodes/node.rs index 33692ae..3100227 100644 --- a/testing-framework/configs/src/nodes/node.rs +++ b/testing-framework/configs/src/nodes/node.rs @@ -1,7 +1,10 @@ +use key_management_system_service::keys::secured_key::SecuredKey as _; +use nomos_core::mantle::Value; use nomos_node::{ - Config as NodeConfig, RocksBackendSettings, config::deployment::DeploymentSettings, + RocksBackendSettings, UserConfig, + config::{RunConfig, deployment::DeploymentSettings}, }; -use nomos_sdp::SdpSettings; +use nomos_sdp::{SdpSettings, wallet::SdpWalletConfig}; use crate::{ nodes::{ @@ -16,7 +19,7 @@ use crate::{ }; #[must_use] -pub fn create_node_config(config: GeneralConfig) -> NodeConfig { +pub fn create_node_config(config: GeneralConfig) -> RunConfig { let network_config = config.network_config.clone(); let (blend_user_config, blend_deployment, network_deployment) = build_blend_service_config(&config.blend_config); @@ -24,20 +27,30 @@ pub fn create_node_config(config: GeneralConfig) -> NodeConfig { let deployment_settings = build_node_deployment_settings(&config, blend_deployment, network_deployment); - NodeConfig { + let user_settings = UserConfig { network: network_config, blend: blend_user_config, - deployment: deployment_settings, cryptarchia: cryptarchia_config(&config), tracing: tracing_settings(&config), http: http_config(&config), storage: rocks_storage_settings(), time: time_config(&config), mempool: mempool_config(), - sdp: SdpSettings { declaration: None }, + sdp: SdpSettings { + declaration: None, + wallet_config: SdpWalletConfig { + max_tx_fee: Value::MAX, + funding_pk: config.consensus_config.funding_sk.as_public_key(), + }, + }, testing_http: testing_http_config(&config), wallet: wallet_settings(&config), key_management: config.kms_config.clone(), + }; + + RunConfig { + deployment: deployment_settings, + user: user_settings, } } @@ -46,13 +59,13 @@ fn build_node_deployment_settings( blend_deployment: nomos_node::config::blend::deployment::Settings, network_deployment: nomos_node::config::network::deployment::Settings, ) -> DeploymentSettings { - DeploymentSettings::new_custom( - blend_deployment, - network_deployment, - cryptarchia_deployment(config), - time_deployment(config), - mempool_deployment(), - ) + DeploymentSettings { + blend: blend_deployment, + network: network_deployment, + cryptarchia: cryptarchia_deployment(config), + time: time_deployment(config), + mempool: mempool_deployment(), + } } fn rocks_storage_settings() -> RocksBackendSettings { diff --git a/testing-framework/configs/src/topology/configs/consensus.rs b/testing-framework/configs/src/topology/configs/consensus.rs index 0a61005..bed29a0 100644 --- a/testing-framework/configs/src/topology/configs/consensus.rs +++ b/testing-framework/configs/src/topology/configs/consensus.rs @@ -104,6 +104,7 @@ pub struct GeneralConsensusConfig { pub utxos: Vec, pub blend_notes: Vec, pub wallet_accounts: Vec, + pub funding_sk: ZkKey, } #[derive(Clone)] @@ -205,21 +206,29 @@ pub fn create_consensus_configs( ) -> Result, ConsensusConfigError> { let mut leader_keys = Vec::new(); let mut blend_notes = Vec::new(); + let mut sdp_notes = Vec::new(); - let utxos = create_utxos_for_leader_and_services(ids, &mut leader_keys, &mut blend_notes); + let utxos = create_utxos_for_leader_and_services( + ids, + &mut leader_keys, + &mut blend_notes, + &mut sdp_notes, + ); let utxos = append_wallet_utxos(utxos, wallet); let genesis_tx = create_genesis_tx(&utxos)?; let ledger_config = build_ledger_config(consensus_params)?; Ok(leader_keys .into_iter() - .map(|(pk, sk)| GeneralConsensusConfig { + .enumerate() + .map(|(i, (pk, sk))| GeneralConsensusConfig { leader_config: LeaderConfig { pk, sk }, ledger_config: ledger_config.clone(), genesis_tx: genesis_tx.clone(), utxos: utxos.clone(), blend_notes: blend_notes.clone(), wallet_accounts: wallet.accounts.clone(), + funding_sk: sdp_notes[i].sk.clone(), }) .collect()) } @@ -228,6 +237,7 @@ fn create_utxos_for_leader_and_services( ids: &[[u8; 32]], leader_keys: &mut Vec<(ZkPublicKey, UnsecuredZkKey)>, blend_notes: &mut Vec, + sdp_notes: &mut Vec, ) -> Vec { let mut utxos = Vec::new(); @@ -238,6 +248,7 @@ fn create_utxos_for_leader_and_services( for &id in ids { output_index = push_leader_utxo(id, leader_keys, &mut utxos, output_index); output_index = push_service_note(b"bn", id, blend_notes, &mut utxos, output_index); + output_index = push_service_note(b"sdp", id, sdp_notes, &mut utxos, output_index); } utxos diff --git a/testing-framework/core/src/nodes/node.rs b/testing-framework/core/src/nodes/node.rs index ac49c68..837e4ea 100644 --- a/testing-framework/core/src/nodes/node.rs +++ b/testing-framework/core/src/nodes/node.rs @@ -1,6 +1,6 @@ use std::{ops::Deref, path::PathBuf, time::Duration}; -use nomos_node::Config; +use nomos_node::config::RunConfig; use nomos_tracing_service::LoggerLayer; pub use testing_framework_config::nodes::node::create_node_config; use tracing::{debug, info}; @@ -33,13 +33,13 @@ fn binary_path() -> PathBuf { } pub struct Node { - handle: NodeHandle, + handle: NodeHandle, } pub fn apply_node_config_patches<'a>( - mut config: Config, + mut config: RunConfig, patches: impl IntoIterator, -) -> Result { +) -> Result { for patch in patches { config = patch(config)?; } @@ -47,14 +47,14 @@ pub fn apply_node_config_patches<'a>( } pub fn apply_node_config_patch( - config: Config, + config: RunConfig, patch: &NodeConfigPatch, -) -> Result { +) -> Result { apply_node_config_patches(config, [patch]) } impl Deref for Node { - type Target = NodeHandle; + type Target = NodeHandle; fn deref(&self) -> &Self::Target { &self.handle @@ -86,7 +86,7 @@ impl Node { self.handle.wait_for_exit(timeout).await } - pub async fn spawn(config: Config, label: &str) -> Result { + pub async fn spawn(config: RunConfig, label: &str) -> Result { let log_prefix = format!("{LOGS_PREFIX}-{label}"); let handle = spawn_node( config, @@ -103,19 +103,19 @@ impl Node { } } -impl NodeConfigCommon for Config { +impl NodeConfigCommon for RunConfig { fn set_logger(&mut self, logger: LoggerLayer) { - self.tracing.logger = logger; + self.user.tracing.logger = logger; } fn set_paths(&mut self, base: &std::path::Path) { - self.storage.db_path = base.join("db"); + self.user.storage.db_path = base.join("db"); } fn addresses(&self) -> NodeAddresses { ( - self.http.backend_settings.address, - Some(self.testing_http.backend_settings.address), + self.user.http.backend_settings.address, + Some(self.user.testing_http.backend_settings.address), ) } } diff --git a/testing-framework/core/src/scenario/capabilities.rs b/testing-framework/core/src/scenario/capabilities.rs index 1c05590..1dda452 100644 --- a/testing-framework/core/src/scenario/capabilities.rs +++ b/testing-framework/core/src/scenario/capabilities.rs @@ -56,7 +56,10 @@ impl Default for StartNodeOptions { impl StartNodeOptions { pub fn create_patch(mut self, f: F) -> Self where - F: Fn(nomos_node::Config) -> Result + Send + Sync + 'static, + F: Fn(nomos_node::config::RunConfig) -> Result + + Send + + Sync + + 'static, { self.config_patch = Some(Arc::new(f)); self diff --git a/testing-framework/core/src/scenario/definition.rs b/testing-framework/core/src/scenario/definition.rs index dceb3c9..ded9307 100644 --- a/testing-framework/core/src/scenario/definition.rs +++ b/testing-framework/core/src/scenario/definition.rs @@ -1,6 +1,6 @@ use std::{num::NonZeroUsize, sync::Arc, time::Duration}; -use nomos_node::Config as NodeConfig; +use nomos_node::config::RunConfig; use thiserror::Error; use tracing::{debug, info}; @@ -314,7 +314,7 @@ impl TopologyConfigurator { #[must_use] pub fn node_config_patch_with(mut self, index: usize, f: F) -> Self where - F: Fn(NodeConfig) -> Result + Send + Sync + 'static, + F: Fn(RunConfig) -> Result + Send + Sync + 'static, { self.builder.topology = self .builder diff --git a/testing-framework/core/src/topology/config.rs b/testing-framework/core/src/topology/config.rs index 69e9bc3..9a57720 100644 --- a/testing-framework/core/src/topology/config.rs +++ b/testing-framework/core/src/topology/config.rs @@ -4,7 +4,7 @@ use nomos_core::{ mantle::GenesisTx as _, sdp::{Locator, ServiceType}, }; -use nomos_node::Config as NodeConfig; +use nomos_node::config::RunConfig; use testing_framework_config::topology::{ configs::{ api::{ApiConfigError, create_api_configs}, @@ -31,7 +31,7 @@ use crate::{ }; /// Per-node config patch applied after the default node config is generated. -pub type NodeConfigPatch = Arc Result + Send + Sync>; +pub type NodeConfigPatch = Arc Result + Send + Sync>; #[derive(Debug, Error)] pub enum TopologyBuildError { diff --git a/testing-framework/core/src/topology/deployment.rs b/testing-framework/core/src/topology/deployment.rs index 95d952b..bb3aa0b 100644 --- a/testing-framework/core/src/topology/deployment.rs +++ b/testing-framework/core/src/topology/deployment.rs @@ -110,7 +110,7 @@ impl Topology { fn node_listen_ports(&self) -> Vec { self.nodes .iter() - .map(|node| node.config().network.backend.swarm.port) + .map(|node| node.config().user.network.backend.swarm.port) .collect() } @@ -119,6 +119,7 @@ impl Topology { .iter() .map(|node| { node.config() + .user .network .backend .initial_peers @@ -133,7 +134,12 @@ impl Topology { self.nodes .iter() .enumerate() - .map(|(idx, node)| format!("node#{idx}@{}", node.config().network.backend.swarm.port)) + .map(|(idx, node)| { + format!( + "node#{idx}@{}", + node.config().user.network.backend.swarm.port + ) + }) .collect() } } diff --git a/testing-framework/deployers/local/src/node_control/mod.rs b/testing-framework/deployers/local/src/node_control/mod.rs index 60827a3..b3978a4 100644 --- a/testing-framework/deployers/local/src/node_control/mod.rs +++ b/testing-framework/deployers/local/src/node_control/mod.rs @@ -3,7 +3,7 @@ use std::{ sync::Mutex, }; -use nomos_node::Config as NodeConfig; +use nomos_node::config::RunConfig; use testing_framework_config::topology::configs::{consensus, time}; use testing_framework_core::{ nodes::{ @@ -169,7 +169,7 @@ impl LocalDynamicNodes { let listen_ports = state .nodes .iter() - .map(|node| node.config().network.backend.swarm.port) + .map(|node| node.config().user.network.backend.swarm.port) .collect::>(); let initial_peer_ports = state @@ -177,6 +177,7 @@ impl LocalDynamicNodes { .iter() .map(|node| { node.config() + .user .network .backend .initial_peers @@ -193,7 +194,10 @@ impl LocalDynamicNodes { .iter() .enumerate() .map(|(idx, node)| ReadinessNode { - label: format!("node#{idx}@{}", node.config().network.backend.swarm.port), + label: format!( + "node#{idx}@{}", + node.config().user.network.backend.swarm.port + ), expected_peers: expected_peer_counts.get(idx).copied(), api: node.api().clone(), }) @@ -262,7 +266,7 @@ impl LocalDynamicNodes { &self, node_name: &str, network_port: u16, - config: NodeConfig, + config: RunConfig, ) -> Result { let node = Node::spawn(config, node_name) .await @@ -286,7 +290,7 @@ fn build_node_config( general_config: testing_framework_config::topology::configs::GeneralConfig, descriptor_patch: Option<&testing_framework_core::topology::config::NodeConfigPatch>, options_patch: Option<&testing_framework_core::topology::config::NodeConfigPatch>, -) -> Result { +) -> Result { let mut config = create_node_config(general_config); config = apply_patch_if_needed(config, descriptor_patch)?; config = apply_patch_if_needed(config, options_patch)?; @@ -295,9 +299,9 @@ fn build_node_config( } fn apply_patch_if_needed( - config: NodeConfig, + config: RunConfig, patch: Option<&testing_framework_core::topology::config::NodeConfigPatch>, -) -> Result { +) -> Result { let Some(patch) = patch else { return Ok(config); }; diff --git a/testing-framework/tools/cfgsync_tf/src/bin/cfgsync-client.rs b/testing-framework/tools/cfgsync_tf/src/bin/cfgsync-client.rs index 2fe192c..8469338 100644 --- a/testing-framework/tools/cfgsync_tf/src/bin/cfgsync-client.rs +++ b/testing-framework/tools/cfgsync_tf/src/bin/cfgsync-client.rs @@ -4,7 +4,7 @@ use cfgsync_tf::{ client::{FetchedConfig, get_config}, server::ClientIp, }; -use nomos_node::Config as NodeConfig; +use nomos_node::UserConfig; use serde::{Serialize, de::DeserializeOwned}; use testing_framework_config::constants::cfgsync_port as default_cfgsync_port; use testing_framework_core::nodes::common::config::injection::{ @@ -70,7 +70,7 @@ async fn main() { let node_config_endpoint = format!("{server_addr}/node"); let config_result = - pull_to_file::(payload, &node_config_endpoint, &config_file_path).await; + pull_to_file::(payload, &node_config_endpoint, &config_file_path).await; // Handle error if the config request fails if let Err(err) = config_result { diff --git a/versions.env b/versions.env index e63f21d..18afbc0 100644 --- a/versions.env +++ b/versions.env @@ -1,7 +1,7 @@ VERSION=v0.3.2 LOGOS_BLOCKCHAIN_BUNDLE_VERSION=v4 # Pinned logos-blockchain-node revision used for CI builds and binary bundles. -LOGOS_BLOCKCHAIN_NODE_REV=47ae18e95f643bde563b4769212b37f6f018fed3 +LOGOS_BLOCKCHAIN_NODE_REV=3f15894f8b4df377e8d3cd9d92ddee9f648046dc # Optional: local logos-blockchain-node checkout override (do not commit absolute paths). # LOGOS_BLOCKCHAIN_NODE_PATH= From 062be51a4f516dad67fd933e62dc03c032a13ca8 Mon Sep 17 00:00:00 2001 From: Andrus Salumets Date: Fri, 30 Jan 2026 13:05:46 +0100 Subject: [PATCH 03/11] Local deployer allows to stop and restart nodes (#16) * Unify local node control and restart support * Add local stop-node support * Use node names for restart/stop control * merge --------- Co-authored-by: hansieodendaal --- Cargo.lock | 1 + .../src/node_control_accessing_control.rs | 4 +- .../doc-snippets/src/node_control_trait.rs | 2 +- scripts/build/build-bundle.sh | 15 +- scripts/run/run-examples.sh | 11 +- testing-framework/core/src/manual.rs | 4 +- .../core/src/nodes/common/node.rs | 6 +- testing-framework/core/src/nodes/node.rs | 46 +++- .../core/src/scenario/capabilities.rs | 23 -- .../core/src/scenario/control.rs | 38 +++ testing-framework/core/src/scenario/mod.rs | 6 +- .../core/src/topology/deployment.rs | 78 +------ .../core/src/topology/generation.rs | 7 - .../deployers/compose/src/docker/control.rs | 12 +- testing-framework/deployers/local/Cargo.toml | 3 + testing-framework/deployers/local/src/lib.rs | 2 +- .../deployers/local/src/manual/mod.rs | 61 ++++- .../local/src/node_control/config.rs | 18 +- .../deployers/local/src/node_control/mod.rs | 221 +++++++++++++++--- .../deployers/local/src/node_control/state.rs | 7 +- .../deployers/local/src/runner.rs | 47 ++-- .../deployers/local/tests/restart.rs | 67 ++++++ .../workflows/src/workloads/chaos.rs | 20 +- 23 files changed, 507 insertions(+), 192 deletions(-) create mode 100644 testing-framework/core/src/scenario/control.rs create mode 100644 testing-framework/deployers/local/tests/restart.rs diff --git a/Cargo.lock b/Cargo.lock index ea66c15..942da1a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6569,6 +6569,7 @@ dependencies = [ "thiserror 2.0.18", "tokio", "tracing", + "tracing-subscriber 0.3.22", ] [[package]] diff --git a/examples/doc-snippets/src/node_control_accessing_control.rs b/examples/doc-snippets/src/node_control_accessing_control.rs index a7cc27d..f4404f3 100644 --- a/examples/doc-snippets/src/node_control_accessing_control.rs +++ b/examples/doc-snippets/src/node_control_accessing_control.rs @@ -11,8 +11,8 @@ impl Workload for RestartWorkload { async fn start(&self, ctx: &RunContext) -> Result<(), DynError> { if let Some(control) = ctx.node_control() { - // Restart the first node (index 0) if supported. - control.restart_node(0).await?; + // Restart the first node by name if supported. + control.restart_node("node-0").await?; } Ok(()) } diff --git a/examples/doc-snippets/src/node_control_trait.rs b/examples/doc-snippets/src/node_control_trait.rs index 98976ca..6064b80 100644 --- a/examples/doc-snippets/src/node_control_trait.rs +++ b/examples/doc-snippets/src/node_control_trait.rs @@ -3,5 +3,5 @@ use testing_framework_core::scenario::DynError; #[async_trait] pub trait NodeControlHandle: Send + Sync { - async fn restart_node(&self, index: usize) -> Result<(), DynError>; + async fn restart_node(&self, name: &str) -> Result<(), DynError>; } diff --git a/scripts/build/build-bundle.sh b/scripts/build/build-bundle.sh index 4a32ede..87d25a7 100755 --- a/scripts/build/build-bundle.sh +++ b/scripts/build/build-bundle.sh @@ -309,11 +309,14 @@ build_bundle::prepare_circuits() { } build_bundle::build_binaries() { - BUILD_FEATURES_LABEL="all" + BUILD_FEATURES_LABEL="all,pol-dev-mode,verification-keys" echo "==> Building binaries (platform=${PLATFORM})" mkdir -p "${NODE_SRC}" ( cd "${NODE_SRC}" + if [ -d "${NODE_TARGET}" ]; then + rm -rf "${NODE_TARGET}" + fi if [ -n "${LOGOS_BLOCKCHAIN_NODE_PATH}" ]; then echo "Using local logos-blockchain-node checkout at ${NODE_SRC} (no fetch/checkout)" else @@ -326,18 +329,16 @@ build_bundle::build_binaries() { git clean -fdx fi - if [ -z "${LOGOS_BLOCKCHAIN_NODE_PATH}" ]; then - build_bundle::apply_nomos_node_patches "${NODE_SRC}" - fi - unset CARGO_FEATURE_BUILD_VERIFICATION_KEY if [ -n "${BUNDLE_RUSTUP_TOOLCHAIN}" ]; then - RUSTFLAGS='--cfg feature="pol-dev-mode"' \ + RUSTFLAGS='--cfg feature="pol-dev-mode" --cfg feature="build-verification-key"' \ + CARGO_FEATURE_BUILD_VERIFICATION_KEY=1 \ RUSTUP_TOOLCHAIN="${BUNDLE_RUSTUP_TOOLCHAIN}" \ cargo build --all-features \ -p logos-blockchain-node \ --target-dir "${NODE_TARGET}" else - RUSTFLAGS='--cfg feature="pol-dev-mode"' \ + RUSTFLAGS='--cfg feature="pol-dev-mode" --cfg feature="build-verification-key"' \ + CARGO_FEATURE_BUILD_VERIFICATION_KEY=1 \ cargo build --all-features \ -p logos-blockchain-node \ --target-dir "${NODE_TARGET}" diff --git a/scripts/run/run-examples.sh b/scripts/run/run-examples.sh index e4af1c0..f34af21 100755 --- a/scripts/run/run-examples.sh +++ b/scripts/run/run-examples.sh @@ -60,6 +60,7 @@ Environment: LOGOS_BLOCKCHAIN_TESTNET_IMAGE_PULL_POLICY K8s imagePullPolicy (default ${DEFAULT_PULL_POLICY_LOCAL}; set to ${DEFAULT_PULL_POLICY_ECR} for --ecr) LOGOS_BLOCKCHAIN_BINARIES_TAR Path to prebuilt binaries tarball (default .tmp/nomos-binaries--.tar.gz) LOGOS_BLOCKCHAIN_CIRCUITS Directory containing circuits assets (defaults to ~/.logos-blockchain-circuits) + CARGO_FEATURE_BUILD_VERIFICATION_KEY Build flag to embed Groth16 verification keys in node binaries (recommended for host) LOGOS_BLOCKCHAIN_SKIP_IMAGE_BUILD Set to 1 to skip rebuilding the compose/k8s image LOGOS_BLOCKCHAIN_FORCE_IMAGE_BUILD Set to 1 to force image rebuild even for k8s ECR mode LOGOS_BLOCKCHAIN_METRICS_QUERY_URL PromQL base URL for the runner process (optional) @@ -301,8 +302,9 @@ run_examples::bundle_matches_expected() { local tar_path="$1" [ -f "${tar_path}" ] || return 1 [ -z "${LOGOS_BLOCKCHAIN_NODE_REV:-}" ] && return 0 + local expected_features="${RUN_EXAMPLES_EXPECTED_BUNDLE_FEATURES:-all,pol-dev-mode,verification-keys}" - local meta tar_rev tar_head + local meta tar_rev tar_head tar_features meta="$(tar -xOzf "${tar_path}" artifacts/nomos-bundle-meta.env 2>/dev/null || true)" if [ -z "${meta}" ]; then echo "Bundle meta missing in ${tar_path}; treating as stale and rebuilding." >&2 @@ -310,6 +312,11 @@ run_examples::bundle_matches_expected() { fi tar_rev="$(echo "${meta}" | sed -n 's/^nomos_node_rev=//p' | head -n 1)" tar_head="$(echo "${meta}" | sed -n 's/^nomos_node_git_head=//p' | head -n 1)" + tar_features="$(echo "${meta}" | sed -n 's/^features=//p' | head -n 1)" + if [ -n "${expected_features}" ] && [ "${tar_features}" != "${expected_features}" ]; then + echo "Bundle ${tar_path} features '${tar_features}' do not match expected '${expected_features}'; rebuilding." >&2 + return 1 + fi if [ -n "${tar_rev}" ] && [ "${tar_rev}" != "${LOGOS_BLOCKCHAIN_NODE_REV}" ]; then echo "Bundle ${tar_path} is for logos-blockchain-node rev ${tar_rev}, expected ${LOGOS_BLOCKCHAIN_NODE_REV}; rebuilding." >&2 return 1 @@ -501,6 +508,8 @@ run_examples::run() { if [ "${MODE}" = "host" ]; then run_examples::ensure_circuits + # Ensure Groth16 verification keys are embedded when building local node binaries. + export CARGO_FEATURE_BUILD_VERIFICATION_KEY=1 fi echo "==> Running ${BIN} for ${RUN_SECS}s (mode=${MODE}, image=${IMAGE})" diff --git a/testing-framework/core/src/manual.rs b/testing-framework/core/src/manual.rs index 1f8618b..a0fec65 100644 --- a/testing-framework/core/src/manual.rs +++ b/testing-framework/core/src/manual.rs @@ -1,10 +1,10 @@ use async_trait::async_trait; -use crate::scenario::{DynError, StartNodeOptions, StartedNode}; +use crate::scenario::{DynError, NodeControlHandle, StartNodeOptions, StartedNode}; /// Interface for imperative, deployer-backed manual clusters. #[async_trait] -pub trait ManualClusterHandle: Send + Sync { +pub trait ManualClusterHandle: NodeControlHandle { async fn start_node_with( &self, name: &str, diff --git a/testing-framework/core/src/nodes/common/node.rs b/testing-framework/core/src/nodes/common/node.rs index c119edf..79323ce 100644 --- a/testing-framework/core/src/nodes/common/node.rs +++ b/testing-framework/core/src/nodes/common/node.rs @@ -195,7 +195,7 @@ fn write_node_config(config: &C, config_path: &Path) -> Result<(), }) } -fn spawn_node_process( +pub(crate) fn spawn_node_process( binary_path: &Path, config_path: &Path, workdir: &Path, @@ -213,7 +213,9 @@ fn spawn_node_process( }) } -async fn wait_for_consensus_readiness(api: &ApiClient) -> Result<(), time::error::Elapsed> { +pub(crate) async fn wait_for_consensus_readiness( + api: &ApiClient, +) -> Result<(), time::error::Elapsed> { time::timeout(STARTUP_TIMEOUT, async { loop { if api.consensus_info().await.is_ok() { diff --git a/testing-framework/core/src/nodes/node.rs b/testing-framework/core/src/nodes/node.rs index 837e4ea..80035a3 100644 --- a/testing-framework/core/src/nodes/node.rs +++ b/testing-framework/core/src/nodes/node.rs @@ -13,7 +13,10 @@ use crate::{ common::{ binary::{BinaryConfig, BinaryResolver}, lifecycle::{kill::kill_child, monitor::is_running}, - node::{NodeAddresses, NodeConfigCommon, NodeHandle, SpawnNodeError, spawn_node}, + node::{ + NodeAddresses, NodeConfigCommon, NodeHandle, SpawnNodeError, spawn_node, + spawn_node_process, wait_for_consensus_readiness, + }, }, }, scenario::DynError, @@ -21,6 +24,7 @@ use crate::{ }; const BIN_PATH: &str = "target/debug/logos-blockchain-node"; +const RESTART_SHUTDOWN_TIMEOUT: Duration = Duration::from_secs(10); fn binary_path() -> PathBuf { let cfg = BinaryConfig { @@ -75,6 +79,12 @@ impl Drop for Node { } impl Node { + /// Return the current process id for the running node. + #[must_use] + pub fn pid(&self) -> u32 { + self.handle.child.id() + } + /// Check if the node process is still running pub fn is_running(&mut self) -> bool { is_running(&mut self.handle.child) @@ -101,6 +111,40 @@ impl Node { Ok(Self { handle }) } + + /// Restart the node process using the existing config and data directory. + pub async fn restart(&mut self) -> Result<(), SpawnNodeError> { + let old_pid = self.pid(); + debug!(old_pid, "restarting node process"); + + kill_child(&mut self.handle.child); + let _ = self.wait_for_exit(RESTART_SHUTDOWN_TIMEOUT).await; + + let config_path = self.handle.tempdir.path().join("node.yaml"); + let child = spawn_node_process(&binary_path(), &config_path, self.handle.tempdir.path())?; + self.handle.child = child; + + let new_pid = self.pid(); + wait_for_consensus_readiness(&self.handle.api) + .await + .map_err(|source| SpawnNodeError::Readiness { source })?; + + info!( + old_pid, + new_pid, "node restart readiness confirmed via consensus_info" + ); + + Ok(()) + } + + /// Stop the node process without restarting it. + pub async fn stop(&mut self) { + let pid = self.pid(); + debug!(pid, "stopping node process"); + + kill_child(&mut self.handle.child); + let _ = self.wait_for_exit(RESTART_SHUTDOWN_TIMEOUT).await; + } } impl NodeConfigCommon for RunConfig { diff --git a/testing-framework/core/src/scenario/capabilities.rs b/testing-framework/core/src/scenario/capabilities.rs index 1dda452..c0e657f 100644 --- a/testing-framework/core/src/scenario/capabilities.rs +++ b/testing-framework/core/src/scenario/capabilities.rs @@ -1,6 +1,5 @@ use std::sync::Arc; -use async_trait::async_trait; use reqwest::Url; use super::DynError; @@ -84,28 +83,6 @@ impl RequiresNodeControl for ObservabilityCapability { const REQUIRED: bool = false; } -/// Interface exposed by runners that can restart nodes at runtime. -#[async_trait] -pub trait NodeControlHandle: Send + Sync { - async fn restart_node(&self, index: usize) -> Result<(), DynError>; - - async fn start_node(&self, _name: &str) -> Result { - Err("start_node not supported by this deployer".into()) - } - - async fn start_node_with( - &self, - _name: &str, - _options: StartNodeOptions, - ) -> Result { - Err("start_node_with not supported by this deployer".into()) - } - - fn node_client(&self, _name: &str) -> Option { - None - } -} - #[derive(Clone)] pub struct StartedNode { pub name: String, diff --git a/testing-framework/core/src/scenario/control.rs b/testing-framework/core/src/scenario/control.rs new file mode 100644 index 0000000..682937d --- /dev/null +++ b/testing-framework/core/src/scenario/control.rs @@ -0,0 +1,38 @@ +use async_trait::async_trait; + +use crate::{ + nodes::ApiClient, + scenario::{DynError, StartNodeOptions, StartedNode}, +}; + +/// Deployer-agnostic control surface for runtime node operations. +#[async_trait] +pub trait NodeControlHandle: Send + Sync { + async fn restart_node(&self, _name: &str) -> Result<(), DynError> { + Err("restart_node not supported by this deployer".into()) + } + + async fn start_node(&self, _name: &str) -> Result { + Err("start_node not supported by this deployer".into()) + } + + async fn start_node_with( + &self, + _name: &str, + _options: StartNodeOptions, + ) -> Result { + Err("start_node_with not supported by this deployer".into()) + } + + async fn stop_node(&self, _name: &str) -> Result<(), DynError> { + Err("stop_node not supported by this deployer".into()) + } + + fn node_client(&self, _name: &str) -> Option { + None + } + + fn node_pid(&self, _name: &str) -> Option { + None + } +} diff --git a/testing-framework/core/src/scenario/mod.rs b/testing-framework/core/src/scenario/mod.rs index 47c7de3..6e348c6 100644 --- a/testing-framework/core/src/scenario/mod.rs +++ b/testing-framework/core/src/scenario/mod.rs @@ -2,6 +2,7 @@ mod capabilities; pub mod cfgsync; +mod control; mod definition; mod expectation; pub mod http_probe; @@ -12,9 +13,10 @@ mod workload; pub type DynError = Box; pub use capabilities::{ - NodeControlCapability, NodeControlHandle, ObservabilityCapability, PeerSelection, - RequiresNodeControl, StartNodeOptions, StartedNode, + NodeControlCapability, ObservabilityCapability, PeerSelection, RequiresNodeControl, + StartNodeOptions, StartedNode, }; +pub use control::NodeControlHandle; pub use definition::{ Builder, Scenario, ScenarioBuildError, ScenarioBuilder, TopologyConfigurator, }; diff --git a/testing-framework/core/src/topology/deployment.rs b/testing-framework/core/src/topology/deployment.rs index bb3aa0b..360e698 100644 --- a/testing-framework/core/src/topology/deployment.rs +++ b/testing-framework/core/src/topology/deployment.rs @@ -1,16 +1,9 @@ use std::collections::HashSet; -use thiserror::Error; - use crate::{ - nodes::{ - common::node::SpawnNodeError, - node::{Node, apply_node_config_patch, create_node_config}, - }, - scenario, + nodes::node::Node, topology::{ - config::{TopologyBuildError, TopologyBuilder, TopologyConfig}, - generation::{GeneratedNodeConfig, find_expected_peer_counts}, + generation::find_expected_peer_counts, readiness::{NetworkReadiness, ReadinessCheck, ReadinessError}, utils::multiaddr_port, }, @@ -21,65 +14,11 @@ pub struct Topology { pub(crate) nodes: Vec, } -pub type DeployedNodes = Vec; - -#[derive(Debug, Error)] -pub enum SpawnTopologyError { - #[error(transparent)] - Build(#[from] TopologyBuildError), - #[error(transparent)] - Node(#[from] SpawnNodeError), - #[error("node config patch failed for node-{index}: {source}")] - ConfigPatch { - index: usize, - source: scenario::DynError, - }, -} - impl Topology { - pub async fn spawn(config: TopologyConfig) -> Result { - let generated = TopologyBuilder::new(config.clone()).build()?; - let nodes = Self::spawn_nodes(generated.nodes()).await?; - - Ok(Self { nodes }) - } - - pub async fn spawn_with_empty_membership( - config: TopologyConfig, - ids: &[[u8; 32]], - blend_ports: &[u16], - ) -> Result { - let generated = TopologyBuilder::new(config.clone()) - .with_ids(ids.to_vec()) - .with_blend_ports(blend_ports.to_vec()) - .build()?; - - let nodes = Self::spawn_nodes(generated.nodes()).await?; - - Ok(Self { nodes }) - } - - pub(crate) async fn spawn_nodes( - nodes: &[GeneratedNodeConfig], - ) -> Result { - let mut spawned = Vec::new(); - for node in nodes { - let mut config = create_node_config(node.general.clone()); - - if let Some(patch) = node.config_patch.as_ref() { - config = apply_node_config_patch(config, patch).map_err(|source| { - SpawnTopologyError::ConfigPatch { - index: node.index, - source, - } - })?; - } - - let label = format!("node-{}", node.index); - spawned.push(Node::spawn(config, &label).await?); - } - - Ok(spawned) + /// Construct a topology from already-spawned nodes. + #[must_use] + pub fn from_nodes(nodes: Vec) -> Self { + Self { nodes } } #[must_use] @@ -87,6 +26,11 @@ impl Topology { &self.nodes } + #[must_use] + pub fn into_nodes(self) -> Vec { + self.nodes + } + pub async fn wait_network_ready(&self) -> Result<(), ReadinessError> { let listen_ports = self.node_listen_ports(); if listen_ports.len() <= 1 { diff --git a/testing-framework/core/src/topology/generation.rs b/testing-framework/core/src/topology/generation.rs index 270e4f3..3ea2b2d 100644 --- a/testing-framework/core/src/topology/generation.rs +++ b/testing-framework/core/src/topology/generation.rs @@ -5,7 +5,6 @@ use reqwest::{Client, Url}; use crate::topology::{ config::{NodeConfigPatch, TopologyConfig}, configs::{GeneralConfig, wallet::WalletAccount}, - deployment::{SpawnTopologyError, Topology}, readiness::{HttpNetworkReadiness, ReadinessCheck, ReadinessError}, }; @@ -82,12 +81,6 @@ impl GeneratedTopology { &self.config.wallet_config.accounts } - pub async fn spawn_local(&self) -> Result { - let nodes = Topology::spawn_nodes(self.nodes()).await?; - - Ok(Topology { nodes }) - } - pub async fn wait_remote_readiness( &self, // Node endpoints diff --git a/testing-framework/deployers/compose/src/docker/control.rs b/testing-framework/deployers/compose/src/docker/control.rs index 4a27e02..24d924f 100644 --- a/testing-framework/deployers/compose/src/docker/control.rs +++ b/testing-framework/deployers/compose/src/docker/control.rs @@ -45,13 +45,9 @@ pub struct ComposeNodeControl { #[async_trait::async_trait] impl NodeControlHandle for ComposeNodeControl { - async fn restart_node(&self, index: usize) -> Result<(), DynError> { - restart_compose_service( - &self.compose_file, - &self.project_name, - &format!("node-{index}"), - ) - .await - .map_err(|err| format!("node restart failed: {err}").into()) + async fn restart_node(&self, name: &str) -> Result<(), DynError> { + restart_compose_service(&self.compose_file, &self.project_name, name) + .await + .map_err(|err| format!("node restart failed: {err}").into()) } } diff --git a/testing-framework/deployers/local/Cargo.toml b/testing-framework/deployers/local/Cargo.toml index 46e9b56..32b895a 100644 --- a/testing-framework/deployers/local/Cargo.toml +++ b/testing-framework/deployers/local/Cargo.toml @@ -24,3 +24,6 @@ testing-framework-core = { path = "../../core" } thiserror = { workspace = true } tokio = { workspace = true } tracing = { workspace = true } + +[dev-dependencies] +tracing-subscriber = "0.3" diff --git a/testing-framework/deployers/local/src/lib.rs b/testing-framework/deployers/local/src/lib.rs index 7bb7b39..a9379bf 100644 --- a/testing-framework/deployers/local/src/lib.rs +++ b/testing-framework/deployers/local/src/lib.rs @@ -3,5 +3,5 @@ mod node_control; mod runner; pub use manual::{LocalManualCluster, ManualClusterError}; -pub use node_control::{LocalDynamicError, LocalDynamicNodes, LocalDynamicSeed}; +pub use node_control::{LocalNodeManager, LocalNodeManagerError, LocalNodeManagerSeed}; pub use runner::{LocalDeployer, LocalDeployerError}; diff --git a/testing-framework/deployers/local/src/manual/mod.rs b/testing-framework/deployers/local/src/manual/mod.rs index f935065..51a75bf 100644 --- a/testing-framework/deployers/local/src/manual/mod.rs +++ b/testing-framework/deployers/local/src/manual/mod.rs @@ -1,7 +1,7 @@ use testing_framework_core::{ manual::ManualClusterHandle, nodes::ApiClient, - scenario::{DynError, StartNodeOptions, StartedNode}, + scenario::{DynError, NodeControlHandle, StartNodeOptions, StartedNode}, topology::{ config::{TopologyBuildError, TopologyBuilder, TopologyConfig}, readiness::{ReadinessCheck, ReadinessError}, @@ -9,7 +9,7 @@ use testing_framework_core::{ }; use thiserror::Error; -use crate::node_control::{LocalDynamicError, LocalDynamicNodes, ReadinessNode}; +use crate::node_control::{LocalNodeManager, LocalNodeManagerError, ReadinessNode}; mod readiness; @@ -23,12 +23,12 @@ pub enum ManualClusterError { source: TopologyBuildError, }, #[error(transparent)] - Dynamic(#[from] LocalDynamicError), + Dynamic(#[from] LocalNodeManagerError), } /// Imperative, in-process cluster that can start nodes on demand. pub struct LocalManualCluster { - nodes: LocalDynamicNodes, + nodes: LocalNodeManager, } impl LocalManualCluster { @@ -37,7 +37,7 @@ impl LocalManualCluster { let descriptors = builder .build() .map_err(|source| ManualClusterError::Build { source })?; - let nodes = LocalDynamicNodes::new( + let nodes = LocalNodeManager::new( descriptors, testing_framework_core::scenario::NodeClients::default(), ); @@ -49,6 +49,11 @@ impl LocalManualCluster { self.nodes.node_client(name) } + #[must_use] + pub fn node_pid(&self, name: &str) -> Option { + self.nodes.node_pid(name) + } + pub async fn start_node(&self, name: &str) -> Result { Ok(self .nodes @@ -68,6 +73,14 @@ impl LocalManualCluster { self.nodes.stop_all(); } + pub async fn restart_node(&self, name: &str) -> Result<(), ManualClusterError> { + Ok(self.nodes.restart_node(name).await?) + } + + pub async fn stop_node(&self, name: &str) -> Result<(), ManualClusterError> { + Ok(self.nodes.stop_node(name).await?) + } + pub async fn wait_network_ready(&self) -> Result<(), ReadinessError> { let nodes = self.nodes.readiness_nodes(); if self.is_singleton(&nodes) { @@ -92,6 +105,44 @@ impl Drop for LocalManualCluster { } } +#[async_trait::async_trait] +impl NodeControlHandle for LocalManualCluster { + async fn restart_node(&self, name: &str) -> Result<(), DynError> { + self.nodes + .restart_node(name) + .await + .map_err(|err| err.into()) + } + + async fn stop_node(&self, name: &str) -> Result<(), DynError> { + self.nodes.stop_node(name).await.map_err(|err| err.into()) + } + + async fn start_node(&self, name: &str) -> Result { + self.start_node_with(name, StartNodeOptions::default()) + .await + .map_err(|err| err.into()) + } + + async fn start_node_with( + &self, + name: &str, + options: StartNodeOptions, + ) -> Result { + self.start_node_with(name, options) + .await + .map_err(|err| err.into()) + } + + fn node_client(&self, name: &str) -> Option { + self.node_client(name) + } + + fn node_pid(&self, name: &str) -> Option { + self.node_pid(name) + } +} + #[async_trait::async_trait] impl ManualClusterHandle for LocalManualCluster { async fn start_node_with( diff --git a/testing-framework/deployers/local/src/node_control/config.rs b/testing-framework/deployers/local/src/node_control/config.rs index 28673f2..8fe9aec 100644 --- a/testing-framework/deployers/local/src/node_control/config.rs +++ b/testing-framework/deployers/local/src/node_control/config.rs @@ -8,7 +8,7 @@ use testing_framework_config::topology::configs::{ runtime::{build_general_config_for_node, build_initial_peers}, time::GeneralTimeConfig, }; -use testing_framework_core::{ +pub(crate) use testing_framework_core::{ scenario::{PeerSelection, StartNodeOptions}, topology::{ config::{NodeConfigPatch, TopologyConfig}, @@ -17,7 +17,7 @@ use testing_framework_core::{ }, }; -use super::LocalDynamicError; +use super::LocalNodeManagerError; pub(super) fn build_general_config_for( descriptors: &GeneratedTopology, @@ -27,7 +27,7 @@ pub(super) fn build_general_config_for( peer_ports_by_name: &HashMap, options: &StartNodeOptions, peer_ports: &[u16], -) -> Result<(GeneralConfig, u16, Option), LocalDynamicError> { +) -> Result<(GeneralConfig, u16, Option), LocalNodeManagerError> { if let Some(node) = descriptor_for(descriptors, index) { let mut config = node.general.clone(); let initial_peers = resolve_initial_peers( @@ -59,7 +59,7 @@ pub(super) fn build_general_config_for( base_consensus, base_time, ) - .map_err(|source| LocalDynamicError::Config { source })?; + .map_err(|source| LocalNodeManagerError::Config { source })?; Ok((general_config, network_port, None)) } @@ -71,13 +71,13 @@ fn descriptor_for(descriptors: &GeneratedTopology, index: usize) -> Option<&Gene fn resolve_peer_names( peer_ports_by_name: &HashMap, peer_names: &[String], -) -> Result, LocalDynamicError> { +) -> Result, LocalNodeManagerError> { let mut peers = Vec::with_capacity(peer_names.len()); for name in peer_names { let port = peer_ports_by_name .get(name) - .ok_or_else(|| LocalDynamicError::InvalidArgument { + .ok_or_else(|| LocalNodeManagerError::InvalidArgument { message: format!("unknown peer name '{name}'"), })?; peers.push(testing_framework_config::node_address_from_port(*port)); @@ -91,7 +91,7 @@ fn resolve_initial_peers( default_peers: &[Multiaddr], descriptors: &GeneratedTopology, peer_ports: &[u16], -) -> Result, LocalDynamicError> { +) -> Result, LocalNodeManagerError> { match &options.peers { PeerSelection::Named(names) => resolve_peer_names(peer_ports_by_name, names), PeerSelection::DefaultLayout => { @@ -112,8 +112,8 @@ fn random_node_id() -> [u8; 32] { id } -fn allocate_udp_port(label: &'static str) -> Result { - get_available_udp_port().ok_or_else(|| LocalDynamicError::PortAllocation { +fn allocate_udp_port(label: &'static str) -> Result { + get_available_udp_port().ok_or_else(|| LocalNodeManagerError::PortAllocation { message: format!("failed to allocate free UDP port for {label}"), }) } diff --git a/testing-framework/deployers/local/src/node_control/mod.rs b/testing-framework/deployers/local/src/node_control/mod.rs index b3978a4..b3b9846 100644 --- a/testing-framework/deployers/local/src/node_control/mod.rs +++ b/testing-framework/deployers/local/src/node_control/mod.rs @@ -12,6 +12,7 @@ use testing_framework_core::{ }, scenario::{DynError, NodeControlHandle, StartNodeOptions, StartedNode}, topology::{ + deployment::Topology, generation::{GeneratedTopology, find_expected_peer_counts}, utils::multiaddr_port, }, @@ -22,11 +23,11 @@ mod config; mod state; use config::build_general_config_for; -use state::LocalDynamicState; +use state::LocalNodeManagerState; use testing_framework_core::scenario::NodeClients; #[derive(Debug, Error)] -pub enum LocalDynamicError { +pub enum LocalNodeManagerError { #[error("failed to generate node config: {source}")] Config { #[source] @@ -43,25 +44,32 @@ pub enum LocalDynamicError { PortAllocation { message: String }, #[error("node config patch failed: {message}")] ConfigPatch { message: String }, + #[error("node name '{name}' is unknown")] + NodeName { name: String }, + #[error("failed to restart node: {source}")] + Restart { + #[source] + source: testing_framework_core::nodes::common::node::SpawnNodeError, + }, } -pub struct LocalDynamicNodes { +pub struct LocalNodeManager { descriptors: GeneratedTopology, base_consensus: consensus::GeneralConsensusConfig, base_time: time::GeneralTimeConfig, node_clients: NodeClients, - seed: LocalDynamicSeed, - state: Mutex, + seed: LocalNodeManagerSeed, + state: Mutex, } #[derive(Clone, Default)] -pub struct LocalDynamicSeed { +pub struct LocalNodeManagerSeed { pub node_count: usize, pub peer_ports: Vec, pub peer_ports_by_name: HashMap, } -impl LocalDynamicSeed { +impl LocalNodeManagerSeed { #[must_use] pub fn from_topology(descriptors: &GeneratedTopology) -> Self { let peer_ports = descriptors @@ -90,15 +98,39 @@ pub(crate) struct ReadinessNode { pub(crate) api: ApiClient, } -impl LocalDynamicNodes { +impl LocalNodeManager { + fn default_label(index: usize) -> String { + format!("node-{index}") + } + + pub async fn spawn_initial_nodes( + descriptors: &GeneratedTopology, + ) -> Result, testing_framework_core::nodes::common::node::SpawnNodeError> { + let mut nodes = Vec::with_capacity(descriptors.nodes().len()); + for node in descriptors.nodes() { + let label = Self::default_label(node.index()); + let config = create_node_config(node.general.clone()); + let spawned = Node::spawn(config, &label).await?; + nodes.push(spawned); + } + + Ok(nodes) + } + + pub async fn spawn_initial_topology( + descriptors: &GeneratedTopology, + ) -> Result { + let nodes = Self::spawn_initial_nodes(descriptors).await?; + Ok(Topology::from_nodes(nodes)) + } pub fn new(descriptors: GeneratedTopology, node_clients: NodeClients) -> Self { - Self::new_with_seed(descriptors, node_clients, LocalDynamicSeed::default()) + Self::new_with_seed(descriptors, node_clients, LocalNodeManagerSeed::default()) } pub fn new_with_seed( descriptors: GeneratedTopology, node_clients: NodeClients, - seed: LocalDynamicSeed, + seed: LocalNodeManagerSeed, ) -> Self { let base_node = descriptors .nodes() @@ -108,11 +140,12 @@ impl LocalDynamicNodes { let base_consensus = base_node.general.consensus_config.clone(); let base_time = base_node.general.time_config.clone(); - let state = LocalDynamicState { + let state = LocalNodeManagerState { node_count: seed.node_count, peer_ports: seed.peer_ports.clone(), peer_ports_by_name: seed.peer_ports_by_name.clone(), clients_by_name: HashMap::new(), + indices_by_name: HashMap::new(), nodes: Vec::new(), }; @@ -136,6 +169,22 @@ impl LocalDynamicNodes { state.clients_by_name.get(name).cloned() } + #[must_use] + pub fn node_pid(&self, name: &str) -> Option { + let mut state = self + .state + .lock() + .unwrap_or_else(|poisoned| poisoned.into_inner()); + + let index = *state.indices_by_name.get(name)?; + let node = state.nodes.get_mut(index)?; + if node.is_running() { + Some(node.pid()) + } else { + None + } + } + pub fn stop_all(&self) { let mut state = self .state @@ -148,15 +197,46 @@ impl LocalDynamicNodes { .peer_ports_by_name .clone_from(&self.seed.peer_ports_by_name); state.clients_by_name.clear(); + state.indices_by_name.clear(); state.node_count = self.seed.node_count; self.node_clients.clear(); } + pub fn initialize_with_nodes(&self, nodes: Vec) { + self.node_clients.clear(); + + let mut state = self + .state + .lock() + .unwrap_or_else(|poisoned| poisoned.into_inner()); + + state.nodes.clear(); + state.peer_ports.clear(); + state.peer_ports_by_name.clear(); + state.clients_by_name.clear(); + state.indices_by_name.clear(); + state.node_count = 0; + + for (idx, node) in nodes.into_iter().enumerate() { + let name = Self::default_label(idx); + let port = node.config().user.network.backend.swarm.port; + let client = node.api().clone(); + + self.node_clients.add_node(client.clone()); + state.register_node(&name, port, client, node); + } + } + + #[must_use] + pub fn node_clients(&self) -> NodeClients { + self.node_clients.clone() + } + pub async fn start_node_with( &self, name: &str, options: StartNodeOptions, - ) -> Result { + ) -> Result { self.start_node(name, options).await } @@ -208,7 +288,7 @@ impl LocalDynamicNodes { &self, name: &str, options: StartNodeOptions, - ) -> Result { + ) -> Result { let (peer_ports, peer_ports_by_name, node_name, index) = { let state = self .state @@ -217,13 +297,15 @@ impl LocalDynamicNodes { let index = state.node_count; let label = if name.trim().is_empty() { - format!("node-{index}") + Self::default_label(index) + } else if name.starts_with("node-") { + name.to_string() } else { format!("node-{name}") }; if state.peer_ports_by_name.contains_key(&label) { - return Err(LocalDynamicError::InvalidArgument { + return Err(LocalNodeManagerError::InvalidArgument { message: format!("node name '{label}' already exists"), }); } @@ -262,15 +344,94 @@ impl LocalDynamicNodes { }) } + pub async fn restart_node(&self, name: &str) -> Result<(), LocalNodeManagerError> { + let (index, mut node) = { + let mut state = self + .state + .lock() + .unwrap_or_else(|poisoned| poisoned.into_inner()); + + let Some(index) = state.indices_by_name.get(name).copied() else { + return Err(LocalNodeManagerError::NodeName { + name: name.to_string(), + }); + }; + + if index >= state.nodes.len() { + return Err(LocalNodeManagerError::NodeName { + name: name.to_string(), + }); + } + + let node = state.nodes.remove(index); + (index, node) + }; + + node.restart() + .await + .map_err(|source| LocalNodeManagerError::Restart { source })?; + + let mut state = self + .state + .lock() + .unwrap_or_else(|poisoned| poisoned.into_inner()); + + if index <= state.nodes.len() { + state.nodes.insert(index, node); + } else { + state.nodes.push(node); + } + + Ok(()) + } + + pub async fn stop_node(&self, name: &str) -> Result<(), LocalNodeManagerError> { + let (index, mut node) = { + let mut state = self + .state + .lock() + .unwrap_or_else(|poisoned| poisoned.into_inner()); + + let Some(index) = state.indices_by_name.get(name).copied() else { + return Err(LocalNodeManagerError::NodeName { + name: name.to_string(), + }); + }; + + if index >= state.nodes.len() { + return Err(LocalNodeManagerError::NodeName { + name: name.to_string(), + }); + } + + let node = state.nodes.remove(index); + (index, node) + }; + + node.stop().await; + + let mut state = self + .state + .lock() + .unwrap_or_else(|poisoned| poisoned.into_inner()); + + if index <= state.nodes.len() { + state.nodes.insert(index, node); + } else { + state.nodes.push(node); + } + Ok(()) + } + async fn spawn_and_register_node( &self, node_name: &str, network_port: u16, config: RunConfig, - ) -> Result { + ) -> Result { let node = Node::spawn(config, node_name) .await - .map_err(|source| LocalDynamicError::Spawn { source })?; + .map_err(|source| LocalNodeManagerError::Spawn { source })?; let client = node.api().clone(); self.node_clients.add_node(client.clone()); @@ -288,9 +449,9 @@ impl LocalDynamicNodes { fn build_node_config( general_config: testing_framework_config::topology::configs::GeneralConfig, - descriptor_patch: Option<&testing_framework_core::topology::config::NodeConfigPatch>, - options_patch: Option<&testing_framework_core::topology::config::NodeConfigPatch>, -) -> Result { + descriptor_patch: Option<&config::NodeConfigPatch>, + options_patch: Option<&config::NodeConfigPatch>, +) -> Result { let mut config = create_node_config(general_config); config = apply_patch_if_needed(config, descriptor_patch)?; config = apply_patch_if_needed(config, options_patch)?; @@ -300,21 +461,25 @@ fn build_node_config( fn apply_patch_if_needed( config: RunConfig, - patch: Option<&testing_framework_core::topology::config::NodeConfigPatch>, -) -> Result { + patch: Option<&config::NodeConfigPatch>, +) -> Result { let Some(patch) = patch else { return Ok(config); }; - apply_node_config_patch(config, patch).map_err(|err| LocalDynamicError::ConfigPatch { + apply_node_config_patch(config, patch).map_err(|err| LocalNodeManagerError::ConfigPatch { message: err.to_string(), }) } #[async_trait::async_trait] -impl NodeControlHandle for LocalDynamicNodes { - async fn restart_node(&self, _index: usize) -> Result<(), DynError> { - Err("local deployer does not support restart_node".into()) +impl NodeControlHandle for LocalNodeManager { + async fn restart_node(&self, name: &str) -> Result<(), DynError> { + self.restart_node(name).await.map_err(|err| err.into()) + } + + async fn stop_node(&self, name: &str) -> Result<(), DynError> { + self.stop_node(name).await.map_err(|err| err.into()) } async fn start_node(&self, name: &str) -> Result { @@ -336,4 +501,8 @@ impl NodeControlHandle for LocalDynamicNodes { fn node_client(&self, name: &str) -> Option { self.node_client(name) } + + fn node_pid(&self, name: &str) -> Option { + self.node_pid(name) + } } diff --git a/testing-framework/deployers/local/src/node_control/state.rs b/testing-framework/deployers/local/src/node_control/state.rs index 4eb03f8..81fa525 100644 --- a/testing-framework/deployers/local/src/node_control/state.rs +++ b/testing-framework/deployers/local/src/node_control/state.rs @@ -2,15 +2,16 @@ use std::collections::HashMap; use testing_framework_core::nodes::{ApiClient, node::Node}; -pub(crate) struct LocalDynamicState { +pub(crate) struct LocalNodeManagerState { pub(crate) node_count: usize, pub(crate) peer_ports: Vec, pub(crate) peer_ports_by_name: HashMap, pub(crate) clients_by_name: HashMap, + pub(crate) indices_by_name: HashMap, pub(crate) nodes: Vec, } -impl LocalDynamicState { +impl LocalNodeManagerState { fn register_common(&mut self, node_name: &str, network_port: u16, client: ApiClient) { self.peer_ports.push(network_port); self.peer_ports_by_name @@ -26,6 +27,8 @@ impl LocalDynamicState { node: Node, ) { self.register_common(node_name, network_port, client); + let index = self.nodes.len(); + self.indices_by_name.insert(node_name.to_string(), index); self.node_count += 1; self.nodes.push(node); } diff --git a/testing-framework/deployers/local/src/runner.rs b/testing-framework/deployers/local/src/runner.rs index 98b467b..cfbb7d9 100644 --- a/testing-framework/deployers/local/src/runner.rs +++ b/testing-framework/deployers/local/src/runner.rs @@ -2,22 +2,19 @@ use std::sync::Arc; use async_trait::async_trait; use testing_framework_core::{ + nodes::common::node::SpawnNodeError, scenario::{ BlockFeed, BlockFeedTask, Deployer, DynError, Metrics, NodeClients, NodeControlCapability, RunContext, Runner, Scenario, ScenarioError, spawn_block_feed, }, - topology::{ - config::TopologyConfig, - deployment::{SpawnTopologyError, Topology}, - readiness::ReadinessError, - }, + topology::{config::TopologyConfig, deployment::Topology, readiness::ReadinessError}, }; use thiserror::Error; use tracing::{debug, info}; use crate::{ manual::{LocalManualCluster, ManualClusterError}, - node_control::{LocalDynamicNodes, LocalDynamicSeed}, + node_control::{LocalNodeManager, LocalNodeManagerSeed}, }; /// Spawns nodes as local processes, reusing the existing /// integration harness. @@ -32,7 +29,7 @@ pub enum LocalDeployerError { #[error("failed to spawn local topology: {source}")] Spawn { #[source] - source: SpawnTopologyError, + source: SpawnNodeError, }, #[error("readiness probe failed: {source}")] ReadinessFailed { @@ -103,19 +100,39 @@ impl Deployer for LocalDeployer { "starting local deployment with node control" ); - let topology = Self::prepare_topology(scenario, self.membership_check).await?; - let node_clients = NodeClients::from_topology(scenario.topology(), &topology); - let node_control = Arc::new(LocalDynamicNodes::new_with_seed( + let mut nodes = LocalNodeManager::spawn_initial_nodes(scenario.topology()) + .await + .map_err(|source| LocalDeployerError::Spawn { source })?; + + if self.membership_check { + let topology = Topology::from_nodes(nodes); + + wait_for_readiness(&topology).await.map_err(|source| { + debug!(error = ?source, "local readiness failed"); + LocalDeployerError::ReadinessFailed { source } + })?; + + nodes = topology.into_nodes(); + + info!("local nodes are ready"); + } else { + info!("skipping local membership readiness checks"); + } + + let node_control = Arc::new(LocalNodeManager::new_with_seed( scenario.topology().clone(), - node_clients.clone(), - LocalDynamicSeed::from_topology(scenario.topology()), + NodeClients::default(), + LocalNodeManagerSeed::from_topology(scenario.topology()), )); + node_control.initialize_with_nodes(nodes); + let node_clients = node_control.node_clients(); + let (block_feed, block_feed_guard) = spawn_block_feed_with(&node_clients).await?; let context = RunContext::new( scenario.topology().clone(), - Some(topology), + None, node_clients, scenario.duration(), Metrics::empty(), @@ -158,9 +175,7 @@ impl LocalDeployer { info!(nodes = descriptors.nodes().len(), "spawning local nodes"); - let topology = descriptors - .clone() - .spawn_local() + let topology = LocalNodeManager::spawn_initial_topology(descriptors) .await .map_err(|source| LocalDeployerError::Spawn { source })?; diff --git a/testing-framework/deployers/local/tests/restart.rs b/testing-framework/deployers/local/tests/restart.rs new file mode 100644 index 0000000..a16ee50 --- /dev/null +++ b/testing-framework/deployers/local/tests/restart.rs @@ -0,0 +1,67 @@ +use std::time::Duration; + +use testing_framework_core::{ + scenario::{Deployer, ScenarioBuilder}, + topology::config::TopologyConfig, +}; +use testing_framework_runner_local::LocalDeployer; +use tracing_subscriber::fmt::try_init; + +#[tokio::test] +#[ignore = "requires local node binary and open ports"] +async fn local_restart_node() -> Result<(), Box> { + let _ = try_init(); + let mut scenario = ScenarioBuilder::topology_with(|t| t.nodes(1)) + .enable_node_control() + .with_run_duration(Duration::from_secs(1)) + .build()?; + + let deployer = LocalDeployer::default(); + let runner = deployer.deploy(&scenario).await?; + let context = runner.context(); + + let control = context.node_control().ok_or("node control not available")?; + + let node_name = "node-0"; + let old_pid = control.node_pid(node_name).ok_or("missing node pid")?; + + control.restart_node(node_name).await?; + + let new_pid = control.node_pid(node_name).ok_or("missing node pid")?; + assert_ne!(old_pid, new_pid, "expected a new process after restart"); + + control.stop_node(node_name).await?; + assert!( + control.node_pid(node_name).is_none(), + "expected node pid to be absent after stop" + ); + + let _handle = runner.run(&mut scenario).await?; + + Ok(()) +} + +#[tokio::test] +#[ignore = "requires local node binary and open ports"] +async fn manual_cluster_restart_node() -> Result<(), Box> { + let _ = try_init(); + let deployer = LocalDeployer::default(); + let cluster = deployer.manual_cluster(TopologyConfig::with_node_numbers(1))?; + + let node_name = cluster.start_node("a").await?.name; + + let old_pid = cluster.node_pid(&node_name).ok_or("missing node pid")?; + + cluster.restart_node(&node_name).await?; + + let new_pid = cluster.node_pid(&node_name).ok_or("missing node pid")?; + assert_ne!(old_pid, new_pid, "expected a new process after restart"); + + cluster.stop_node(&node_name).await?; + assert!( + cluster.node_pid(&node_name).is_none(), + "expected node pid to be absent after stop" + ); + + Ok(()) +} diff --git a/testing-framework/workflows/src/workloads/chaos.rs b/testing-framework/workflows/src/workloads/chaos.rs index b964152..20c7afe 100644 --- a/testing-framework/workflows/src/workloads/chaos.rs +++ b/testing-framework/workflows/src/workloads/chaos.rs @@ -44,7 +44,7 @@ impl RandomRestartWorkload { if self.include_nodes { if node_count > 1 { for index in 0..node_count { - targets.push(Target::Node(index)); + targets.push(Target::Node(format!("node-{index}"))); } } else if node_count == 1 { info!("chaos restart skipping nodes: only one node configured"); @@ -76,7 +76,7 @@ impl RandomRestartWorkload { let ready = now.checked_sub(self.target_cooldown).unwrap_or(now); targets .iter() - .copied() + .cloned() .map(|target| (target, ready)) .collect() } @@ -111,16 +111,16 @@ impl RandomRestartWorkload { let available: Vec = targets .iter() - .copied() + .cloned() .filter(|target| cooldowns.get(target).is_none_or(|ready| *ready <= now)) .collect(); - if let Some(choice) = available.choose(&mut thread_rng()).copied() { + if let Some(choice) = available.choose(&mut thread_rng()).cloned() { tracing::debug!(?choice, "chaos restart picked target"); return Ok(choice); } - if let Some(choice) = targets.choose(&mut thread_rng()).copied() { + if let Some(choice) = targets.choose(&mut thread_rng()).cloned() { return Ok(choice); } return Err("chaos restart workload has no eligible targets".into()); @@ -158,10 +158,10 @@ impl Workload for RandomRestartWorkload { let target = self.pick_target(&targets, &cooldowns).await?; match target { - Target::Node(index) => { - tracing::info!(index, "chaos restarting node"); + Target::Node(ref name) => { + tracing::info!(name, "chaos restarting node"); handle - .restart_node(index) + .restart_node(name) .await .map_err(|err| format!("node restart failed: {err}"))? } @@ -172,7 +172,7 @@ impl Workload for RandomRestartWorkload { } } -#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)] +#[derive(Clone, PartialEq, Eq, Hash, Debug)] enum Target { - Node(usize), + Node(String), } From 4ac5d07c674445b0482a05a909f44f77fa49e760 Mon Sep 17 00:00:00 2001 From: andrussal Date: Sun, 1 Feb 2026 08:10:12 +0100 Subject: [PATCH 04/11] Add orphan manual cluster test utilities --- examples/Cargo.toml | 2 + examples/tests/orphan_manual_cluster.rs | 111 ++++++++++++++++++ .../deployers/local/src/manual/mod.rs | 10 +- .../deployers/local/src/runner.rs | 14 ++- testing-framework/workflows/src/lib.rs | 2 + testing-framework/workflows/src/manual.rs | 76 ++++++++++++ 6 files changed, 212 insertions(+), 3 deletions(-) create mode 100644 examples/tests/orphan_manual_cluster.rs create mode 100644 testing-framework/workflows/src/manual.rs diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 44bbca2..7fb410b 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -23,5 +23,7 @@ tracing-subscriber = { features = ["env-filter", "fmt"], version = [dev-dependencies] async-trait = { workspace = true } +[features] + [lints] workspace = true diff --git a/examples/tests/orphan_manual_cluster.rs b/examples/tests/orphan_manual_cluster.rs new file mode 100644 index 0000000..f6243d5 --- /dev/null +++ b/examples/tests/orphan_manual_cluster.rs @@ -0,0 +1,111 @@ +use std::time::Duration; + +use anyhow::{Result, anyhow}; +use testing_framework_core::{ + scenario::StartNodeOptions, + topology::{ + config::{TopologyBuilder, TopologyConfig}, + configs::network::Libp2pNetworkLayout, + }, +}; +use testing_framework_runner_local::LocalDeployer; +use testing_framework_workflows::{start_node_with_timeout, wait_for_min_height}; +use tokio::time::{sleep, timeout}; +use tracing_subscriber::fmt::try_init; + +const MIN_HEIGHT: u64 = 5; +const INITIAL_READY_TIMEOUT: Duration = Duration::from_secs(500); +const CATCH_UP_TIMEOUT: Duration = Duration::from_secs(300); +const START_NODE_TIMEOUT: Duration = Duration::from_secs(90); +const TEST_TIMEOUT: Duration = Duration::from_secs(600); +const POLL_INTERVAL: Duration = Duration::from_secs(1); + +#[tokio::test] +#[ignore = "run manually with `cargo test -p runner-examples -- --ignored orphan_manual_cluster`"] +async fn orphan_manual_cluster() -> Result<()> { + let _ = try_init(); + // Required env vars (set on the command line when running this test): + // - `POL_PROOF_DEV_MODE=true` + // - `LOGOS_BLOCKCHAIN_NODE_BIN=...` + // - `NOMOS_KZGRS_PARAMS_PATH=...` (path to KZG params directory/file) + // - `RUST_LOG=info` (optional; better visibility) + + let config = TopologyConfig::with_node_numbers(3); + timeout(TEST_TIMEOUT, async { + let builder = TopologyBuilder::new(config).with_network_layout(Libp2pNetworkLayout::Full); + + let deployer = LocalDeployer::new(); + let cluster = deployer.manual_cluster_with_builder(builder)?; + // Nodes are stopped automatically when the cluster is dropped. + + let node_a = start_node_with_timeout( + &cluster, + "a", + StartNodeOptions::default(), + START_NODE_TIMEOUT, + ) + .await? + .api; + + let node_b = start_node_with_timeout( + &cluster, + "b", + StartNodeOptions::default(), + START_NODE_TIMEOUT, + ) + .await? + .api; + + wait_for_min_height( + &[node_a.clone(), node_b.clone()], + MIN_HEIGHT, + INITIAL_READY_TIMEOUT, + POLL_INTERVAL, + ) + .await?; + + let behind_node = start_node_with_timeout( + &cluster, + "c", + StartNodeOptions::default(), + START_NODE_TIMEOUT, + ) + .await? + .api; + + timeout(CATCH_UP_TIMEOUT, async { + loop { + let node_a_info = node_a + .consensus_info() + .await + .map_err(|err| anyhow!("node-a consensus_info failed: {err}"))?; + + let node_b_info = node_b + .consensus_info() + .await + .map_err(|err| anyhow!("node-b consensus_info failed: {err}"))?; + + let behind_info = behind_node + .consensus_info() + .await + .map_err(|err| anyhow!("node-c consensus_info failed: {err}"))?; + + let initial_min_height = node_a_info.height.min(node_b_info.height); + + if behind_info.height >= initial_min_height.saturating_sub(1) { + return Ok::<(), anyhow::Error>(()); + } + + sleep(POLL_INTERVAL).await; + } + }) + .await + .map_err(|_| anyhow!("timeout waiting for behind node to catch up"))??; + + Ok::<(), anyhow::Error>(()) + }) + .await + .map_err(|_| anyhow!("test timeout exceeded"))??; + + Ok(()) +} diff --git a/testing-framework/deployers/local/src/manual/mod.rs b/testing-framework/deployers/local/src/manual/mod.rs index 51a75bf..fa90a61 100644 --- a/testing-framework/deployers/local/src/manual/mod.rs +++ b/testing-framework/deployers/local/src/manual/mod.rs @@ -32,18 +32,24 @@ pub struct LocalManualCluster { } impl LocalManualCluster { - pub(crate) fn from_config(config: TopologyConfig) -> Result { - let builder = TopologyBuilder::new(config); + pub(crate) fn from_builder(builder: TopologyBuilder) -> Result { let descriptors = builder .build() .map_err(|source| ManualClusterError::Build { source })?; + let nodes = LocalNodeManager::new( descriptors, testing_framework_core::scenario::NodeClients::default(), ); + Ok(Self { nodes }) } + pub(crate) fn from_config(config: TopologyConfig) -> Result { + let builder = TopologyBuilder::new(config); + Self::from_builder(builder) + } + #[must_use] pub fn node_client(&self, name: &str) -> Option { self.nodes.node_client(name) diff --git a/testing-framework/deployers/local/src/runner.rs b/testing-framework/deployers/local/src/runner.rs index cfbb7d9..45b8888 100644 --- a/testing-framework/deployers/local/src/runner.rs +++ b/testing-framework/deployers/local/src/runner.rs @@ -7,7 +7,11 @@ use testing_framework_core::{ BlockFeed, BlockFeedTask, Deployer, DynError, Metrics, NodeClients, NodeControlCapability, RunContext, Runner, Scenario, ScenarioError, spawn_block_feed, }, - topology::{config::TopologyConfig, deployment::Topology, readiness::ReadinessError}, + topology::{ + config::{TopologyBuilder, TopologyConfig}, + deployment::Topology, + readiness::ReadinessError, + }, }; use thiserror::Error; use tracing::{debug, info}; @@ -167,6 +171,14 @@ impl LocalDeployer { LocalManualCluster::from_config(config) } + /// Build a manual cluster from a pre-configured topology builder. + pub fn manual_cluster_with_builder( + &self, + builder: TopologyBuilder, + ) -> Result { + LocalManualCluster::from_builder(builder) + } + async fn prepare_topology( scenario: &Scenario, membership_check: bool, diff --git a/testing-framework/workflows/src/lib.rs b/testing-framework/workflows/src/lib.rs index 72ef0b1..0e97399 100644 --- a/testing-framework/workflows/src/lib.rs +++ b/testing-framework/workflows/src/lib.rs @@ -1,8 +1,10 @@ pub mod builder; pub mod expectations; +pub mod manual; pub mod util; pub mod workloads; pub use builder::{ChaosBuilderExt, ObservabilityBuilderExt, ScenarioBuilderExt}; pub use expectations::ConsensusLiveness; +pub use manual::{start_node_with_timeout, wait_for_min_height}; pub use workloads::transaction::TxInclusionExpectation; diff --git a/testing-framework/workflows/src/manual.rs b/testing-framework/workflows/src/manual.rs new file mode 100644 index 0000000..bbc0b9e --- /dev/null +++ b/testing-framework/workflows/src/manual.rs @@ -0,0 +1,76 @@ +use std::time::Duration; + +use testing_framework_core::{ + nodes::ApiClient, + scenario::{DynError, NodeControlHandle, StartNodeOptions, StartedNode}, +}; +use thiserror::Error; +use tokio::time::{Instant, sleep, timeout}; + +#[derive(Debug, Error)] +pub enum ManualTestError { + #[error("timeout: {message}")] + Timeout { message: String }, + #[error("start node failed: {message}")] + StartNode { message: String }, + #[error("consensus_info failed: {source}")] + ConsensusInfo { + #[from] + source: reqwest::Error, + }, +} + +pub async fn start_node_with_timeout( + handle: &H, + name: &str, + options: StartNodeOptions, + timeout_duration: Duration, +) -> Result { + timeout(timeout_duration, handle.start_node_with(name, options)) + .await + .map_err(|_| ManualTestError::Timeout { + message: format!("starting node '{name}' exceeded timeout"), + })? + .map_err(|err: DynError| ManualTestError::StartNode { + message: err.to_string(), + }) +} + +pub async fn wait_for_min_height( + clients: &[ApiClient], + min_height: u64, + timeout_duration: Duration, + poll_interval: Duration, +) -> Result<(), ManualTestError> { + let start = Instant::now(); + + loop { + let mut heights = Vec::with_capacity(clients.len()); + for client in clients { + match client.consensus_info().await { + Ok(info) => heights.push(info.height), + Err(err) => { + if start.elapsed() >= timeout_duration { + return Err(ManualTestError::ConsensusInfo { source: err }); + } + sleep(poll_interval).await; + continue; + } + } + } + + if heights.len() == clients.len() && heights.iter().all(|height| *height >= min_height) { + return Ok(()); + } + + if start.elapsed() >= timeout_duration { + return Err(ManualTestError::Timeout { + message: format!( + "min height {min_height} not reached before timeout; heights={heights:?}" + ), + }); + } + + sleep(poll_interval).await; + } +} From cc754623691c29bfb688b8c21c3e64210fdd951e Mon Sep 17 00:00:00 2001 From: andrussal Date: Mon, 2 Feb 2026 13:30:56 +0100 Subject: [PATCH 05/11] Update node rev and align consensus/wallet config --- Cargo.lock | 129 +++++++++--------- Cargo.toml | 64 +++++---- scripts/build/build-bundle.sh | 6 +- scripts/run/run-examples.sh | 2 +- .../stack/scripts/docker/build_cfgsync.sh | 2 +- .../stack/scripts/docker/prepare_binaries.sh | 4 +- testing-framework/configs/Cargo.toml | 1 - testing-framework/configs/src/nodes/blend.rs | 2 + testing-framework/configs/src/nodes/common.rs | 39 +++--- .../configs/src/topology/configs/consensus.rs | 27 ++-- .../configs/src/topology/configs/runtime.rs | 7 +- testing-framework/core/src/topology/config.rs | 6 +- testing-framework/core/src/topology/utils.rs | 14 +- versions.env | 2 +- 14 files changed, 166 insertions(+), 139 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 942da1a..91246ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3389,7 +3389,7 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "logos-blockchain-api-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "bytes", @@ -3415,7 +3415,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "logos-blockchain-blend-crypto", "logos-blockchain-blend-message", @@ -3427,7 +3427,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-crypto" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "blake2", "logos-blockchain-groth16", @@ -3441,7 +3441,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-message" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "blake2", "derivative", @@ -3463,7 +3463,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-network" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "either", "futures", @@ -3481,7 +3481,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-proofs" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "ed25519-dalek", "generic-array 1.3.5", @@ -3496,7 +3496,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-scheduling" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "derivative", @@ -3519,7 +3519,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "fork_stream", @@ -3554,7 +3554,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-broadcast-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "derivative", @@ -3570,7 +3570,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-leader-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "futures", @@ -3579,7 +3579,7 @@ dependencies = [ "logos-blockchain-chain-service-common", "logos-blockchain-core", "logos-blockchain-cryptarchia-engine", - "logos-blockchain-key-management-system-keys", + "logos-blockchain-key-management-system-service", "logos-blockchain-ledger", "logos-blockchain-services-utils", "logos-blockchain-time-service", @@ -3597,7 +3597,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-network-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "futures", @@ -3625,7 +3625,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "bytes", @@ -3655,7 +3655,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-service-common" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "logos-blockchain-core", "serde", @@ -3664,7 +3664,7 @@ dependencies = [ [[package]] name = "logos-blockchain-circuits-prover" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "logos-blockchain-circuits-utils", "tempfile", @@ -3673,7 +3673,7 @@ dependencies = [ [[package]] name = "logos-blockchain-circuits-utils" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "dirs", ] @@ -3681,7 +3681,7 @@ dependencies = [ [[package]] name = "logos-blockchain-common-http-client" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "futures", "logos-blockchain-chain-broadcast-service", @@ -3698,7 +3698,7 @@ dependencies = [ [[package]] name = "logos-blockchain-core" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "ark-ff 0.4.2", "bincode", @@ -3706,15 +3706,16 @@ dependencies = [ "bytes", "const-hex", "futures", - "generic-array 1.3.5", "hex", "logos-blockchain-blend-proofs", "logos-blockchain-cryptarchia-engine", "logos-blockchain-groth16", "logos-blockchain-key-management-system-keys", + "logos-blockchain-poc", "logos-blockchain-pol", "logos-blockchain-poseidon2", "logos-blockchain-utils", + "logos-blockchain-utxotree", "multiaddr", "nom 8.0.0", "num-bigint", @@ -3727,7 +3728,7 @@ dependencies = [ [[package]] name = "logos-blockchain-cryptarchia-engine" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "cfg_eval", "logos-blockchain-utils", @@ -3742,7 +3743,7 @@ dependencies = [ [[package]] name = "logos-blockchain-cryptarchia-sync" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "bytes", "futures", @@ -3761,7 +3762,7 @@ dependencies = [ [[package]] name = "logos-blockchain-groth16" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "ark-bn254 0.4.0", "ark-ec 0.4.2", @@ -3779,7 +3780,7 @@ dependencies = [ [[package]] name = "logos-blockchain-http-api-common" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "axum", "governor", @@ -3794,7 +3795,7 @@ dependencies = [ [[package]] name = "logos-blockchain-key-management-system-keys" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "bytes", @@ -3820,7 +3821,7 @@ dependencies = [ [[package]] name = "logos-blockchain-key-management-system-macros" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "proc-macro2", "quote", @@ -3830,7 +3831,7 @@ dependencies = [ [[package]] name = "logos-blockchain-key-management-system-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "log", @@ -3845,7 +3846,7 @@ dependencies = [ [[package]] name = "logos-blockchain-ledger" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "derivative", "logos-blockchain-blend-crypto", @@ -3855,7 +3856,7 @@ dependencies = [ "logos-blockchain-cryptarchia-engine", "logos-blockchain-groth16", "logos-blockchain-key-management-system-keys", - "logos-blockchain-mmr", + "logos-blockchain-pol", "logos-blockchain-utils", "logos-blockchain-utxotree", "num-bigint", @@ -3869,7 +3870,7 @@ dependencies = [ [[package]] name = "logos-blockchain-libp2p" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "backon", @@ -3895,22 +3896,10 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "logos-blockchain-mmr" -version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" -dependencies = [ - "ark-ff 0.4.2", - "logos-blockchain-groth16", - "logos-blockchain-poseidon2", - "rpds", - "serde", -] - [[package]] name = "logos-blockchain-network-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "futures", @@ -3929,7 +3918,7 @@ dependencies = [ [[package]] name = "logos-blockchain-node" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "axum", @@ -3965,7 +3954,6 @@ dependencies = [ "logos-blockchain-tx-service", "logos-blockchain-utils", "logos-blockchain-wallet-service", - "num-bigint", "overwatch", "serde", "serde_ignored", @@ -3983,10 +3971,25 @@ dependencies = [ "utoipa-swagger-ui", ] +[[package]] +name = "logos-blockchain-poc" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +dependencies = [ + "logos-blockchain-circuits-prover", + "logos-blockchain-circuits-utils", + "logos-blockchain-groth16", + "logos-blockchain-witness-generator", + "num-bigint", + "serde", + "serde_json", + "thiserror 2.0.18", +] + [[package]] name = "logos-blockchain-pol" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", @@ -4002,7 +4005,7 @@ dependencies = [ [[package]] name = "logos-blockchain-poq" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", @@ -4018,7 +4021,7 @@ dependencies = [ [[package]] name = "logos-blockchain-poseidon2" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "ark-bn254 0.4.0", "ark-ff 0.4.2", @@ -4029,7 +4032,7 @@ dependencies = [ [[package]] name = "logos-blockchain-sdp-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "futures", @@ -4045,7 +4048,7 @@ dependencies = [ [[package]] name = "logos-blockchain-services-utils" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "futures", @@ -4060,7 +4063,7 @@ dependencies = [ [[package]] name = "logos-blockchain-storage-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "bytes", @@ -4078,7 +4081,7 @@ dependencies = [ [[package]] name = "logos-blockchain-system-sig-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-ctrlc", "async-trait", @@ -4089,7 +4092,7 @@ dependencies = [ [[package]] name = "logos-blockchain-time-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "cfg_eval", @@ -4111,7 +4114,7 @@ dependencies = [ [[package]] name = "logos-blockchain-tracing" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "opentelemetry", "opentelemetry-http", @@ -4134,7 +4137,7 @@ dependencies = [ [[package]] name = "logos-blockchain-tracing-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "logos-blockchain-tracing", @@ -4148,7 +4151,7 @@ dependencies = [ [[package]] name = "logos-blockchain-tx-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "futures", @@ -4170,7 +4173,7 @@ dependencies = [ [[package]] name = "logos-blockchain-utils" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "blake2", @@ -4187,10 +4190,9 @@ dependencies = [ [[package]] name = "logos-blockchain-utxotree" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "ark-ff 0.4.2", - "logos-blockchain-core", "logos-blockchain-groth16", "logos-blockchain-poseidon2", "num-bigint", @@ -4202,7 +4204,7 @@ dependencies = [ [[package]] name = "logos-blockchain-wallet" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "logos-blockchain-core", "logos-blockchain-key-management-system-keys", @@ -4216,7 +4218,7 @@ dependencies = [ [[package]] name = "logos-blockchain-wallet-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "async-trait", "bytes", @@ -4229,8 +4231,10 @@ dependencies = [ "logos-blockchain-ledger", "logos-blockchain-services-utils", "logos-blockchain-storage-service", + "logos-blockchain-utxotree", "logos-blockchain-wallet", "overwatch", + "rand 0.8.5", "serde", "thiserror 1.0.69", "tokio", @@ -4240,7 +4244,7 @@ dependencies = [ [[package]] name = "logos-blockchain-witness-generator" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "tempfile", ] @@ -4248,7 +4252,7 @@ dependencies = [ [[package]] name = "logos-blockchain-zksign" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=3f15894f8b4df377e8d3cd9d92ddee9f648046dc#3f15894f8b4df377e8d3cd9d92ddee9f648046dc" +source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", @@ -6437,7 +6441,6 @@ dependencies = [ "hex", "logos-blockchain-api-service", "logos-blockchain-blend-service", - "logos-blockchain-chain-leader-service", "logos-blockchain-chain-network-service", "logos-blockchain-chain-service", "logos-blockchain-core", diff --git a/Cargo.toml b/Cargo.toml index e2d0c85..2497b8b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,39 +40,37 @@ testing-framework-runner-local = { default-features = false, path = "testing-f testing-framework-workflows = { default-features = false, path = "testing-framework/workflows" } # Logos git dependencies (pinned to latest master) -broadcast-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-broadcast-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -cfgsync_tf = { default-features = false, path = "testing-framework/tools/cfgsync_tf" } -chain-leader = { default-features = false, features = [ - "pol-dev-mode", -], git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-leader-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -chain-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-network-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -chain-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -common-http-client = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-common-http-client", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -cryptarchia-engine = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-engine", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -cryptarchia-sync = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-sync", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -groth16 = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-groth16", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -key-management-system-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-key-management-system-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -nomos-api = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-api-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -nomos-blend-message = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-message", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -nomos-blend-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -nomos-core = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-core", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -nomos-http-api-common = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-http-api-common", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -nomos-ledger = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-ledger", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -nomos-libp2p = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-libp2p", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -nomos-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-network-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -nomos-node = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-node", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -nomos-sdp = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-sdp-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -nomos-time = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-time-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -nomos-tracing = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -nomos-tracing-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -nomos-utils = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-utils", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -nomos-wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -poc = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-poc", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -pol = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-pol", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -tests = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tests", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -tx-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tx-service", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } -zksign = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-zksign", rev = "3f15894f8b4df377e8d3cd9d92ddee9f648046dc" } +broadcast-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-broadcast-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +cfgsync_tf = { default-features = false, path = "testing-framework/tools/cfgsync_tf" } +chain-leader = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-leader-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +chain-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-network-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +chain-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +common-http-client = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-common-http-client", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +cryptarchia-engine = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-engine", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +cryptarchia-sync = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-sync", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +groth16 = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-groth16", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +key-management-system-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-key-management-system-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +nomos-api = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-api-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +nomos-blend-message = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-message", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +nomos-blend-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +nomos-core = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-core", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +nomos-http-api-common = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-http-api-common", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +nomos-ledger = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-ledger", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +nomos-libp2p = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-libp2p", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +nomos-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-network-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +nomos-node = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-node", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +nomos-sdp = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-sdp-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +nomos-time = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-time-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +nomos-tracing = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +nomos-tracing-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +nomos-utils = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-utils", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +nomos-wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +poc = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-poc", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +pol = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-pol", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +tests = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tests", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +tx-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tx-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +zksign = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-zksign", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } # External crates async-trait = { default-features = false, version = "0.1" } diff --git a/scripts/build/build-bundle.sh b/scripts/build/build-bundle.sh index 87d25a7..6e0125a 100755 --- a/scripts/build/build-bundle.sh +++ b/scripts/build/build-bundle.sh @@ -309,7 +309,7 @@ build_bundle::prepare_circuits() { } build_bundle::build_binaries() { - BUILD_FEATURES_LABEL="all,pol-dev-mode,verification-keys" + BUILD_FEATURES_LABEL="all,high-active-slot-coefficient,verification-keys" echo "==> Building binaries (platform=${PLATFORM})" mkdir -p "${NODE_SRC}" ( @@ -330,14 +330,14 @@ build_bundle::build_binaries() { fi if [ -n "${BUNDLE_RUSTUP_TOOLCHAIN}" ]; then - RUSTFLAGS='--cfg feature="pol-dev-mode" --cfg feature="build-verification-key"' \ + RUSTFLAGS='--cfg feature="high-active-slot-coefficient" --cfg feature="build-verification-key"' \ CARGO_FEATURE_BUILD_VERIFICATION_KEY=1 \ RUSTUP_TOOLCHAIN="${BUNDLE_RUSTUP_TOOLCHAIN}" \ cargo build --all-features \ -p logos-blockchain-node \ --target-dir "${NODE_TARGET}" else - RUSTFLAGS='--cfg feature="pol-dev-mode" --cfg feature="build-verification-key"' \ + RUSTFLAGS='--cfg feature="high-active-slot-coefficient" --cfg feature="build-verification-key"' \ CARGO_FEATURE_BUILD_VERIFICATION_KEY=1 \ cargo build --all-features \ -p logos-blockchain-node \ diff --git a/scripts/run/run-examples.sh b/scripts/run/run-examples.sh index f34af21..8c7d2e4 100755 --- a/scripts/run/run-examples.sh +++ b/scripts/run/run-examples.sh @@ -302,7 +302,7 @@ run_examples::bundle_matches_expected() { local tar_path="$1" [ -f "${tar_path}" ] || return 1 [ -z "${LOGOS_BLOCKCHAIN_NODE_REV:-}" ] && return 0 - local expected_features="${RUN_EXAMPLES_EXPECTED_BUNDLE_FEATURES:-all,pol-dev-mode,verification-keys}" + local expected_features="${RUN_EXAMPLES_EXPECTED_BUNDLE_FEATURES:-all,high-active-slot-coefficient,verification-keys}" local meta tar_rev tar_head tar_features meta="$(tar -xOzf "${tar_path}" artifacts/nomos-bundle-meta.env 2>/dev/null || true)" diff --git a/testing-framework/assets/stack/scripts/docker/build_cfgsync.sh b/testing-framework/assets/stack/scripts/docker/build_cfgsync.sh index c539582..aada5eb 100755 --- a/testing-framework/assets/stack/scripts/docker/build_cfgsync.sh +++ b/testing-framework/assets/stack/scripts/docker/build_cfgsync.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -euo pipefail -RUSTFLAGS='--cfg feature="pol-dev-mode"' \ +RUSTFLAGS='--cfg feature="high-active-slot-coefficient"' \ cargo build --all-features --manifest-path /workspace/testing-framework/tools/cfgsync_tf/Cargo.toml --bins cp /workspace/target/debug/cfgsync-server /workspace/artifacts/cfgsync-server diff --git a/testing-framework/assets/stack/scripts/docker/prepare_binaries.sh b/testing-framework/assets/stack/scripts/docker/prepare_binaries.sh index 90a0b8c..03f61cf 100755 --- a/testing-framework/assets/stack/scripts/docker/prepare_binaries.sh +++ b/testing-framework/assets/stack/scripts/docker/prepare_binaries.sh @@ -50,8 +50,8 @@ git checkout "${LOGOS_BLOCKCHAIN_NODE_REV}" git reset --hard git clean -fdx -# Enable pol-dev-mode via cfg to let POL_PROOF_DEV_MODE short-circuit proofs in tests. -RUSTFLAGS='--cfg feature="pol-dev-mode"' \ +# Enable high-active-slot-coefficient via cfg to keep test blocks frequent. +RUSTFLAGS='--cfg feature="high-active-slot-coefficient"' \ cargo build --features "testing" -p logos-blockchain-node cp /tmp/nomos-node/target/debug/logos-blockchain-node /workspace/artifacts/logos-blockchain-node diff --git a/testing-framework/configs/Cargo.toml b/testing-framework/configs/Cargo.toml index 50d4634..5030d6d 100644 --- a/testing-framework/configs/Cargo.toml +++ b/testing-framework/configs/Cargo.toml @@ -10,7 +10,6 @@ repository.workspace = true version = "0.1.0" [dependencies] -chain-leader = { workspace = true } chain-network = { workspace = true } chain-service = { workspace = true } cryptarchia-engine = { features = ["serde"], workspace = true } diff --git a/testing-framework/configs/src/nodes/blend.rs b/testing-framework/configs/src/nodes/blend.rs index c6d73bb..1f8dbd8 100644 --- a/testing-framework/configs/src/nodes/blend.rs +++ b/testing-framework/configs/src/nodes/blend.rs @@ -32,6 +32,7 @@ const EPOCH_TRANSITION_SLOTS: u64 = 2_600; const SAFETY_BUFFER_INTERVALS: u64 = 100; const MESSAGE_FREQUENCY_PER_ROUND: f64 = 1.0; const MAX_RELEASE_DELAY_ROUNDS: u64 = 3; +const DATA_REPLICATION_FACTOR: u64 = 0; pub(crate) fn build_blend_service_config( config: &TopologyBlendConfig, @@ -106,6 +107,7 @@ fn build_blend_deployment_settings( common: blend_deployment::CommonSettings { num_blend_layers: unsafe { NonZeroU64::new_unchecked(BLEND_LAYERS_COUNT) }, minimum_network_size: unsafe { NonZeroU64::new_unchecked(MINIMUM_NETWORK_SIZE) }, + data_replication_factor: DATA_REPLICATION_FACTOR, timing: TimingSettings { round_duration: Duration::from_secs(ROUND_DURATION_SECS), rounds_per_interval: unsafe { NonZeroU64::new_unchecked(ROUNDS_PER_INTERVAL) }, diff --git a/testing-framework/configs/src/nodes/common.rs b/testing-framework/configs/src/nodes/common.rs index 20e921d..2c53076 100644 --- a/testing-framework/configs/src/nodes/common.rs +++ b/testing-framework/configs/src/nodes/common.rs @@ -1,8 +1,13 @@ -use std::{collections::HashSet, num::NonZeroUsize, path::PathBuf, time::Duration}; +use std::{ + collections::{HashMap, HashSet}, + num::NonZeroUsize, + path::PathBuf, + time::Duration, +}; -use chain_leader::LeaderConfig as ChainLeaderConfig; use chain_network::{BootstrapConfig as ChainBootstrapConfig, OrphanConfig, SyncConfig}; use chain_service::StartingState; +use key_management_system_service::keys::Key; use nomos_api::ApiServiceSettings; use nomos_node::{ api::backend::AxumBackendSettings as NodeAxumBackendSettings, @@ -22,7 +27,7 @@ use nomos_node::{ }; use nomos_wallet::WalletServiceSettings; -use crate::{timeouts, topology::configs::GeneralConfig}; +use crate::{nodes::kms::key_id_for_preload_backend, timeouts, topology::configs::GeneralConfig}; // Configuration constants const CRYPTARCHIA_GOSSIPSUB_PROTOCOL: &str = "/cryptarchia/proto"; @@ -37,7 +42,11 @@ const API_MAX_CONCURRENT_REQUESTS: usize = 1000; pub(crate) fn cryptarchia_deployment(config: &GeneralConfig) -> CryptarchiaDeploymentSettings { CryptarchiaDeploymentSettings { epoch_config: config.consensus_config.ledger_config.epoch_config, - consensus_config: config.consensus_config.ledger_config.consensus_config, + security_param: config + .consensus_config + .ledger_config + .consensus_config + .security_param(), sdp_config: DeploymentSdpConfig { service_params: config .consensus_config @@ -94,10 +103,6 @@ pub(crate) fn cryptarchia_config(config: &GeneralConfig) -> CryptarchiaConfig { }, }, }, - leader: ChainLeaderConfig { - pk: config.consensus_config.leader_config.pk, - sk: config.consensus_config.leader_config.sk.clone(), - }, } } @@ -160,19 +165,19 @@ fn wallet_settings_with_leader( config: &GeneralConfig, include_leader: bool, ) -> WalletServiceSettings { - let mut keys = HashSet::new(); + let mut keys = HashMap::new(); if include_leader { - keys.insert(config.consensus_config.leader_config.pk); + let leader_key = Key::Zk(config.consensus_config.leader_sk.clone().into()); + let leader_key_id = key_id_for_preload_backend(&leader_key); + keys.insert(leader_key_id, config.consensus_config.leader_pk); } - keys.extend( - config - .consensus_config - .wallet_accounts - .iter() - .map(crate::topology::configs::wallet::WalletAccount::public_key), - ); + for account in &config.consensus_config.wallet_accounts { + let key = Key::Zk(account.secret_key.clone()); + let key_id = key_id_for_preload_backend(&key); + keys.insert(key_id, account.public_key()); + } WalletServiceSettings { known_keys: keys } } diff --git a/testing-framework/configs/src/topology/configs/consensus.rs b/testing-framework/configs/src/topology/configs/consensus.rs index bed29a0..ec7715e 100644 --- a/testing-framework/configs/src/topology/configs/consensus.rs +++ b/testing-framework/configs/src/topology/configs/consensus.rs @@ -5,7 +5,6 @@ use std::{ sync::Arc, }; -use chain_leader::LeaderConfig; use cryptarchia_engine::EpochConfig; use groth16::CompressedGroth16Proof; use key_management_system_service::keys::{ @@ -98,7 +97,8 @@ impl ProviderInfo { /// be converted into a specific service or services configuration. #[derive(Clone)] pub struct GeneralConsensusConfig { - pub leader_config: LeaderConfig, + pub leader_pk: ZkPublicKey, + pub leader_sk: UnsecuredZkKey, pub ledger_config: nomos_ledger::Config, pub genesis_tx: GenesisTx, pub utxos: Vec, @@ -160,10 +160,10 @@ fn build_ledger_config( epoch_period_nonce_buffer: unsafe { NonZero::new_unchecked(3) }, epoch_period_nonce_stabilization: unsafe { NonZero::new_unchecked(4) }, }, - consensus_config: cryptarchia_engine::Config { - security_param: consensus_params.security_param, - active_slot_coeff: consensus_params.active_slot_coeff, - }, + consensus_config: cryptarchia_engine::Config::new( + consensus_params.security_param, + consensus_params.active_slot_coeff, + ), sdp_config: nomos_ledger::mantle::sdp::Config { service_params: Arc::new( [( @@ -192,6 +192,7 @@ fn build_ledger_config( })?, num_blend_layers: unsafe { NonZeroU64::new_unchecked(3) }, minimum_network_size: unsafe { NonZeroU64::new_unchecked(1) }, + data_replication_factor: 0, }, }, }, @@ -222,7 +223,8 @@ pub fn create_consensus_configs( .into_iter() .enumerate() .map(|(i, (pk, sk))| GeneralConsensusConfig { - leader_config: LeaderConfig { pk, sk }, + leader_pk: pk, + leader_sk: sk, ledger_config: ledger_config.clone(), genesis_tx: genesis_tx.clone(), utxos: utxos.clone(), @@ -241,10 +243,8 @@ fn create_utxos_for_leader_and_services( ) -> Vec { let mut utxos = Vec::new(); - // Assume output index which will be set by the ledger tx. - let mut output_index = 0; - // Create notes for leader, Blend and DA declarations. + let mut output_index = 0; for &id in ids { output_index = push_leader_utxo(id, leader_keys, &mut utxos, output_index); output_index = push_service_note(b"bn", id, blend_notes, &mut utxos, output_index); @@ -278,7 +278,7 @@ fn push_leader_utxo( utxos.push(Utxo { note: Note::new(1_000, pk), tx_hash: BigUint::from(0u8).into(), - output_index: 0, + output_index, }); output_index + 1 } @@ -303,17 +303,18 @@ fn push_service_note( utxos.push(Utxo { note, tx_hash: BigUint::from(0u8).into(), - output_index: 0, + output_index, }); output_index + 1 } fn append_wallet_utxos(mut utxos: Vec, wallet: &WalletConfig) -> Vec { for account in &wallet.accounts { + let output_index = utxos.len(); utxos.push(Utxo { note: Note::new(account.value, account.public_key()), tx_hash: BigUint::from(0u8).into(), - output_index: 0, + output_index, }); } diff --git a/testing-framework/configs/src/topology/configs/runtime.rs b/testing-framework/configs/src/topology/configs/runtime.rs index 7468ac7..469ac2d 100644 --- a/testing-framework/configs/src/topology/configs/runtime.rs +++ b/testing-framework/configs/src/topology/configs/runtime.rs @@ -52,7 +52,7 @@ pub fn build_general_config_for_node( .next() .ok_or(GeneralConfigError::EmptyParticipants)?; - let kms_config = build_kms_config_for_node(&blend_config, wallet_config); + let kms_config = build_kms_config_for_node(&blend_config, wallet_config, &consensus_config); Ok(GeneralConfig { consensus_config, @@ -105,6 +105,7 @@ pub fn build_initial_peers(network_params: &NetworkParams, peer_ports: &[u16]) - fn build_kms_config_for_node( blend_config: &blend::GeneralBlendConfig, wallet_config: &WalletConfig, + consensus_config: &GeneralConsensusConfig, ) -> PreloadKMSBackendSettings { let mut keys = HashMap::from([ ( @@ -115,6 +116,10 @@ fn build_kms_config_for_node( key_id_for_preload_backend(&Key::Zk(blend_config.secret_zk_key.clone())), Key::Zk(blend_config.secret_zk_key.clone()), ), + ( + key_id_for_preload_backend(&Key::Zk(consensus_config.leader_sk.clone().into())), + Key::Zk(consensus_config.leader_sk.clone().into()), + ), ]); for account in &wallet_config.accounts { diff --git a/testing-framework/core/src/topology/config.rs b/testing-framework/core/src/topology/config.rs index 9a57720..4bc017f 100644 --- a/testing-framework/core/src/topology/config.rs +++ b/testing-framework/core/src/topology/config.rs @@ -220,7 +220,11 @@ impl TopologyBuilder { let genesis_tx = create_consensus_genesis_tx(first_consensus, providers)?; apply_consensus_genesis_tx(&mut consensus_configs, &genesis_tx); - let kms_configs = create_kms_configs(&blend_configs, &config.wallet_config.accounts); + let kms_configs = create_kms_configs( + &blend_configs, + &consensus_configs, + &config.wallet_config.accounts, + ); let nodes = build_node_descriptors( &config, diff --git a/testing-framework/core/src/topology/utils.rs b/testing-framework/core/src/topology/utils.rs index 01b7236..57d2933 100644 --- a/testing-framework/core/src/topology/utils.rs +++ b/testing-framework/core/src/topology/utils.rs @@ -6,17 +6,21 @@ use nomos_utils::net::get_available_udp_port; use rand::{Rng, thread_rng}; use thiserror::Error; -use crate::topology::configs::{blend::GeneralBlendConfig, wallet::WalletAccount}; +use crate::topology::configs::{ + blend::GeneralBlendConfig, consensus::GeneralConsensusConfig, wallet::WalletAccount, +}; #[must_use] /// Build preload KMS configs for blend/DA and wallet keys for every node. pub fn create_kms_configs( blend_configs: &[GeneralBlendConfig], + consensus_configs: &[GeneralConsensusConfig], wallet_accounts: &[WalletAccount], ) -> Vec { blend_configs .iter() - .map(|blend_conf| { + .zip(consensus_configs.iter()) + .map(|(blend_conf, consensus_conf)| { let mut keys = HashMap::from([ ( hex::encode(blend_conf.signer.public_key().to_bytes()), @@ -28,6 +32,12 @@ pub fn create_kms_configs( )), Key::Zk(blend_conf.secret_zk_key.clone()), ), + ( + hex::encode(fr_to_bytes( + consensus_conf.leader_sk.to_public_key().as_fr(), + )), + Key::Zk(consensus_conf.leader_sk.clone().into()), + ), ]); for account in wallet_accounts { diff --git a/versions.env b/versions.env index 18afbc0..3942a5d 100644 --- a/versions.env +++ b/versions.env @@ -1,7 +1,7 @@ VERSION=v0.3.2 LOGOS_BLOCKCHAIN_BUNDLE_VERSION=v4 # Pinned logos-blockchain-node revision used for CI builds and binary bundles. -LOGOS_BLOCKCHAIN_NODE_REV=3f15894f8b4df377e8d3cd9d92ddee9f648046dc +LOGOS_BLOCKCHAIN_NODE_REV=ea98ac1ad09ac29fe8350614a260c20d8de12bfe # Optional: local logos-blockchain-node checkout override (do not commit absolute paths). # LOGOS_BLOCKCHAIN_NODE_PATH= From 4927c74e487af02d8c6341b088ee8195a782a33a Mon Sep 17 00:00:00 2001 From: andrussal Date: Tue, 3 Feb 2026 17:22:06 +0100 Subject: [PATCH 06/11] Update node rev and align wallet/KMS configs --- Cargo.lock | 119 ++++++++++-------- Cargo.toml | 60 ++++----- testing-framework/configs/src/nodes/common.rs | 30 +++-- .../configs/src/topology/configs/consensus.rs | 16 ++- .../configs/src/topology/configs/runtime.rs | 4 + .../configs/src/topology/configs/time.rs | 2 +- .../core/src/nodes/common/config/paths.rs | 10 ++ testing-framework/core/src/topology/utils.rs | 6 + versions.env | 2 +- 9 files changed, 150 insertions(+), 99 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 91246ef..bc6326b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -801,9 +801,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" dependencies = [ "serde", ] @@ -1254,7 +1254,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ab67060fc6b8ef687992d439ca0fa36e7ed17e9a0b16b25b601e8757df720de" dependencies = [ "data-encoding", - "syn 2.0.114", + "syn 1.0.109", ] [[package]] @@ -3389,7 +3389,7 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "logos-blockchain-api-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "bytes", @@ -3415,7 +3415,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "logos-blockchain-blend-crypto", "logos-blockchain-blend-message", @@ -3427,7 +3427,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-crypto" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "blake2", "logos-blockchain-groth16", @@ -3441,7 +3441,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-message" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "blake2", "derivative", @@ -3463,7 +3463,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-network" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "either", "futures", @@ -3481,7 +3481,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-proofs" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "ed25519-dalek", "generic-array 1.3.5", @@ -3496,7 +3496,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-scheduling" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "derivative", @@ -3519,7 +3519,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "fork_stream", @@ -3554,7 +3554,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-broadcast-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "derivative", @@ -3570,11 +3570,12 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-leader-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "futures", "logos-blockchain-blend-service", + "logos-blockchain-chain-network-service", "logos-blockchain-chain-service", "logos-blockchain-chain-service-common", "logos-blockchain-core", @@ -3597,7 +3598,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-network-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "futures", @@ -3625,7 +3626,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "bytes", @@ -3655,7 +3656,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-service-common" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "logos-blockchain-core", "serde", @@ -3664,7 +3665,7 @@ dependencies = [ [[package]] name = "logos-blockchain-circuits-prover" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "logos-blockchain-circuits-utils", "tempfile", @@ -3673,7 +3674,7 @@ dependencies = [ [[package]] name = "logos-blockchain-circuits-utils" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "dirs", ] @@ -3681,7 +3682,7 @@ dependencies = [ [[package]] name = "logos-blockchain-common-http-client" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "futures", "logos-blockchain-chain-broadcast-service", @@ -3698,7 +3699,7 @@ dependencies = [ [[package]] name = "logos-blockchain-core" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "ark-ff 0.4.2", "bincode", @@ -3728,7 +3729,7 @@ dependencies = [ [[package]] name = "logos-blockchain-cryptarchia-engine" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "cfg_eval", "logos-blockchain-utils", @@ -3743,7 +3744,7 @@ dependencies = [ [[package]] name = "logos-blockchain-cryptarchia-sync" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "bytes", "futures", @@ -3762,7 +3763,7 @@ dependencies = [ [[package]] name = "logos-blockchain-groth16" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "ark-bn254 0.4.0", "ark-ec 0.4.2", @@ -3780,7 +3781,7 @@ dependencies = [ [[package]] name = "logos-blockchain-http-api-common" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "axum", "governor", @@ -3795,13 +3796,12 @@ dependencies = [ [[package]] name = "logos-blockchain-key-management-system-keys" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "bytes", "ed25519-dalek", "generic-array 1.3.5", - "logos-blockchain-blend-proofs", "logos-blockchain-groth16", "logos-blockchain-key-management-system-macros", "logos-blockchain-poseidon2", @@ -3821,21 +3821,38 @@ dependencies = [ [[package]] name = "logos-blockchain-key-management-system-macros" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "proc-macro2", "quote", "syn 2.0.114", ] +[[package]] +name = "logos-blockchain-key-management-system-operators" +version = "0.1.0" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +dependencies = [ + "async-trait", + "logos-blockchain-blend-proofs", + "logos-blockchain-core", + "logos-blockchain-groth16", + "logos-blockchain-key-management-system-keys", + "logos-blockchain-poseidon2", + "logos-blockchain-utxotree", + "tokio", + "tracing", +] + [[package]] name = "logos-blockchain-key-management-system-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "log", "logos-blockchain-key-management-system-keys", + "logos-blockchain-key-management-system-operators", "overwatch", "serde", "thiserror 2.0.18", @@ -3846,7 +3863,7 @@ dependencies = [ [[package]] name = "logos-blockchain-ledger" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "derivative", "logos-blockchain-blend-crypto", @@ -3870,7 +3887,7 @@ dependencies = [ [[package]] name = "logos-blockchain-libp2p" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "backon", @@ -3899,7 +3916,7 @@ dependencies = [ [[package]] name = "logos-blockchain-network-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "futures", @@ -3918,7 +3935,7 @@ dependencies = [ [[package]] name = "logos-blockchain-node" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "axum", @@ -3974,7 +3991,7 @@ dependencies = [ [[package]] name = "logos-blockchain-poc" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", @@ -3989,7 +4006,7 @@ dependencies = [ [[package]] name = "logos-blockchain-pol" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", @@ -4005,7 +4022,7 @@ dependencies = [ [[package]] name = "logos-blockchain-poq" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", @@ -4021,7 +4038,7 @@ dependencies = [ [[package]] name = "logos-blockchain-poseidon2" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "ark-bn254 0.4.0", "ark-ff 0.4.2", @@ -4032,7 +4049,7 @@ dependencies = [ [[package]] name = "logos-blockchain-sdp-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "futures", @@ -4048,7 +4065,7 @@ dependencies = [ [[package]] name = "logos-blockchain-services-utils" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "futures", @@ -4063,7 +4080,7 @@ dependencies = [ [[package]] name = "logos-blockchain-storage-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "bytes", @@ -4081,7 +4098,7 @@ dependencies = [ [[package]] name = "logos-blockchain-system-sig-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-ctrlc", "async-trait", @@ -4092,7 +4109,7 @@ dependencies = [ [[package]] name = "logos-blockchain-time-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "cfg_eval", @@ -4114,7 +4131,7 @@ dependencies = [ [[package]] name = "logos-blockchain-tracing" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "opentelemetry", "opentelemetry-http", @@ -4137,7 +4154,7 @@ dependencies = [ [[package]] name = "logos-blockchain-tracing-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "logos-blockchain-tracing", @@ -4151,7 +4168,7 @@ dependencies = [ [[package]] name = "logos-blockchain-tx-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "futures", @@ -4173,7 +4190,7 @@ dependencies = [ [[package]] name = "logos-blockchain-utils" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "blake2", @@ -4190,7 +4207,7 @@ dependencies = [ [[package]] name = "logos-blockchain-utxotree" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "ark-ff 0.4.2", "logos-blockchain-groth16", @@ -4204,13 +4221,14 @@ dependencies = [ [[package]] name = "logos-blockchain-wallet" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "logos-blockchain-core", "logos-blockchain-key-management-system-keys", "logos-blockchain-ledger", "num-bigint", "rpds", + "serde", "thiserror 2.0.18", "tracing", ] @@ -4218,7 +4236,7 @@ dependencies = [ [[package]] name = "logos-blockchain-wallet-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "async-trait", "bytes", @@ -4234,7 +4252,6 @@ dependencies = [ "logos-blockchain-utxotree", "logos-blockchain-wallet", "overwatch", - "rand 0.8.5", "serde", "thiserror 1.0.69", "tokio", @@ -4244,7 +4261,7 @@ dependencies = [ [[package]] name = "logos-blockchain-witness-generator" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "tempfile", ] @@ -4252,7 +4269,7 @@ dependencies = [ [[package]] name = "logos-blockchain-zksign" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=ea98ac1ad09ac29fe8350614a260c20d8de12bfe#ea98ac1ad09ac29fe8350614a260c20d8de12bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", diff --git a/Cargo.toml b/Cargo.toml index 2497b8b..bfd699b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,37 +40,37 @@ testing-framework-runner-local = { default-features = false, path = "testing-f testing-framework-workflows = { default-features = false, path = "testing-framework/workflows" } # Logos git dependencies (pinned to latest master) -broadcast-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-broadcast-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +broadcast-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-broadcast-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } cfgsync_tf = { default-features = false, path = "testing-framework/tools/cfgsync_tf" } -chain-leader = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-leader-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -chain-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-network-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -chain-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -common-http-client = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-common-http-client", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -cryptarchia-engine = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-engine", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -cryptarchia-sync = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-sync", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -groth16 = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-groth16", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -key-management-system-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-key-management-system-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -nomos-api = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-api-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -nomos-blend-message = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-message", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -nomos-blend-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -nomos-core = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-core", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -nomos-http-api-common = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-http-api-common", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -nomos-ledger = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-ledger", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -nomos-libp2p = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-libp2p", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -nomos-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-network-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -nomos-node = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-node", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -nomos-sdp = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-sdp-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -nomos-time = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-time-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -nomos-tracing = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -nomos-tracing-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -nomos-utils = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-utils", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -nomos-wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -poc = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-poc", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -pol = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-pol", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -tests = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tests", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -tx-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tx-service", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } -zksign = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-zksign", rev = "ea98ac1ad09ac29fe8350614a260c20d8de12bfe" } +chain-leader = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-leader-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +chain-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-network-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +chain-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +common-http-client = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-common-http-client", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +cryptarchia-engine = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-engine", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +cryptarchia-sync = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-sync", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +groth16 = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-groth16", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +key-management-system-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-key-management-system-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +nomos-api = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-api-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +nomos-blend-message = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-message", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +nomos-blend-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +nomos-core = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-core", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +nomos-http-api-common = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-http-api-common", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +nomos-ledger = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-ledger", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +nomos-libp2p = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-libp2p", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +nomos-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-network-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +nomos-node = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-node", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +nomos-sdp = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-sdp-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +nomos-time = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-time-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +nomos-tracing = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +nomos-tracing-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +nomos-utils = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-utils", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +nomos-wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +poc = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-poc", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +pol = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-pol", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +tests = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tests", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +tx-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tx-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +zksign = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-zksign", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } # External crates async-trait = { default-features = false, version = "0.1" } diff --git a/testing-framework/configs/src/nodes/common.rs b/testing-framework/configs/src/nodes/common.rs index 2c53076..4fe836c 100644 --- a/testing-framework/configs/src/nodes/common.rs +++ b/testing-framework/configs/src/nodes/common.rs @@ -78,9 +78,7 @@ pub(crate) fn cryptarchia_config(config: &GeneralConfig) -> CryptarchiaConfig { starting_state: StartingState::Genesis { genesis_tx: config.consensus_config.genesis_tx.clone(), }, - // Disable on-disk recovery in compose tests to avoid serde errors on - // non-string keys and keep services alive. - recovery_file: PathBuf::new(), + recovery_file: PathBuf::from("recovery/cryptarchia.json"), bootstrap: chain_service::BootstrapConfig { prolonged_bootstrap_period: config.bootstrapping_config.prolonged_bootstrap_period, force_bootstrap: false, @@ -122,8 +120,7 @@ pub(crate) fn time_config(config: &GeneralConfig) -> TimeConfig { pub(crate) fn mempool_config() -> nomos_node::config::mempool::serde::Config { nomos_node::config::mempool::serde::Config { - // Disable mempool recovery for hermetic tests. - recovery_path: PathBuf::new(), + recovery_path: PathBuf::from("recovery/mempool.json"), } } @@ -173,11 +170,22 @@ fn wallet_settings_with_leader( keys.insert(leader_key_id, config.consensus_config.leader_pk); } - for account in &config.consensus_config.wallet_accounts { - let key = Key::Zk(account.secret_key.clone()); - let key_id = key_id_for_preload_backend(&key); - keys.insert(key_id, account.public_key()); - } + let funding_key = Key::Zk(config.consensus_config.funding_sk.clone()); + let funding_key_id = key_id_for_preload_backend(&funding_key); + keys.insert( + funding_key_id, + config.consensus_config.funding_sk.to_public_key(), + ); - WalletServiceSettings { known_keys: keys } + // Note: wallet accounts are used by the transaction workload directly and + // don't need to be registered for leader eligibility. + + let voucher_master_key_id = + key_id_for_preload_backend(&Key::Zk(config.consensus_config.leader_sk.clone().into())); + + WalletServiceSettings { + known_keys: keys, + voucher_master_key_id, + recovery_path: PathBuf::from("recovery/wallet.json"), + } } diff --git a/testing-framework/configs/src/topology/configs/consensus.rs b/testing-framework/configs/src/topology/configs/consensus.rs index ec7715e..eca32ac 100644 --- a/testing-framework/configs/src/topology/configs/consensus.rs +++ b/testing-framework/configs/src/topology/configs/consensus.rs @@ -48,7 +48,7 @@ pub struct ConsensusParams { } impl ConsensusParams { - const DEFAULT_ACTIVE_SLOT_COEFF: f64 = 0.9; + const DEFAULT_ACTIVE_SLOT_COEFF: f64 = 1.0; const CONSENSUS_ACTIVE_SLOT_COEFF_VAR: &str = "CONSENSUS_ACTIVE_SLOT_COEFF"; #[must_use] @@ -115,7 +115,7 @@ pub struct ServiceNote { pub output_index: usize, } -fn create_genesis_tx(utxos: &[Utxo]) -> Result { +fn create_genesis_tx(utxos: &mut [Utxo]) -> Result { // Create a genesis inscription op (similar to config.yaml) let inscription = InscriptionOp { channel_id: ChannelId::from([0; 32]), @@ -131,6 +131,12 @@ fn create_genesis_tx(utxos: &[Utxo]) -> Result // Create ledger transaction with the utxos as outputs let outputs: Vec = utxos.iter().map(|u| u.note).collect(); let ledger_tx = LedgerTx::new(vec![], outputs); + let ledger_tx_hash = ledger_tx.hash(); + + // Ensure utxo IDs match the ledger tx hash used at genesis. + for utxo in utxos { + utxo.tx_hash = ledger_tx_hash; + } // Create the mantle transaction let mantle_tx = MantleTx { @@ -215,8 +221,8 @@ pub fn create_consensus_configs( &mut blend_notes, &mut sdp_notes, ); - let utxos = append_wallet_utxos(utxos, wallet); - let genesis_tx = create_genesis_tx(&utxos)?; + let mut utxos = append_wallet_utxos(utxos, wallet); + let genesis_tx = create_genesis_tx(&mut utxos)?; let ledger_config = build_ledger_config(consensus_params)?; Ok(leader_keys @@ -276,7 +282,7 @@ fn push_leader_utxo( let pk = sk.to_public_key(); leader_keys.push((pk, sk)); utxos.push(Utxo { - note: Note::new(1_000, pk), + note: Note::new(100_000, pk), tx_hash: BigUint::from(0u8).into(), output_index, }); diff --git a/testing-framework/configs/src/topology/configs/runtime.rs b/testing-framework/configs/src/topology/configs/runtime.rs index 469ac2d..62fd17f 100644 --- a/testing-framework/configs/src/topology/configs/runtime.rs +++ b/testing-framework/configs/src/topology/configs/runtime.rs @@ -120,6 +120,10 @@ fn build_kms_config_for_node( key_id_for_preload_backend(&Key::Zk(consensus_config.leader_sk.clone().into())), Key::Zk(consensus_config.leader_sk.clone().into()), ), + ( + key_id_for_preload_backend(&Key::Zk(consensus_config.funding_sk.clone())), + Key::Zk(consensus_config.funding_sk.clone()), + ), ]); for account in &wallet_config.accounts { diff --git a/testing-framework/configs/src/topology/configs/time.rs b/testing-framework/configs/src/topology/configs/time.rs index fda61bc..fe6a528 100644 --- a/testing-framework/configs/src/topology/configs/time.rs +++ b/testing-framework/configs/src/topology/configs/time.rs @@ -6,7 +6,7 @@ use std::{ use time::OffsetDateTime; -const DEFAULT_SLOT_TIME: u64 = 2; +const DEFAULT_SLOT_TIME: u64 = 1; const CONSENSUS_SLOT_TIME_VAR: &str = "CONSENSUS_SLOT_TIME"; const DEFAULT_NTP_SERVER: &str = "pool.ntp.org"; const DEFAULT_NTP_TIMEOUT: Duration = Duration::from_secs(5); diff --git a/testing-framework/core/src/nodes/common/config/paths.rs b/testing-framework/core/src/nodes/common/config/paths.rs index 74b39c9..01a499d 100644 --- a/testing-framework/core/src/nodes/common/config/paths.rs +++ b/testing-framework/core/src/nodes/common/config/paths.rs @@ -11,6 +11,16 @@ pub fn ensure_recovery_paths(base_dir: &Path) -> io::Result<()> { fs::write(&mempool_path, "{}")?; } + let cryptarchia_path = recovery_dir.join("cryptarchia.json"); + if !cryptarchia_path.exists() { + fs::write(&cryptarchia_path, "{}")?; + } + + let wallet_path = recovery_dir.join("wallet.json"); + if !wallet_path.exists() { + fs::write(&wallet_path, "{}")?; + } + let blend_core_path = recovery_dir.join("blend").join("core.json"); if let Some(parent) = blend_core_path.parent() { fs::create_dir_all(parent)?; diff --git a/testing-framework/core/src/topology/utils.rs b/testing-framework/core/src/topology/utils.rs index 57d2933..a9e6038 100644 --- a/testing-framework/core/src/topology/utils.rs +++ b/testing-framework/core/src/topology/utils.rs @@ -38,6 +38,12 @@ pub fn create_kms_configs( )), Key::Zk(consensus_conf.leader_sk.clone().into()), ), + ( + hex::encode(fr_to_bytes( + consensus_conf.funding_sk.to_public_key().as_fr(), + )), + Key::Zk(consensus_conf.funding_sk.clone()), + ), ]); for account in wallet_accounts { diff --git a/versions.env b/versions.env index 3942a5d..4ce9df3 100644 --- a/versions.env +++ b/versions.env @@ -1,7 +1,7 @@ VERSION=v0.3.2 LOGOS_BLOCKCHAIN_BUNDLE_VERSION=v4 # Pinned logos-blockchain-node revision used for CI builds and binary bundles. -LOGOS_BLOCKCHAIN_NODE_REV=ea98ac1ad09ac29fe8350614a260c20d8de12bfe +LOGOS_BLOCKCHAIN_NODE_REV=d40db90e8b1649735e4c981ec4cd84063d0d0bfe # Optional: local logos-blockchain-node checkout override (do not commit absolute paths). # LOGOS_BLOCKCHAIN_NODE_PATH= From 54c48a11ddcc691972a42b6608eec2d1e63af406 Mon Sep 17 00:00:00 2001 From: Hansie Odendaal <39146854+hansieodendaal@users.noreply.github.com> Date: Wed, 4 Feb 2026 14:49:48 +0200 Subject: [PATCH 07/11] Update main repo ref (#23) --- Cargo.lock | 94 ++++++++++++++++++++++++++-------------------------- Cargo.toml | 60 ++++++++++++++++----------------- versions.env | 2 +- 3 files changed, 78 insertions(+), 78 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bc6326b..f62babc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3389,7 +3389,7 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "logos-blockchain-api-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "bytes", @@ -3415,7 +3415,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "logos-blockchain-blend-crypto", "logos-blockchain-blend-message", @@ -3427,7 +3427,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-crypto" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "blake2", "logos-blockchain-groth16", @@ -3441,7 +3441,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-message" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "blake2", "derivative", @@ -3463,7 +3463,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-network" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "either", "futures", @@ -3481,7 +3481,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-proofs" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "ed25519-dalek", "generic-array 1.3.5", @@ -3496,7 +3496,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-scheduling" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "derivative", @@ -3519,7 +3519,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "fork_stream", @@ -3554,7 +3554,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-broadcast-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "derivative", @@ -3570,7 +3570,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-leader-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "futures", @@ -3598,7 +3598,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-network-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "futures", @@ -3626,7 +3626,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "bytes", @@ -3656,7 +3656,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-service-common" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "logos-blockchain-core", "serde", @@ -3665,7 +3665,7 @@ dependencies = [ [[package]] name = "logos-blockchain-circuits-prover" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "logos-blockchain-circuits-utils", "tempfile", @@ -3674,7 +3674,7 @@ dependencies = [ [[package]] name = "logos-blockchain-circuits-utils" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "dirs", ] @@ -3682,7 +3682,7 @@ dependencies = [ [[package]] name = "logos-blockchain-common-http-client" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "futures", "logos-blockchain-chain-broadcast-service", @@ -3699,7 +3699,7 @@ dependencies = [ [[package]] name = "logos-blockchain-core" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "ark-ff 0.4.2", "bincode", @@ -3729,7 +3729,7 @@ dependencies = [ [[package]] name = "logos-blockchain-cryptarchia-engine" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "cfg_eval", "logos-blockchain-utils", @@ -3744,7 +3744,7 @@ dependencies = [ [[package]] name = "logos-blockchain-cryptarchia-sync" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "bytes", "futures", @@ -3763,7 +3763,7 @@ dependencies = [ [[package]] name = "logos-blockchain-groth16" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "ark-bn254 0.4.0", "ark-ec 0.4.2", @@ -3781,7 +3781,7 @@ dependencies = [ [[package]] name = "logos-blockchain-http-api-common" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "axum", "governor", @@ -3796,7 +3796,7 @@ dependencies = [ [[package]] name = "logos-blockchain-key-management-system-keys" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "bytes", @@ -3821,7 +3821,7 @@ dependencies = [ [[package]] name = "logos-blockchain-key-management-system-macros" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "proc-macro2", "quote", @@ -3831,7 +3831,7 @@ dependencies = [ [[package]] name = "logos-blockchain-key-management-system-operators" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "logos-blockchain-blend-proofs", @@ -3847,7 +3847,7 @@ dependencies = [ [[package]] name = "logos-blockchain-key-management-system-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "log", @@ -3863,7 +3863,7 @@ dependencies = [ [[package]] name = "logos-blockchain-ledger" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "derivative", "logos-blockchain-blend-crypto", @@ -3887,7 +3887,7 @@ dependencies = [ [[package]] name = "logos-blockchain-libp2p" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "backon", @@ -3916,7 +3916,7 @@ dependencies = [ [[package]] name = "logos-blockchain-network-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "futures", @@ -3935,7 +3935,7 @@ dependencies = [ [[package]] name = "logos-blockchain-node" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "axum", @@ -3991,7 +3991,7 @@ dependencies = [ [[package]] name = "logos-blockchain-poc" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", @@ -4006,7 +4006,7 @@ dependencies = [ [[package]] name = "logos-blockchain-pol" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", @@ -4022,7 +4022,7 @@ dependencies = [ [[package]] name = "logos-blockchain-poq" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", @@ -4038,7 +4038,7 @@ dependencies = [ [[package]] name = "logos-blockchain-poseidon2" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "ark-bn254 0.4.0", "ark-ff 0.4.2", @@ -4049,7 +4049,7 @@ dependencies = [ [[package]] name = "logos-blockchain-sdp-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "futures", @@ -4065,7 +4065,7 @@ dependencies = [ [[package]] name = "logos-blockchain-services-utils" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "futures", @@ -4080,7 +4080,7 @@ dependencies = [ [[package]] name = "logos-blockchain-storage-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "bytes", @@ -4098,7 +4098,7 @@ dependencies = [ [[package]] name = "logos-blockchain-system-sig-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-ctrlc", "async-trait", @@ -4109,7 +4109,7 @@ dependencies = [ [[package]] name = "logos-blockchain-time-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "cfg_eval", @@ -4131,7 +4131,7 @@ dependencies = [ [[package]] name = "logos-blockchain-tracing" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "opentelemetry", "opentelemetry-http", @@ -4154,7 +4154,7 @@ dependencies = [ [[package]] name = "logos-blockchain-tracing-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "logos-blockchain-tracing", @@ -4168,7 +4168,7 @@ dependencies = [ [[package]] name = "logos-blockchain-tx-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "futures", @@ -4190,7 +4190,7 @@ dependencies = [ [[package]] name = "logos-blockchain-utils" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "blake2", @@ -4207,7 +4207,7 @@ dependencies = [ [[package]] name = "logos-blockchain-utxotree" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "ark-ff 0.4.2", "logos-blockchain-groth16", @@ -4221,7 +4221,7 @@ dependencies = [ [[package]] name = "logos-blockchain-wallet" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "logos-blockchain-core", "logos-blockchain-key-management-system-keys", @@ -4236,7 +4236,7 @@ dependencies = [ [[package]] name = "logos-blockchain-wallet-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "async-trait", "bytes", @@ -4261,7 +4261,7 @@ dependencies = [ [[package]] name = "logos-blockchain-witness-generator" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "tempfile", ] @@ -4269,7 +4269,7 @@ dependencies = [ [[package]] name = "logos-blockchain-zksign" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=d40db90e8b1649735e4c981ec4cd84063d0d0bfe#d40db90e8b1649735e4c981ec4cd84063d0d0bfe" +source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", diff --git a/Cargo.toml b/Cargo.toml index bfd699b..e59709a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,37 +40,37 @@ testing-framework-runner-local = { default-features = false, path = "testing-f testing-framework-workflows = { default-features = false, path = "testing-framework/workflows" } # Logos git dependencies (pinned to latest master) -broadcast-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-broadcast-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +broadcast-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-broadcast-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } cfgsync_tf = { default-features = false, path = "testing-framework/tools/cfgsync_tf" } -chain-leader = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-leader-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -chain-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-network-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -chain-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -common-http-client = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-common-http-client", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -cryptarchia-engine = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-engine", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -cryptarchia-sync = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-sync", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -groth16 = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-groth16", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -key-management-system-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-key-management-system-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -nomos-api = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-api-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -nomos-blend-message = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-message", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -nomos-blend-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -nomos-core = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-core", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -nomos-http-api-common = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-http-api-common", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -nomos-ledger = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-ledger", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -nomos-libp2p = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-libp2p", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -nomos-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-network-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -nomos-node = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-node", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -nomos-sdp = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-sdp-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -nomos-time = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-time-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -nomos-tracing = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -nomos-tracing-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -nomos-utils = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-utils", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -nomos-wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -poc = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-poc", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -pol = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-pol", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -tests = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tests", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -tx-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tx-service", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } -zksign = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-zksign", rev = "d40db90e8b1649735e4c981ec4cd84063d0d0bfe" } +chain-leader = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-leader-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +chain-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-network-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +chain-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +common-http-client = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-common-http-client", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +cryptarchia-engine = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-engine", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +cryptarchia-sync = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-sync", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +groth16 = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-groth16", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +key-management-system-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-key-management-system-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +nomos-api = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-api-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +nomos-blend-message = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-message", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +nomos-blend-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +nomos-core = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-core", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +nomos-http-api-common = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-http-api-common", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +nomos-ledger = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-ledger", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +nomos-libp2p = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-libp2p", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +nomos-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-network-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +nomos-node = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-node", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +nomos-sdp = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-sdp-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +nomos-time = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-time-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +nomos-tracing = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +nomos-tracing-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +nomos-utils = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-utils", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +nomos-wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +poc = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-poc", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +pol = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-pol", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +tests = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tests", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +tx-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tx-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +zksign = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-zksign", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } # External crates async-trait = { default-features = false, version = "0.1" } diff --git a/versions.env b/versions.env index 4ce9df3..0bebacd 100644 --- a/versions.env +++ b/versions.env @@ -1,7 +1,7 @@ VERSION=v0.3.2 LOGOS_BLOCKCHAIN_BUNDLE_VERSION=v4 # Pinned logos-blockchain-node revision used for CI builds and binary bundles. -LOGOS_BLOCKCHAIN_NODE_REV=d40db90e8b1649735e4c981ec4cd84063d0d0bfe +LOGOS_BLOCKCHAIN_NODE_REV=2392190d88e8ae8271fa9321014ea33324be7c28 # Optional: local logos-blockchain-node checkout override (do not commit absolute paths). # LOGOS_BLOCKCHAIN_NODE_PATH= From e283defa72f88ab20c98cb7814aa219a4eebac66 Mon Sep 17 00:00:00 2001 From: andrussal Date: Wed, 4 Feb 2026 16:42:16 +0100 Subject: [PATCH 08/11] Fix genesis utxos and scale leader stake --- .../configs/src/topology/configs/consensus.rs | 48 +++++++++++++++++-- .../configs/src/topology/configs/mod.rs | 7 ++- testing-framework/core/src/topology/config.rs | 9 +++- .../tools/cfgsync_tf/src/config/builder.rs | 6 ++- 4 files changed, 62 insertions(+), 8 deletions(-) diff --git a/testing-framework/configs/src/topology/configs/consensus.rs b/testing-framework/configs/src/topology/configs/consensus.rs index eca32ac..0089811 100644 --- a/testing-framework/configs/src/topology/configs/consensus.rs +++ b/testing-framework/configs/src/topology/configs/consensus.rs @@ -12,7 +12,7 @@ use key_management_system_service::keys::{ }; use nomos_core::{ mantle::{ - MantleTx, Note, OpProof, Utxo, + GenesisTx as GenesisTxTrait, MantleTx, Note, OpProof, Utxo, genesis_tx::GenesisTx, ledger::Tx as LedgerTx, ops::{ @@ -38,6 +38,8 @@ pub enum ConsensusConfigError { LedgerConfig { message: String }, #[error("failed to sign genesis declarations: {message}")] DeclarationSignature { message: String }, + #[error("genesis ledger is missing expected utxo note: {note}")] + MissingGenesisUtxo { note: String }, } #[derive(Clone)] @@ -215,11 +217,13 @@ pub fn create_consensus_configs( let mut blend_notes = Vec::new(); let mut sdp_notes = Vec::new(); + let leader_stake = leader_stake_amount(wallet, ids.len()); let utxos = create_utxos_for_leader_and_services( ids, &mut leader_keys, &mut blend_notes, &mut sdp_notes, + leader_stake, ); let mut utxos = append_wallet_utxos(utxos, wallet); let genesis_tx = create_genesis_tx(&mut utxos)?; @@ -241,18 +245,33 @@ pub fn create_consensus_configs( .collect()) } +fn leader_stake_amount(wallet: &WalletConfig, n_participants: usize) -> u64 { + let total_wallet_funds: u64 = wallet.accounts.iter().map(|account| account.value).sum(); + if total_wallet_funds == 0 { + return 100_000; + } + + let n = n_participants.max(1) as u64; + let scaled = total_wallet_funds + .saturating_mul(10) + .saturating_div(n) + .max(1); + scaled.max(100_000) +} + fn create_utxos_for_leader_and_services( ids: &[[u8; 32]], leader_keys: &mut Vec<(ZkPublicKey, UnsecuredZkKey)>, blend_notes: &mut Vec, sdp_notes: &mut Vec, + leader_stake: u64, ) -> Vec { let mut utxos = Vec::new(); // Create notes for leader, Blend and DA declarations. let mut output_index = 0; for &id in ids { - output_index = push_leader_utxo(id, leader_keys, &mut utxos, output_index); + output_index = push_leader_utxo(id, leader_keys, &mut utxos, output_index, leader_stake); output_index = push_service_note(b"bn", id, blend_notes, &mut utxos, output_index); output_index = push_service_note(b"sdp", id, sdp_notes, &mut utxos, output_index); } @@ -276,13 +295,14 @@ fn push_leader_utxo( leader_keys: &mut Vec<(ZkPublicKey, UnsecuredZkKey)>, utxos: &mut Vec, output_index: usize, + leader_stake: u64, ) -> usize { let sk_data = derive_key_material(b"ld", &id); let sk = UnsecuredZkKey::from(BigUint::from_bytes_le(&sk_data)); let pk = sk.to_public_key(); leader_keys.push((pk, sk)); utxos.push(Utxo { - note: Note::new(100_000, pk), + note: Note::new(leader_stake, pk), tx_hash: BigUint::from(0u8).into(), output_index, }); @@ -427,3 +447,25 @@ fn build_genesis_tx( message: err.to_string(), }) } + +pub fn sync_utxos_with_genesis( + utxos: &mut [Utxo], + genesis_tx: &GenesisTx, +) -> Result<(), ConsensusConfigError> { + let ledger_tx = genesis_tx.mantle_tx().ledger_tx.clone(); + let ledger_tx_hash = ledger_tx.hash(); + let outputs = &ledger_tx.outputs; + + for utxo in utxos { + let output_index = outputs + .iter() + .position(|note| note == &utxo.note) + .ok_or_else(|| ConsensusConfigError::MissingGenesisUtxo { + note: format!("{:?}", utxo.note), + })?; + utxo.output_index = output_index; + utxo.tx_hash = ledger_tx_hash; + } + + Ok(()) +} diff --git a/testing-framework/configs/src/topology/configs/mod.rs b/testing-framework/configs/src/topology/configs/mod.rs index 6073bbe..8f09ae7 100644 --- a/testing-framework/configs/src/topology/configs/mod.rs +++ b/testing-framework/configs/src/topology/configs/mod.rs @@ -116,7 +116,7 @@ pub fn create_general_configs_with_blend_core_subset( collect_blend_core_providers(first_consensus, &blend_configs, n_blend_core_nodes)?; let ledger_tx = first_consensus.genesis_tx.mantle_tx().ledger_tx.clone(); let genesis_tx = create_genesis_tx_with_declarations(ledger_tx, providers)?; - apply_consensus_genesis_tx(&mut consensus_configs, &genesis_tx); + apply_consensus_genesis_tx(&mut consensus_configs, &genesis_tx)?; // Set Blend and DA keys in KMS of each node config. let kms_configs = build_kms_configs(&blend_configs); @@ -200,10 +200,13 @@ fn collect_blend_core_providers( fn apply_consensus_genesis_tx( consensus_configs: &mut [GeneralConsensusConfig], genesis_tx: &nomos_core::mantle::genesis_tx::GenesisTx, -) { +) -> Result<(), ConsensusConfigError> { for c in consensus_configs { c.genesis_tx = genesis_tx.clone(); + consensus::sync_utxos_with_genesis(&mut c.utxos, genesis_tx)?; } + + Ok(()) } fn build_kms_configs(blend_configs: &[GeneralBlendConfig]) -> Vec { diff --git a/testing-framework/core/src/topology/config.rs b/testing-framework/core/src/topology/config.rs index 4bc017f..da9b2ac 100644 --- a/testing-framework/core/src/topology/config.rs +++ b/testing-framework/core/src/topology/config.rs @@ -218,7 +218,7 @@ impl TopologyBuilder { let providers = collect_provider_infos(first_consensus, &blend_configs)?; let genesis_tx = create_consensus_genesis_tx(first_consensus, providers)?; - apply_consensus_genesis_tx(&mut consensus_configs, &genesis_tx); + apply_consensus_genesis_tx(&mut consensus_configs, &genesis_tx)?; let kms_configs = create_kms_configs( &blend_configs, @@ -307,10 +307,15 @@ fn create_consensus_genesis_tx( fn apply_consensus_genesis_tx( consensus_configs: &mut [testing_framework_config::topology::configs::consensus::GeneralConsensusConfig], genesis_tx: &nomos_core::mantle::genesis_tx::GenesisTx, -) { +) -> Result<(), TopologyBuildError> { for c in consensus_configs { c.genesis_tx = genesis_tx.clone(); + testing_framework_config::topology::configs::consensus::sync_utxos_with_genesis( + &mut c.utxos, + genesis_tx, + )?; } + Ok(()) } #[allow(clippy::too_many_arguments)] diff --git a/testing-framework/tools/cfgsync_tf/src/config/builder.rs b/testing-framework/tools/cfgsync_tf/src/config/builder.rs index 44a1f51..74638f1 100644 --- a/testing-framework/tools/cfgsync_tf/src/config/builder.rs +++ b/testing-framework/tools/cfgsync_tf/src/config/builder.rs @@ -8,7 +8,10 @@ use testing_framework_config::topology::configs::{ GeneralConfig, api::GeneralApiConfig, base::{BaseConfigError, BaseConfigs, build_base_configs}, - consensus::{ConsensusConfigError, ConsensusParams, create_genesis_tx_with_declarations}, + consensus::{ + ConsensusConfigError, ConsensusParams, create_genesis_tx_with_declarations, + sync_utxos_with_genesis, + }, network::NetworkParams, time::default_time_config, wallet::WalletConfig, @@ -131,6 +134,7 @@ pub fn try_create_node_configs( for c in &mut consensus_configs { c.genesis_tx = genesis_tx.clone(); + sync_utxos_with_genesis(&mut c.utxos, &genesis_tx)?; } let kms_configs = create_kms_configs(&blend_configs); From abfb866a80d78671e656d5832435c05f48aa31a9 Mon Sep 17 00:00:00 2001 From: andrussal Date: Thu, 5 Feb 2026 06:10:36 +0100 Subject: [PATCH 09/11] Document leader stake constants --- .../configs/src/topology/configs/consensus.rs | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/testing-framework/configs/src/topology/configs/consensus.rs b/testing-framework/configs/src/topology/configs/consensus.rs index 0089811..c620ea7 100644 --- a/testing-framework/configs/src/topology/configs/consensus.rs +++ b/testing-framework/configs/src/topology/configs/consensus.rs @@ -246,17 +246,32 @@ pub fn create_consensus_configs( } fn leader_stake_amount(wallet: &WalletConfig, n_participants: usize) -> u64 { + // Minimum leader stake (legacy baseline) so small test wallets still + // have a viable leader in low-fund scenarios. + const MIN_LEADER_STAKE: u64 = 100_000; + + // Leader stake multiplier relative to average wallet allocation per validator. + // Keeps the leader stake competitive when wallet-funded UTXOs dominate total + // stake. + const LEADER_STAKE_MULTIPLIER: u64 = 10; + let total_wallet_funds: u64 = wallet.accounts.iter().map(|account| account.value).sum(); if total_wallet_funds == 0 { - return 100_000; + return MIN_LEADER_STAKE; } let n = n_participants.max(1) as u64; + + // Scale leader stake to stay competitive with large wallet-funded UTXOs. + // We use LEADER_STAKE_MULTIPLIER × (total_wallet_funds / n) to keep + // block production likely even when wallets dominate total stake. let scaled = total_wallet_funds - .saturating_mul(10) + .saturating_mul(LEADER_STAKE_MULTIPLIER) .saturating_div(n) .max(1); - scaled.max(100_000) + + // Floor to preserve the prior baseline leader stake and avoid too-small values. + scaled.max(MIN_LEADER_STAKE) } fn create_utxos_for_leader_and_services( From 70dbef96c2965c72dd7bfd67678c4df990e6bc25 Mon Sep 17 00:00:00 2001 From: Hansie Odendaal <39146854+hansieodendaal@users.noreply.github.com> Date: Fri, 6 Feb 2026 09:06:40 +0200 Subject: [PATCH 10/11] feat: add custom persistent dir option for working files (#26) --- .github/workflows/lint.yml | 2 - README.md | 1 - book/src/annotated-tree.md | 4 +- book/src/architecture-overview.md | 4 +- book/src/authoring-scenarios.md | 2 +- book/src/best-practices.md | 4 - book/src/ci-integration.md | 12 -- book/src/environment-variables.md | 28 ----- book/src/examples.md | 4 +- book/src/glossary.md | 4 - book/src/logging-observability.md | 11 +- book/src/manual-cluster.md | 2 - book/src/operations-overview.md | 1 - book/src/prerequisites.md | 33 +---- book/src/quickstart.md | 8 +- book/src/runners.md | 2 - book/src/running-examples.md | 7 -- book/src/running-scenarios.md | 3 - book/src/troubleshooting.md | 118 ++++++------------ book/src/workloads.md | 25 ++-- examples/src/bin/local_runner.rs | 7 +- examples/src/defaults.rs | 1 - examples/tests/dynamic_join.rs | 1 + examples/tests/manual_cluster.rs | 57 ++++++++- examples/tests/node_config_override.rs | 3 +- examples/tests/orphan_manual_cluster.rs | 1 - scripts/run/run-examples.sh | 1 - .../assets/stack/scripts/run_nomos.sh | 3 +- .../configs/src/topology/configs/mod.rs | 5 +- .../core/src/nodes/common/node.rs | 6 +- testing-framework/core/src/nodes/mod.rs | 43 ++++++- testing-framework/core/src/nodes/node.rs | 14 +-- .../core/src/scenario/capabilities.rs | 5 +- testing-framework/core/src/topology/config.rs | 34 ++++- .../core/src/topology/generation.rs | 3 +- .../deployers/compose/src/descriptor/mod.rs | 2 - .../k8s/src/infrastructure/assets.rs | 13 +- .../deployers/local/src/node_control/mod.rs | 7 +- testing-framework/env/src/lib.rs | 5 - .../src/expectations/consensus_liveness.rs | 4 +- 40 files changed, 208 insertions(+), 282 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 828921d..229f473 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -239,7 +239,6 @@ jobs: host_smoke: runs-on: ubuntu-latest env: - POL_PROOF_DEV_MODE: true LOCAL_DEMO_RUN_SECS: 120 LOCAL_DEMO_VALIDATORS: 1 LOGOS_BLOCKCHAIN_CIRCUITS: ${{ github.workspace }}/.tmp/logos-blockchain-circuits @@ -500,7 +499,6 @@ jobs: - name: Run compose mixed workload binary env: - POL_PROOF_DEV_MODE: "true" COMPOSE_NODE_PAIRS: "1x1" LOGOS_BLOCKCHAIN_TESTNET_IMAGE: ${{ env.LOGOS_BLOCKCHAIN_TESTNET_IMAGE }} COMPOSE_RUNNER_HOST: "127.0.0.1" diff --git a/README.md b/README.md index 48d5503..a3aea03 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,6 @@ Key environment variables for customization: | Variable | Purpose | Default | |----------|---------|---------| -| `POL_PROOF_DEV_MODE=true` | **Required** — Disable expensive proof generation (set automatically by `scripts/run/run-examples.sh`) | (none) | | `LOGOS_BLOCKCHAIN_TESTNET_IMAGE` | Docker image tag for compose/k8s | `logos-blockchain-testing:local` | | `LOGOS_BLOCKCHAIN_DEMO_NODES` | Number of nodes | Varies by example | | `LOGOS_BLOCKCHAIN_LOG_DIR` | Directory for persistent log files | (temporary) | diff --git a/book/src/annotated-tree.md b/book/src/annotated-tree.md index 5835460..d4d05e9 100644 --- a/book/src/annotated-tree.md +++ b/book/src/annotated-tree.md @@ -65,9 +65,7 @@ Convenience utilities: - `compose_runner.rs` — Docker Compose (requires `LOGOS_BLOCKCHAIN_TESTNET_IMAGE` built) - `k8s_runner.rs` — Kubernetes (requires cluster + image) -**Run with:** `POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin ` - -**All runners require `POL_PROOF_DEV_MODE=true`** to avoid expensive proof generation. +**Run with:** `cargo run -p runner-examples --bin ` ### `scripts/` Helper utilities: diff --git a/book/src/architecture-overview.md b/book/src/architecture-overview.md index f55a159..73c8759 100644 --- a/book/src/architecture-overview.md +++ b/book/src/architecture-overview.md @@ -150,11 +150,9 @@ This handles circuit setup, binary building/bundling, image building, and execut **Alternative:** Direct cargo run (requires manual setup): ```bash -POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin +cargo run -p runner-examples --bin ``` -**Important:** All runners require `POL_PROOF_DEV_MODE=true` to avoid expensive Groth16 proof generation that causes timeouts. - These binaries use the framework API (`ScenarioBuilder`) to construct and execute scenarios. ## Builder API diff --git a/book/src/authoring-scenarios.md b/book/src/authoring-scenarios.md index c9519da..95e9ef9 100644 --- a/book/src/authoring-scenarios.md +++ b/book/src/authoring-scenarios.md @@ -153,7 +153,7 @@ async fn hello_consensus_liveness() -> Result<()> { **Run it:** ```bash -POL_PROOF_DEV_MODE=true cargo test hello_consensus_liveness +cargo test hello_consensus_liveness ``` --- diff --git a/book/src/best-practices.md b/book/src/best-practices.md index 3fdb756..6bc802a 100644 --- a/book/src/best-practices.md +++ b/book/src/best-practices.md @@ -128,13 +128,9 @@ strategy: ## Anti-Patterns to Avoid -**DON'T: Run without POL_PROOF_DEV_MODE** ```bash # BAD: Will hang/timeout on proof generation cargo run -p runner-examples --bin local_runner - -# GOOD: Fast mode for testing -POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin local_runner ``` **DON'T: Use tiny durations** diff --git a/book/src/ci-integration.md b/book/src/ci-integration.md index 13d5a2f..a258d2c 100644 --- a/book/src/ci-integration.md +++ b/book/src/ci-integration.md @@ -39,7 +39,6 @@ on: branches: [main] env: - POL_PROOF_DEV_MODE: true CARGO_TERM_COLOR: always RUST_BACKTRACE: 1 @@ -243,17 +242,6 @@ if: github.event_name == 'push' && github.ref == 'refs/heads/main' ## Best Practices -### Required: Set POL_PROOF_DEV_MODE - -**Always set `POL_PROOF_DEV_MODE=true` globally** in your workflow env: - -```yaml -env: - POL_PROOF_DEV_MODE: true # REQUIRED! -``` - -Without this, tests will hang due to expensive proof generation. - ### Use Helper Scripts Prefer `scripts/run/run-examples.sh` which handles all setup automatically: diff --git a/book/src/environment-variables.md b/book/src/environment-variables.md index 239e38b..bcfd7de 100644 --- a/book/src/environment-variables.md +++ b/book/src/environment-variables.md @@ -2,27 +2,6 @@ Complete reference of environment variables used by the testing framework, organized by category. -## Critical Variables - -These MUST be set for successful test runs: - -| Variable | Required | Default | Effect | -|----------|----------|---------|--------| -| `POL_PROOF_DEV_MODE` | **YES** | — | **REQUIRED for all runners**. Set to `true` to use fast dev-mode proving instead of expensive Groth16. Without this, tests will hang/timeout. | - -**Example:** - -```bash -export POL_PROOF_DEV_MODE=true -``` - -Or add to your shell profile (`~/.bashrc`, `~/.zshrc`): - -```bash -# Required for nomos-testing framework -export POL_PROOF_DEV_MODE=true -``` - --- ## Runner Selection & Topology @@ -138,7 +117,6 @@ Control node log output (not framework runner logs): LOGOS_BLOCKCHAIN_LOG_DIR=/tmp/test-logs \ LOGOS_BLOCKCHAIN_LOG_LEVEL=debug \ LOGOS_BLOCKCHAIN_LOG_FILTER="cryptarchia=trace" \ -POL_PROOF_DEV_MODE=true \ cargo run -p runner-examples --bin local_runner # Inspect logs @@ -303,7 +281,6 @@ Node-level configuration passed through to logos-blockchain-node: # Faster block production CONSENSUS_SLOT_TIME=5 \ CONSENSUS_ACTIVE_SLOT_COEFF=0.9 \ -POL_PROOF_DEV_MODE=true \ cargo run -p runner-examples --bin local_runner ``` @@ -350,14 +327,12 @@ Variables used by helper scripts (`scripts/run/run-examples.sh`, etc.): ### Minimal Host Run ```bash -POL_PROOF_DEV_MODE=true \ scripts/run/run-examples.sh -t 60 -n 3 host ``` ### Debug Logging (Host) ```bash -POL_PROOF_DEV_MODE=true \ LOGOS_BLOCKCHAIN_LOG_DIR=/tmp/logs \ LOGOS_BLOCKCHAIN_LOG_LEVEL=debug \ LOGOS_BLOCKCHAIN_LOG_FILTER="cryptarchia=trace" \ @@ -367,7 +342,6 @@ scripts/run/run-examples.sh -t 60 -n 3 host ### Compose with Observability ```bash -POL_PROOF_DEV_MODE=true \ LOGOS_BLOCKCHAIN_METRICS_QUERY_URL=http://localhost:9090 \ LOGOS_BLOCKCHAIN_GRAFANA_URL=http://localhost:3000 \ scripts/run/run-examples.sh -t 60 -n 3 compose @@ -376,7 +350,6 @@ scripts/run/run-examples.sh -t 60 -n 3 compose ### K8s with Debug ```bash -POL_PROOF_DEV_MODE=true \ K8S_RUNNER_NAMESPACE=nomos-debug \ K8S_RUNNER_DEBUG=1 \ K8S_RUNNER_PRESERVE=1 \ @@ -387,7 +360,6 @@ scripts/run/run-examples.sh -t 60 -n 3 k8s ```yaml env: - POL_PROOF_DEV_MODE: true RUST_BACKTRACE: 1 LOGOS_BLOCKCHAIN_TESTS_KEEP_LOGS: 1 ``` diff --git a/book/src/examples.md b/book/src/examples.md index de8cd42..6f696a2 100644 --- a/book/src/examples.md +++ b/book/src/examples.md @@ -15,9 +15,7 @@ and expectations. **Recommended:** Use `scripts/run/run-examples.sh -t -n ` where mode is `host`, `compose`, or `k8s`. -**Alternative:** Direct cargo run: `POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin ` - -**All runners require `POL_PROOF_DEV_MODE=true`** to avoid expensive proof generation. +**Alternative:** Direct cargo run: `cargo run -p runner-examples --bin ` **Code patterns** below show how to build scenarios. Wrap these in `#[tokio::test]` functions for integration tests, or `#[tokio::main]` for binaries. diff --git a/book/src/glossary.md b/book/src/glossary.md index c684bff..4e5a55b 100644 --- a/book/src/glossary.md +++ b/book/src/glossary.md @@ -38,10 +38,6 @@ Also called "correctness expectations." - **Mantle transaction**: transaction type in Logos that can contain UTXO transfers (LedgerTx) and operations (Op). -- **POL_PROOF_DEV_MODE**: environment variable that disables expensive Groth16 zero-knowledge - proof generation for leader election. **Required for all runners** (local, compose, k8s) - for practical testing—without it, proof generation causes timeouts. Should never be - used in production environments. --- diff --git a/book/src/logging-observability.md b/book/src/logging-observability.md index 16b79fb..9243874 100644 --- a/book/src/logging-observability.md +++ b/book/src/logging-observability.md @@ -46,7 +46,6 @@ LOGOS_BLOCKCHAIN_TESTS_TRACING=true \ LOGOS_BLOCKCHAIN_LOG_DIR=/tmp/test-logs \ LOGOS_BLOCKCHAIN_LOG_LEVEL=debug \ LOGOS_BLOCKCHAIN_LOG_FILTER="cryptarchia=trace,chain_service=info,chain_network=info" \ -POL_PROOF_DEV_MODE=true \ cargo run -p runner-examples --bin local_runner ``` @@ -90,7 +89,7 @@ LOGOS_BLOCKCHAIN_LOG_FILTER="cryptarchia=trace,chain_service=info,chain_network= **Default (temporary directories, auto-cleanup):** ```bash -POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin local_runner +cargo run -p runner-examples --bin local_runner # Logs written to temporary directories in working directory # Automatically cleaned up after test completes ``` @@ -99,7 +98,6 @@ POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin local_runner ```bash LOGOS_BLOCKCHAIN_LOG_DIR=/tmp/local-logs \ -POL_PROOF_DEV_MODE=true \ cargo run -p runner-examples --bin local_runner # After test completes: @@ -137,7 +135,6 @@ To write per-node log files inside containers, set `tracing_settings.logger: !Fi ```bash # Ensure cfgsync.yaml is configured to log to /logs LOGOS_BLOCKCHAIN_TESTNET_IMAGE=logos-blockchain-testing:local \ -POL_PROOF_DEV_MODE=true \ cargo run -p runner-examples --bin compose_runner # After test, copy files from containers: @@ -257,7 +254,6 @@ scripts/setup/setup-observability.sh compose up eval $(scripts/setup/setup-observability.sh compose env) # Run scenario with metrics -POL_PROOF_DEV_MODE=true \ scripts/run/run-examples.sh -t 60 -n 3 compose ``` @@ -275,7 +271,7 @@ scripts/setup/setup-observability.sh compose up eval $(scripts/setup/setup-observability.sh compose env) export LOGOS_BLOCKCHAIN_GRAFANA_URL=http://localhost:3000 -POL_PROOF_DEV_MODE=true scripts/run/run-examples.sh -t 60 -n 3 compose +scripts/run/run-examples.sh -t 60 -n 3 compose ``` **Default bundled Grafana login:** `admin` / `admin` (see `scripts/observability/compose/docker-compose.yml`). @@ -322,7 +318,6 @@ flowchart TD LOGOS_BLOCKCHAIN_LOG_DIR=/tmp/logs \ LOGOS_BLOCKCHAIN_LOG_LEVEL=debug \ LOGOS_BLOCKCHAIN_LOG_FILTER="cryptarchia=trace" \ -POL_PROOF_DEV_MODE=true \ scripts/run/run-examples.sh -t 60 -n 3 host ``` @@ -334,7 +329,6 @@ scripts/setup/setup-observability.sh compose up eval $(scripts/setup/setup-observability.sh compose env) # Run with metrics -POL_PROOF_DEV_MODE=true \ scripts/run/run-examples.sh -t 60 -n 3 compose # Access Grafana at http://localhost:3000 @@ -346,7 +340,6 @@ scripts/run/run-examples.sh -t 60 -n 3 compose K8S_RUNNER_NAMESPACE=nomos-debug \ K8S_RUNNER_DEBUG=1 \ K8S_RUNNER_PRESERVE=1 \ -POL_PROOF_DEV_MODE=true \ scripts/run/run-examples.sh -t 60 -n 3 k8s # Inspect logs diff --git a/book/src/manual-cluster.md b/book/src/manual-cluster.md index b9fce9a..d42b2da 100644 --- a/book/src/manual-cluster.md +++ b/book/src/manual-cluster.md @@ -375,7 +375,6 @@ async fn external_driver_example() -> Result<()> { ```bash # Required: dev mode for fast proofs -POL_PROOF_DEV_MODE=true \ cargo test -p runner-examples -- --ignored external_driver_example ``` @@ -385,7 +384,6 @@ cargo test -p runner-examples -- --ignored external_driver_example # Preserve logs after test LOGOS_BLOCKCHAIN_TESTS_KEEP_LOGS=1 \ RUST_LOG=info \ -POL_PROOF_DEV_MODE=true \ cargo test -p runner-examples -- --ignored external_driver_example ``` diff --git a/book/src/operations-overview.md b/book/src/operations-overview.md index 230d9ef..5df7156 100644 --- a/book/src/operations-overview.md +++ b/book/src/operations-overview.md @@ -23,7 +23,6 @@ Operational readiness focuses on prerequisites, environment fit, and clear signa - Binary bundles for reproducible builds **Environment Configuration:** -- `POL_PROOF_DEV_MODE=true` is **REQUIRED for all runners** to avoid expensive proof generation - Logging configured via `LOGOS_BLOCKCHAIN_LOG_*` variables - Observability endpoints (Prometheus, Grafana) optional but useful diff --git a/book/src/prerequisites.md b/book/src/prerequisites.md index 7047e72..83c3415 100644 --- a/book/src/prerequisites.md +++ b/book/src/prerequisites.md @@ -194,30 +194,6 @@ minikube image load logos-blockchain-testing:local - Resource isolation - Large topologies -## Critical Environment Variable - -**`POL_PROOF_DEV_MODE=true` is REQUIRED for ALL runners!** - -Without this, proof generation uses expensive Groth16 proving, causing: -- Tests "hang" for minutes -- CPU spikes to 100% -- Timeouts and failures - -**Always set:** - -```bash -POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin local_runner -POL_PROOF_DEV_MODE=true scripts/run/run-examples.sh -t 60 -n 3 compose -# etc. -``` - -**Or add to your shell profile:** - -```bash -# ~/.bashrc or ~/.zshrc -export POL_PROOF_DEV_MODE=true -``` - ## Quick Setup Check Run this checklist before your first scenario: @@ -229,16 +205,13 @@ cat versions.env # 2. Check circuit assets ls -lh "${HOME}/.logos-blockchain-circuits" -# 3. Verify POL_PROOF_DEV_MODE is set -echo $POL_PROOF_DEV_MODE # Should print: true - -# 4. For compose/k8s: verify Docker is running +# 3. For compose/k8s: verify Docker is running docker ps -# 5. For compose/k8s: verify image exists +# 4. For compose/k8s: verify image exists docker images | grep logos-blockchain-testing -# 6. For host runner: verify node binaries (if not using scripts) +# 5. For host runner: verify node binaries (if not using scripts) $LOGOS_BLOCKCHAIN_NODE_BIN --version ``` diff --git a/book/src/quickstart.md b/book/src/quickstart.md index 450afec..991fd89 100644 --- a/book/src/quickstart.md +++ b/book/src/quickstart.md @@ -16,7 +16,7 @@ git clone https://github.com/logos-blockchain/logos-blockchain-testing.git cd logos-blockchain-testing # 3. Run your first scenario (downloads dependencies automatically) -POL_PROOF_DEV_MODE=true scripts/run/run-examples.sh -t 60 -n 1 host +scripts/run/run-examples.sh -t 60 -n 1 host ``` **First run takes 5-10 minutes** (downloads ~120MB circuit assets, builds binaries). @@ -56,7 +56,7 @@ This handles circuit setup, binary building, and runs a complete scenario: 1 nod ```bash # Requires circuits in place and LOGOS_BLOCKCHAIN_NODE_BIN set -POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin local_runner +cargo run -p runner-examples --bin local_runner ``` **Core API Pattern** (simplified example): @@ -92,8 +92,6 @@ pub async fn run_local_demo() -> Result<()> { **Note:** The examples are binaries with `#[tokio::main]`, not test functions. If you want to write integration tests, wrap this pattern in `#[tokio::test]` functions in your own test suite. -**Important:** `POL_PROOF_DEV_MODE=true` disables expensive Groth16 zero-knowledge proof generation for leader election. Without it, proof generation is CPU-intensive and tests will timeout. **This is required for all runners** (local, compose, k8s) for practical testing. Never use in production. - **What you should see:** - Nodes spawn as local processes - Consensus starts producing blocks @@ -213,7 +211,6 @@ scripts/run/run-examples.sh -t 120 -n 3 host # Uses LOGOS_BLOCKCHAIN_DEMO_* env vars (or legacy *_DEMO_* vars) LOGOS_BLOCKCHAIN_DEMO_NODES=3 \ LOGOS_BLOCKCHAIN_DEMO_RUN_SECS=120 \ -POL_PROOF_DEV_MODE=true \ cargo run -p runner-examples --bin local_runner ``` @@ -246,7 +243,6 @@ scripts/build/build_test_image.sh # Run with Compose LOGOS_BLOCKCHAIN_TESTNET_IMAGE=logos-blockchain-testing:local \ -POL_PROOF_DEV_MODE=true \ cargo run -p runner-examples --bin compose_runner ``` diff --git a/book/src/runners.md b/book/src/runners.md index 000dbd5..40f72b0 100644 --- a/book/src/runners.md +++ b/book/src/runners.md @@ -4,8 +4,6 @@ Runners turn a scenario plan into a live environment while keeping the plan unchanged. Choose based on feedback speed, reproducibility, and fidelity. For environment and operational considerations, see [Operations Overview](operations-overview.md). -**Important:** All runners require `POL_PROOF_DEV_MODE=true` to avoid expensive Groth16 proof generation that causes timeouts. - ## Host runner (local processes) - Launches node processes directly on the host (via `LocalDeployer`). - Binary: `local_runner.rs`, script mode: `host` diff --git a/book/src/running-examples.md b/book/src/running-examples.md index f05f863..5cab4eb 100644 --- a/book/src/running-examples.md +++ b/book/src/running-examples.md @@ -99,7 +99,6 @@ scripts/ops/clean.sh --docker For manual control, run the `local_runner` binary directly: ```bash -POL_PROOF_DEV_MODE=true \ LOGOS_BLOCKCHAIN_NODE_BIN=/path/to/logos-blockchain-node \ cargo run -p runner-examples --bin local_runner ``` @@ -116,7 +115,6 @@ cargo run -p runner-examples --bin local_runner | `LOGOS_BLOCKCHAIN_TESTS_TRACING` | false | Enable debug tracing preset | | `LOGOS_BLOCKCHAIN_LOG_LEVEL` | info | Global log level: error, warn, info, debug, trace | | `LOGOS_BLOCKCHAIN_LOG_FILTER` | None | Fine-grained module filtering (e.g., `cryptarchia=trace`) | -| `POL_PROOF_DEV_MODE` | — | **REQUIRED**: Set to `true` for all runners | **Note:** Requires circuit assets and host binaries. Use `scripts/run/run-examples.sh host` to handle setup automatically. @@ -139,7 +137,6 @@ scripts/build/build_test_image.sh # 3. Run LOGOS_BLOCKCHAIN_TESTNET_IMAGE=logos-blockchain-testing:local \ -POL_PROOF_DEV_MODE=true \ cargo run -p runner-examples --bin compose_runner ``` @@ -154,7 +151,6 @@ scripts/build/build_test_image.sh # Run LOGOS_BLOCKCHAIN_TESTNET_IMAGE=logos-blockchain-testing:local \ -POL_PROOF_DEV_MODE=true \ cargo run -p runner-examples --bin compose_runner ``` @@ -169,7 +165,6 @@ cargo run -p runner-examples --bin compose_runner | Variable | Default | Effect | |----------|---------|--------| | `LOGOS_BLOCKCHAIN_TESTNET_IMAGE` | — | Image tag (required, must match built image) | -| `POL_PROOF_DEV_MODE` | — | **REQUIRED**: Set to `true` for all runners | | `LOGOS_BLOCKCHAIN_DEMO_NODES` | 1 | Number of nodes | | `LOGOS_BLOCKCHAIN_DEMO_RUN_SECS` | 60 | Run duration in seconds | | `COMPOSE_NODE_PAIRS` | — | Alternative topology format: "nodes" (e.g., `3`) | @@ -232,7 +227,6 @@ export LOGOS_BLOCKCHAIN_TESTNET_IMAGE=your-registry/logos-blockchain-testing:lat ```bash export LOGOS_BLOCKCHAIN_TESTNET_IMAGE=logos-blockchain-testing:local -export POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin k8s_runner ``` @@ -241,7 +235,6 @@ cargo run -p runner-examples --bin k8s_runner | Variable | Default | Effect | |----------|---------|--------| | `LOGOS_BLOCKCHAIN_TESTNET_IMAGE` | — | Image tag (required) | -| `POL_PROOF_DEV_MODE` | — | **REQUIRED**: Set to `true` for all runners | | `LOGOS_BLOCKCHAIN_DEMO_NODES` | 1 | Number of nodes | | `LOGOS_BLOCKCHAIN_DEMO_RUN_SECS` | 60 | Run duration in seconds | | `LOGOS_BLOCKCHAIN_METRICS_QUERY_URL` | None | Prometheus-compatible base URL for runner to query (PromQL) | diff --git a/book/src/running-scenarios.md b/book/src/running-scenarios.md index 995e539..d648ade 100644 --- a/book/src/running-scenarios.md +++ b/book/src/running-scenarios.md @@ -69,7 +69,6 @@ Notes: Run the built-in local examples: ```bash -POL_PROOF_DEV_MODE=true \ scripts/run/run-examples.sh -t 60 -n 3 host ``` @@ -82,7 +81,6 @@ scripts/run/run-examples.sh -t 60 -n 3 host Run the built-in compose examples: ```bash -POL_PROOF_DEV_MODE=true \ scripts/run/run-examples.sh -t 60 -n 3 compose ``` @@ -95,7 +93,6 @@ scripts/run/run-examples.sh -t 60 -n 3 compose Run the built-in k8s examples: ```bash -POL_PROOF_DEV_MODE=true \ scripts/run/run-examples.sh -t 60 -n 3 k8s ``` diff --git a/book/src/troubleshooting.md b/book/src/troubleshooting.md index 50b5330..be18f5c 100644 --- a/book/src/troubleshooting.md +++ b/book/src/troubleshooting.md @@ -2,7 +2,6 @@ **Prerequisites for All Runners:** - **`versions.env` file** at repository root (required by helper scripts) -- **`POL_PROOF_DEV_MODE=true`** MUST be set for all runners (host, compose, k8s) to avoid expensive Groth16 proof generation that causes timeouts - **Circuit assets** must be present and `LOGOS_BLOCKCHAIN_CIRCUITS` must point to a directory that contains them **Platform/Environment Notes:** @@ -18,7 +17,6 @@ Common symptoms and likely causes: -- **No or slow block progression**: missing `POL_PROOF_DEV_MODE=true`, missing circuit assets, too-short run window, port conflicts, or resource exhaustion—set required env vars, verify assets exist, extend duration, check node logs for startup errors. - **Transactions not included**: unfunded or misconfigured wallets (check `.wallets(N)` vs `.users(M)`), transaction rate exceeding block capacity, or rates exceeding block production speed—reduce rate, increase wallet count, verify wallet setup in logs. - **Chaos stalls the run**: chaos (node control) only works with ComposeDeployer; host runner (LocalDeployer) and K8sDeployer don't support it (won't "stall", just can't execute chaos workloads). With compose, aggressive restart cadence can prevent consensus recovery—widen restart intervals. - **Observability gaps**: metrics or logs unreachable because ports clash or services are not exposed—adjust observability ports and confirm runner wiring. @@ -28,40 +26,7 @@ Common symptoms and likely causes: This section shows what you'll actually see when common issues occur. Each example includes realistic console output and the fix. -### 1. Missing `POL_PROOF_DEV_MODE=true` (Most Common!) - -**Symptoms:** -- Test "hangs" with no visible progress -- CPU usage spikes to 100% -- Eventually hits timeout after several minutes -- Nodes appear to start but blocks aren't produced - -**What you'll see:** - -```text -$ cargo run -p runner-examples --bin local_runner - Finished dev [unoptimized + debuginfo] target(s) in 0.48s - Running `target/debug/local_runner` -[INFO runner_examples::local_runner] Starting local runner scenario -[INFO testing_framework_runner_local] Launching 3 nodes -[INFO testing_framework_runner_local] Waiting for node readiness... -(hangs here for 5+ minutes, CPU at 100%) -thread 'main' panicked at 'readiness timeout expired' -``` - -**Root Cause:** Groth16 proof generation is extremely slow without dev mode. The system tries to compute real cryptographic proofs, which can take minutes per block. - -**Fix:** - -```bash -POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin local_runner -``` - -**Prevention:** Set this in your shell profile or `.env` file so you never forget it. - ---- - -### 2. Missing `versions.env` File +### 1. Missing `versions.env` File **Symptoms:** - Helper scripts fail immediately @@ -93,7 +58,7 @@ cat versions.env --- -### 3. Missing Circuit Assets +### 2. Missing Circuit Assets **Symptoms:** - Node startup fails early @@ -102,7 +67,7 @@ cat versions.env **What you'll see:** ```text -$ POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin local_runner +$ cargo run -p runner-examples --bin local_runner [INFO testing_framework_runner_local] Starting local runner scenario Error: circuit assets directory missing or invalid thread 'main' panicked at 'workload init failed' @@ -129,7 +94,7 @@ export LOGOS_BLOCKCHAIN_CIRCUITS=$HOME/.logos-blockchain-circuits --- -### 4. Node Binaries Not Found +### 3. Node Binaries Not Found **Symptoms:** - Error about missing `logos-blockchain-node` binary @@ -139,7 +104,7 @@ export LOGOS_BLOCKCHAIN_CIRCUITS=$HOME/.logos-blockchain-circuits **What you'll see:** ```text -$ POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin local_runner +$ cargo run -p runner-examples --bin local_runner [INFO testing_framework_runner_local] Spawning node 0 Error: Os { code: 2, kind: NotFound, message: "No such file or directory" } thread 'main' panicked at 'failed to spawn logos-blockchain-node process' @@ -166,12 +131,12 @@ export LOGOS_BLOCKCHAIN_NODE_BIN=$PWD/target/release/logos-blockchain-node # Return to testing framework cd ../nomos-testing -POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin local_runner +cargo run -p runner-examples --bin local_runner ``` --- -### 5. Docker Daemon Not Running (Compose) +### 4. Docker Daemon Not Running (Compose) **Symptoms:** - Compose tests fail immediately @@ -208,7 +173,7 @@ sudo usermod -aG docker $USER --- -### 6. Image Not Found (Compose/K8s) +### 5. Image Not Found (Compose/K8s) **Symptoms:** - Compose/K8s tests fail during deployment @@ -218,7 +183,7 @@ sudo usermod -aG docker $USER **What you'll see:** ```text -$ POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin compose_runner +$ cargo run -p runner-examples --bin compose_runner [INFO testing_framework_runner_compose] Starting compose deployment Error: Failed to pull image 'logos-blockchain-testing:local': No such image thread 'main' panicked at 'compose deployment failed' @@ -255,7 +220,7 @@ kind load docker-image logos-blockchain-testing:local --- -### 7. Port Conflicts +### 6. Port Conflicts **Symptoms:** - "Address already in use" errors @@ -265,7 +230,7 @@ kind load docker-image logos-blockchain-testing:local **What you'll see:** ```text -$ POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin local_runner +$ cargo run -p runner-examples --bin local_runner [INFO testing_framework_runner_local] Launching node 0 on port 18080 Error: Os { code: 48, kind: AddrInUse, message: "Address already in use" } thread 'main' panicked at 'failed to bind port 18080' @@ -305,7 +270,7 @@ vim scripts/observability/compose/docker-compose.yml --- -### 8. Wallet Seeding Failed (Insufficient Funds) +### 7. Wallet Seeding Failed (Insufficient Funds) **Symptoms:** - Transaction workload reports wallet issues @@ -315,7 +280,7 @@ vim scripts/observability/compose/docker-compose.yml **What you'll see:** ```text -$ POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin local_runner +$ cargo run -p runner-examples --bin local_runner [INFO testing_framework_workflows] Starting transaction workload with 10 users [ERROR testing_framework_workflows] Wallet seeding failed: requested 10 users but only 3 wallets available thread 'main' panicked at 'workload init failed: insufficient wallets' @@ -340,7 +305,7 @@ let scenario = ScenarioBuilder::topology_with(|t| t.network_star().nodes(3)) --- -### 9. Resource Exhaustion (OOM / CPU) +### 8. Resource Exhaustion (OOM / CPU) **Symptoms:** - Nodes crash randomly @@ -385,7 +350,7 @@ ulimit -n 4096 --- -### 10. Logs Disappear After Run +### 9. Logs Disappear After Run **Symptoms:** - Test completes but no logs on disk @@ -395,7 +360,7 @@ ulimit -n 4096 **What you'll see:** ```text -$ POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin local_runner +$ cargo run -p runner-examples --bin local_runner [INFO runner_examples] Test complete, cleaning up [INFO testing_framework_runner_local] Removing temporary directories $ ls .tmp/ @@ -410,7 +375,6 @@ $ ls .tmp/ # Persist logs to a specific directory LOGOS_BLOCKCHAIN_LOG_DIR=/tmp/test-logs \ LOGOS_BLOCKCHAIN_TESTS_KEEP_LOGS=1 \ -POL_PROOF_DEV_MODE=true \ cargo run -p runner-examples --bin local_runner # Logs persist after run @@ -422,7 +386,7 @@ ls /tmp/test-logs/ --- -### 11. Consensus Timing Too Tight / Run Duration Too Short +### 10. Consensus Timing Too Tight / Run Duration Too Short **Symptoms:** - "Consensus liveness expectation failed" @@ -432,7 +396,7 @@ ls /tmp/test-logs/ **What you'll see:** ```text -$ POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin local_runner +$ cargo run -p runner-examples --bin local_runner [INFO testing_framework_core] Starting workloads [INFO testing_framework_core] Run window: 10 seconds [INFO testing_framework_core] Evaluating expectations @@ -463,7 +427,6 @@ let scenario = ScenarioBuilder::topology_with(|t| t.network_star().nodes(3)) # Faster block production (shorter slot time) CONSENSUS_SLOT_TIME=5 \ CONSENSUS_ACTIVE_SLOT_COEFF=0.9 \ -POL_PROOF_DEV_MODE=true \ cargo run -p runner-examples --bin local_runner ``` @@ -473,17 +436,16 @@ cargo run -p runner-examples --bin local_runner When a test fails, check these in order: -1. **`POL_PROOF_DEV_MODE=true` is set** (REQUIRED for all runners) -2. **`versions.env` exists at repo root** -3. **Circuit assets present** (`LOGOS_BLOCKCHAIN_CIRCUITS` points to a valid directory) -4. **Node binaries available** (`LOGOS_BLOCKCHAIN_NODE_BIN` set, or using `run-examples.sh`) -5. **Docker daemon running** (for compose/k8s) -6. **Docker image built** (`logos-blockchain-testing:local` exists for compose/k8s) -7. **No port conflicts** (`lsof -i :18080`, kill orphaned processes) -8. **Sufficient wallets** (`.wallets(N)` ≥ `.users(M)`) -9. **Enough resources** (Docker memory 8GB+, ulimit -n 4096) -10. **Run duration appropriate** (long enough for consensus timing) -11. **Logs persisted** (`LOGOS_BLOCKCHAIN_LOG_DIR` + `LOGOS_BLOCKCHAIN_TESTS_KEEP_LOGS=1` if needed) +1. **`versions.env` exists at repo root** +2. **Circuit assets present** (`LOGOS_BLOCKCHAIN_CIRCUITS` points to a valid directory) +3. **Node binaries available** (`LOGOS_BLOCKCHAIN_NODE_BIN` set, or using `run-examples.sh`) +4. **Docker daemon running** (for compose/k8s) +5. **Docker image built** (`logos-blockchain-testing:local` exists for compose/k8s) +6. **No port conflicts** (`lsof -i :18080`, kill orphaned processes) +7. **Sufficient wallets** (`.wallets(N)` ≥ `.users(M)`) +8. **Enough resources** (Docker memory 8GB+, ulimit -n 4096) +9. **Run duration appropriate** (long enough for consensus timing) +10. **Logs persisted** (`LOGOS_BLOCKCHAIN_LOG_DIR` + `LOGOS_BLOCKCHAIN_TESTS_KEEP_LOGS=1` if needed) **Still stuck?** Check node logs (see [Where to Find Logs](#where-to-find-logs)) for the actual error. @@ -509,14 +471,13 @@ When a test fails, check these in order: **Console output (default):** ```bash -POL_PROOF_DEV_MODE=true cargo run -p runner-examples --bin local_runner 2>&1 | tee test.log +cargo run -p runner-examples --bin local_runner 2>&1 | tee test.log ``` **Persistent file output:** ```bash LOGOS_BLOCKCHAIN_LOG_DIR=/tmp/debug-logs \ LOGOS_BLOCKCHAIN_LOG_LEVEL=debug \ -POL_PROOF_DEV_MODE=true \ cargo run -p runner-examples --bin local_runner # Inspect logs (note: filenames include timestamps): @@ -546,7 +507,6 @@ docker logs --tail 100 ```bash COMPOSE_RUNNER_PRESERVE=1 \ LOGOS_BLOCKCHAIN_TESTNET_IMAGE=logos-blockchain-testing:local \ -POL_PROOF_DEV_MODE=true \ cargo run -p runner-examples --bin compose_runner # OR: Use run-examples.sh (handles setup automatically) @@ -651,7 +611,6 @@ Focus on the first node that exhibited problems or the node with the highest ind - "ERROR: versions.env missing" → missing required `versions.env` file at repository root - "Failed to bind address" → port conflict - "Connection refused" → peer not ready or network issue -- "Proof verification failed" or "Proof generation timeout" → missing `POL_PROOF_DEV_MODE=true` (REQUIRED for all runners) - "Circuit file not found" → missing circuit assets at the path in `LOGOS_BLOCKCHAIN_CIRCUITS` - "Insufficient funds" → wallet seeding issue (increase `.wallets(N)` or reduce `.users(M)`) @@ -689,16 +648,14 @@ Run a minimal baseline test (e.g., 2 nodes, consensus liveness only). If it pass ### "Consensus liveness expectation failed" -- **Cause**: Not enough blocks produced during the run window, missing - `POL_PROOF_DEV_MODE=true` (causes slow proof generation), or missing circuit +- **Cause**: Not enough blocks produced during the run window, missing circuit assets. - **Fix**: - 1. Verify `POL_PROOF_DEV_MODE=true` is set (REQUIRED for all runners). - 2. Verify circuit assets exist at the path referenced by + 1. Verify circuit assets exist at the path referenced by `LOGOS_BLOCKCHAIN_CIRCUITS`. - 3. Extend `with_run_duration()` to allow more blocks. - 4. Check node logs for proof generation or circuit asset errors. - 5. Reduce transaction rate if nodes are overwhelmed. + 2. Extend `with_run_duration()` to allow more blocks. + 3. Check node logs for proof generation or circuit asset errors. + 4. Reduce transaction rate if nodes are overwhelmed. ### "Wallet seeding failed" @@ -720,11 +677,10 @@ Run a minimal baseline test (e.g., 2 nodes, consensus liveness only). If it pass - **Cause**: Nodes didn't become responsive within expected time (often due to missing prerequisites). - **Fix**: - 1. **Verify `POL_PROOF_DEV_MODE=true` is set** (REQUIRED for all runners—without it, proof generation is too slow). - 2. Check node logs for startup errors (port conflicts, missing assets). - 3. Verify network connectivity between nodes. - 4. Ensure circuit assets are present and `LOGOS_BLOCKCHAIN_CIRCUITS` points to them. + 1. Check node logs for startup errors (port conflicts, missing assets). + 2. Verify network connectivity between nodes. + 3. Ensure circuit assets are present and `LOGOS_BLOCKCHAIN_CIRCUITS` points to them. ### "ERROR: versions.env missing" diff --git a/book/src/workloads.md b/book/src/workloads.md index a412b59..5712ca3 100644 --- a/book/src/workloads.md +++ b/book/src/workloads.md @@ -78,13 +78,7 @@ ScenarioBuilder::topology_with(|t| t.network_star().nodes(3)) ``` The workload will fail during `init()` if no wallets are configured. -2. **Proof generation must be fast:** - ```bash - export POL_PROOF_DEV_MODE=true - ``` - Without this, proof generation takes ~30-60 seconds per transaction, causing timeouts. - -3. **Circuit artifacts must be available:** +2. **Circuit artifacts must be available:** - Automatically staged by `scripts/run/run-examples.sh` - Or manually via `scripts/setup/setup-logos-blockchain-circuits.sh` (recommended) / `scripts/setup/setup-logos-blockchain-circuits.sh` @@ -108,7 +102,6 @@ Error: Expectation failed: TxInclusionExpectation Observed: 127 transactions Possible causes: - - POL_PROOF_DEV_MODE not set (proof generation too slow) - Duration too short (nodes still syncing) - Node crashes (check logs for panics/OOM) - Wallet accounts not seeded (check topology config) @@ -119,9 +112,8 @@ Error: Expectation failed: TxInclusionExpectation ```bash grep "proof generation" $LOGOS_BLOCKCHAIN_LOG_DIR/*/*.log ``` -2. Verify `POL_PROOF_DEV_MODE=true` was set -3. Increase duration: `.with_run_duration(Duration::from_secs(120))` -4. Reduce rate: `.rate(5)` instead of `.rate(10)` +2. Increase duration: `.with_run_duration(Duration::from_secs(120))` +3. Reduce rate: `.rate(5)` instead of `.rate(10)` --- @@ -382,12 +374,11 @@ ScenarioBuilder::topology_with(|t| t.network_star().nodes(3)) When a workload or expectation fails: 1. Check logs: `$LOGOS_BLOCKCHAIN_LOG_DIR/*/` or `docker compose logs` or `kubectl logs` -2. Verify environment variables: `POL_PROOF_DEV_MODE`, `LOGOS_BLOCKCHAIN_NODE_BIN`, etc. -3. Check prerequisites: wallets, node control, circuits -4. Increase duration: Double the run duration and retry -5. Reduce rates: Half the traffic rates and retry -6. Check metrics: Prometheus queries for block height and tx count -7. Reproduce locally: Use local runner for faster iteration +2. Check prerequisites: wallets, node control, circuits +3. Increase duration: Double the run duration and retry +4. Reduce rates: Half the traffic rates and retry +5. Check metrics: Prometheus queries for block height and tx count +6. Reproduce locally: Use local runner for faster iteration --- diff --git a/examples/src/bin/local_runner.rs b/examples/src/bin/local_runner.rs index e21c6ff..72a929e 100644 --- a/examples/src/bin/local_runner.rs +++ b/examples/src/bin/local_runner.rs @@ -1,4 +1,4 @@ -use std::{env, process, time::Duration}; +use std::{process, time::Duration}; use anyhow::{Context as _, Result}; use runner_examples::{DeployerKind, ScenarioBuilderExt as _, demo, read_env_any}; @@ -17,11 +17,6 @@ async fn main() { tracing_subscriber::fmt::init(); - if env::var("POL_PROOF_DEV_MODE").is_err() { - warn!("POL_PROOF_DEV_MODE=true is required for the local runner demo"); - process::exit(1); - } - let nodes = read_env_any(&["LOGOS_BLOCKCHAIN_DEMO_NODES"], demo::DEFAULT_NODES); let run_secs = read_env_any(&["LOGOS_BLOCKCHAIN_DEMO_RUN_SECS"], demo::DEFAULT_RUN_SECS); diff --git a/examples/src/defaults.rs b/examples/src/defaults.rs index 0520321..b441a37 100644 --- a/examples/src/defaults.rs +++ b/examples/src/defaults.rs @@ -21,7 +21,6 @@ fn set_default_env(key: &str, value: &str) { } pub fn init_logging_defaults() { - set_default_env("POL_PROOF_DEV_MODE", "true"); set_default_env("LOGOS_BLOCKCHAIN_TESTS_KEEP_LOGS", "1"); set_default_env("LOGOS_BLOCKCHAIN_LOG_LEVEL", "info"); set_default_env("RUST_LOG", "info"); diff --git a/examples/tests/dynamic_join.rs b/examples/tests/dynamic_join.rs index 6c9f316..7ceea1f 100644 --- a/examples/tests/dynamic_join.rs +++ b/examples/tests/dynamic_join.rs @@ -86,6 +86,7 @@ impl Workload for JoinNodeWithPeersWorkload { let options = StartNodeOptions { peers: PeerSelection::Named(self.peers.clone()), config_patch: None, + persist_dir: None, }; let node = handle.start_node_with(&self.name, options).await?; let client = node.api; diff --git a/examples/tests/manual_cluster.rs b/examples/tests/manual_cluster.rs index 805238c..a15ba3c 100644 --- a/examples/tests/manual_cluster.rs +++ b/examples/tests/manual_cluster.rs @@ -18,7 +18,6 @@ const CONVERGENCE_POLL: Duration = Duration::from_secs(2); async fn manual_cluster_two_clusters_merge() -> Result<()> { let _ = try_init(); // Required env vars (set on the command line when running this test): - // - `POL_PROOF_DEV_MODE=true` // - `RUST_LOG=info` (optional) let config = TopologyConfig::with_node_numbers(2); let deployer = LocalDeployer::new(); @@ -33,6 +32,7 @@ async fn manual_cluster_two_clusters_merge() -> Result<()> { StartNodeOptions { peers: PeerSelection::None, config_patch: None, + persist_dir: None, }, ) .await? @@ -48,6 +48,7 @@ async fn manual_cluster_two_clusters_merge() -> Result<()> { StartNodeOptions { peers: PeerSelection::Named(vec!["node-a".to_owned()]), config_patch: None, + persist_dir: None, }, ) .await? @@ -82,3 +83,57 @@ async fn manual_cluster_two_clusters_merge() -> Result<()> { sleep(CONVERGENCE_POLL).await; } } + +#[tokio::test] +#[ignore = "run manually with `cargo test -p runner-examples -- --ignored manual_cluster_with_persist_dir`"] +async fn manual_cluster_with_persist_dir() -> Result<()> { + use std::path::PathBuf; + + let _ = try_init(); + // Required env vars (set on the command line when running this test): + // - `RUST_LOG=info` (optional) + let config = TopologyConfig::with_node_numbers(1); + let deployer = LocalDeployer::new(); + let cluster = deployer.manual_cluster(config)?; + + let persist_dir = PathBuf::from("/tmp/test-node-persist-dir"); + + println!("starting validator with persist_dir: {:?}", persist_dir); + + let _node = cluster + .start_node_with( + "test", + StartNodeOptions { + peers: PeerSelection::None, + config_patch: None, + persist_dir: Some(persist_dir.clone()), + }, + ) + .await? + .api; + + println!("validator started, waiting briefly"); + sleep(Duration::from_secs(5)).await; + + // Drop the cluster to trigger the persist logic + drop(cluster); + + println!("cluster dropped, checking if persist_dir exists"); + + // Verify the persist_dir was created + if !persist_dir.exists() { + return Err(anyhow::anyhow!( + "persist_dir was not created: {:?}", + persist_dir + )); + } + + println!("persist_dir verified: {:?}", persist_dir); + + // Clean up + if persist_dir.exists() { + std::fs::remove_dir_all(&persist_dir)?; + } + + Ok(()) +} diff --git a/examples/tests/node_config_override.rs b/examples/tests/node_config_override.rs index 85f9db2..d16071c 100644 --- a/examples/tests/node_config_override.rs +++ b/examples/tests/node_config_override.rs @@ -17,7 +17,6 @@ use tracing_subscriber::fmt::try_init; async fn manual_cluster_api_port_override() -> Result<()> { let _ = try_init(); // Required env vars (set on the command line when running this test): - // - `POL_PROOF_DEV_MODE=true` // - `LOGOS_BLOCKCHAIN_NODE_BIN=...` // - `LOGOS_BLOCKCHAIN_CIRCUITS=...` // - `RUST_LOG=info` (optional) @@ -33,6 +32,7 @@ async fn manual_cluster_api_port_override() -> Result<()> { StartNodeOptions { peers: PeerSelection::None, config_patch: None, + persist_dir: None, } .create_patch(move |mut config| { println!("overriding API port to {api_port}"); @@ -62,7 +62,6 @@ async fn manual_cluster_api_port_override() -> Result<()> { async fn scenario_builder_api_port_override() -> Result<()> { let _ = try_init(); // Required env vars (set on the command line when running this test): - // - `POL_PROOF_DEV_MODE=true` // - `LOGOS_BLOCKCHAIN_NODE_BIN=...` // - `LOGOS_BLOCKCHAIN_CIRCUITS=...` // - `RUST_LOG=info` (optional) diff --git a/examples/tests/orphan_manual_cluster.rs b/examples/tests/orphan_manual_cluster.rs index f6243d5..7c2ea0c 100644 --- a/examples/tests/orphan_manual_cluster.rs +++ b/examples/tests/orphan_manual_cluster.rs @@ -25,7 +25,6 @@ const POLL_INTERVAL: Duration = Duration::from_secs(1); async fn orphan_manual_cluster() -> Result<()> { let _ = try_init(); // Required env vars (set on the command line when running this test): - // - `POL_PROOF_DEV_MODE=true` // - `LOGOS_BLOCKCHAIN_NODE_BIN=...` // - `NOMOS_KZGRS_PARAMS_PATH=...` (path to KZG params directory/file) // - `RUST_LOG=info` (optional; better visibility) diff --git a/scripts/run/run-examples.sh b/scripts/run/run-examples.sh index 8c7d2e4..777a6b4 100755 --- a/scripts/run/run-examples.sh +++ b/scripts/run/run-examples.sh @@ -515,7 +515,6 @@ run_examples::run() { echo "==> Running ${BIN} for ${RUN_SECS}s (mode=${MODE}, image=${IMAGE})" cd "${ROOT_DIR}" - POL_PROOF_DEV_MODE=true \ TESTNET_PRINT_ENDPOINTS=1 \ LOGOS_BLOCKCHAIN_TESTNET_IMAGE="${IMAGE}" \ LOGOS_BLOCKCHAIN_NODE_BIN="${LOGOS_BLOCKCHAIN_NODE_BIN:-}" \ diff --git a/testing-framework/assets/stack/scripts/run_nomos.sh b/testing-framework/assets/stack/scripts/run_nomos.sh index a45a202..d27213f 100755 --- a/testing-framework/assets/stack/scripts/run_nomos.sh +++ b/testing-framework/assets/stack/scripts/run_nomos.sh @@ -47,8 +47,7 @@ export CFG_FILE_PATH="/config.yaml" \ CFG_HOST_KIND="${CFG_HOST_KIND:-$role}" \ CFG_HOST_IDENTIFIER="${CFG_HOST_IDENTIFIER:-$host_identifier_default}" \ LOGOS_BLOCKCHAIN_TIME_BACKEND="${LOGOS_BLOCKCHAIN_TIME_BACKEND:-monotonic}" \ - LOG_LEVEL="${LOG_LEVEL:-INFO}" \ - POL_PROOF_DEV_MODE="${POL_PROOF_DEV_MODE:-true}" + LOG_LEVEL="${LOG_LEVEL:-INFO}"``" # Ensure recovery directory exists to avoid early crashes in services that # persist state. diff --git a/testing-framework/configs/src/topology/configs/mod.rs b/testing-framework/configs/src/topology/configs/mod.rs index 8f09ae7..259c0ef 100644 --- a/testing-framework/configs/src/topology/configs/mod.rs +++ b/testing-framework/configs/src/topology/configs/mod.rs @@ -13,7 +13,8 @@ use std::cmp; use blend::GeneralBlendConfig; use consensus::{ - ConsensusConfigError, GeneralConsensusConfig, ProviderInfo, create_genesis_tx_with_declarations, + ConsensusConfigError, GeneralConsensusConfig, ProviderInfo, + create_genesis_tx_with_declarations, sync_utxos_with_genesis, }; use key_management_system_service::{backend::preload::PreloadKMSBackendSettings, keys::Key}; use network::GeneralNetworkConfig; @@ -203,7 +204,7 @@ fn apply_consensus_genesis_tx( ) -> Result<(), ConsensusConfigError> { for c in consensus_configs { c.genesis_tx = genesis_tx.clone(); - consensus::sync_utxos_with_genesis(&mut c.utxos, genesis_tx)?; + sync_utxos_with_genesis(&mut c.utxos, genesis_tx)?; } Ok(()) diff --git a/testing-framework/core/src/nodes/common/node.rs b/testing-framework/core/src/nodes/common/node.rs index 79323ce..b6f05cb 100644 --- a/testing-framework/core/src/nodes/common/node.rs +++ b/testing-framework/core/src/nodes/common/node.rs @@ -124,8 +124,9 @@ pub fn prepare_node_config( mut config: T, log_prefix: &str, enable_logging: bool, + persist_dir: Option, ) -> Result, SpawnNodeError> { - let dir = create_tempdir().map_err(|source| SpawnNodeError::TempDir { source })?; + let dir = create_tempdir(persist_dir).map_err(|source| SpawnNodeError::TempDir { source })?; debug!(dir = %dir.path().display(), log_prefix, enable_logging, "preparing node config"); @@ -154,12 +155,13 @@ pub async fn spawn_node( config_filename: &str, binary_path: PathBuf, enable_logging: bool, + persist_dir: Option, ) -> Result, SpawnNodeError> where C: NodeConfigCommon + Serialize, { let (dir, config, addr, testing_addr) = - prepare_node_config(config, log_prefix, enable_logging)?; + prepare_node_config(config, log_prefix, enable_logging, persist_dir)?; let config_path = dir.path().join(config_filename); write_node_config(&config, &config_path)?; diff --git a/testing-framework/core/src/nodes/mod.rs b/testing-framework/core/src/nodes/mod.rs index d6abce5..bd5c3b0 100644 --- a/testing-framework/core/src/nodes/mod.rs +++ b/testing-framework/core/src/nodes/mod.rs @@ -2,7 +2,11 @@ mod api_client; pub mod common; pub mod node; -use std::sync::LazyLock; +use std::{ + io::{Error, ErrorKind}, + path::PathBuf, + sync::LazyLock, +}; pub use api_client::{ApiClient, ApiClientError}; use tempfile::TempDir; @@ -11,11 +15,35 @@ use testing_framework_env as tf_env; pub(crate) const LOGS_PREFIX: &str = "__logs"; static KEEP_NODE_TEMPDIRS: LazyLock = LazyLock::new(tf_env::nomos_tests_keep_logs); -pub(crate) fn create_tempdir() -> std::io::Result { - // It's easier to use the current location instead of OS-default tempfile - // location because Github Actions can easily access files in the current - // location using wildcard to upload them as artifacts. - TempDir::new_in(std::env::current_dir()?) +pub(crate) fn create_tempdir(custom_work_dir: Option) -> std::io::Result { + if let Some(dir) = custom_work_dir { + let final_dir_name = dir + .components() + .last() + .ok_or(Error::new(ErrorKind::Other, "invalid final directory"))? + .as_os_str() + .display() + .to_string() + .to_owned() + + "_"; + let parent_dir = dir + .parent() + .ok_or(Error::new(ErrorKind::Other, "invalid parent directory"))?; + let mut temp_dir = TempDir::with_prefix_in(final_dir_name, parent_dir)?; + if should_persist_tempdir() { + temp_dir.disable_cleanup(true); + } + Ok(temp_dir) + } else { + // It's easier to use the current location instead of OS-default tempfile + // location because Github Actions can easily access files in the current + // location using wildcard to upload them as artifacts. + let mut temp_dir = TempDir::new_in(std::env::current_dir()?)?; + if should_persist_tempdir() { + temp_dir.disable_cleanup(true); + } + Ok(temp_dir) + } } fn persist_tempdir(tempdir: &mut TempDir, label: &str) -> std::io::Result<()> { @@ -24,6 +52,9 @@ fn persist_tempdir(tempdir: &mut TempDir, label: &str) -> std::io::Result<()> { label, tempdir.path().display() ); + if should_persist_tempdir() { + return Ok(()); + } // we need ownership of the dir to persist it let dir = std::mem::replace(tempdir, tempfile::tempdir()?); let _ = dir.keep(); diff --git a/testing-framework/core/src/nodes/node.rs b/testing-framework/core/src/nodes/node.rs index 80035a3..50878f5 100644 --- a/testing-framework/core/src/nodes/node.rs +++ b/testing-framework/core/src/nodes/node.rs @@ -5,7 +5,6 @@ use nomos_tracing_service::LoggerLayer; pub use testing_framework_config::nodes::node::create_node_config; use tracing::{debug, info}; -use super::{persist_tempdir, should_persist_tempdir}; use crate::{ IS_DEBUG_TRACING, nodes::{ @@ -67,12 +66,6 @@ impl Deref for Node { impl Drop for Node { fn drop(&mut self) { - if should_persist_tempdir() - && let Err(e) = persist_tempdir(&mut self.handle.tempdir, "logos-blockchain-node") - { - debug!(error = ?e, "failed to persist node tempdir"); - } - debug!("stopping node process"); kill_child(&mut self.handle.child); } @@ -96,7 +89,11 @@ impl Node { self.handle.wait_for_exit(timeout).await } - pub async fn spawn(config: RunConfig, label: &str) -> Result { + pub async fn spawn( + config: RunConfig, + label: &str, + persist_dir: Option, + ) -> Result { let log_prefix = format!("{LOGS_PREFIX}-{label}"); let handle = spawn_node( config, @@ -104,6 +101,7 @@ impl Node { "node.yaml", binary_path(), !*IS_DEBUG_TRACING, + persist_dir, ) .await?; diff --git a/testing-framework/core/src/scenario/capabilities.rs b/testing-framework/core/src/scenario/capabilities.rs index c0e657f..712c966 100644 --- a/testing-framework/core/src/scenario/capabilities.rs +++ b/testing-framework/core/src/scenario/capabilities.rs @@ -1,4 +1,4 @@ -use std::sync::Arc; +use std::{path::PathBuf, sync::Arc}; use reqwest::Url; @@ -41,6 +41,8 @@ pub struct StartNodeOptions { pub peers: PeerSelection, /// Optional node config patch applied before spawn. pub config_patch: Option, + /// Optional directory to persist node's tempdir to on stop. + pub persist_dir: Option, } impl Default for StartNodeOptions { @@ -48,6 +50,7 @@ impl Default for StartNodeOptions { Self { peers: PeerSelection::DefaultLayout, config_patch: None, + persist_dir: None, } } } diff --git a/testing-framework/core/src/topology/config.rs b/testing-framework/core/src/topology/config.rs index da9b2ac..0360754 100644 --- a/testing-framework/core/src/topology/config.rs +++ b/testing-framework/core/src/topology/config.rs @@ -1,4 +1,4 @@ -use std::{collections::HashMap, sync::Arc}; +use std::{collections::HashMap, path::PathBuf, sync::Arc}; use nomos_core::{ mantle::GenesisTx as _, @@ -11,7 +11,7 @@ use testing_framework_config::topology::{ base::{BaseConfigError, BaseConfigs, build_base_configs}, consensus::{ ConsensusConfigError, ConsensusParams, ProviderInfo, - create_genesis_tx_with_declarations, + create_genesis_tx_with_declarations, sync_utxos_with_genesis, }, network::{Libp2pNetworkLayout, NetworkParams}, tracing::create_tracing_configs, @@ -65,6 +65,7 @@ pub struct TopologyConfig { pub network_params: NetworkParams, pub wallet_config: WalletConfig, pub node_config_patches: HashMap, + pub persist_dirs: HashMap, } impl TopologyConfig { @@ -77,6 +78,7 @@ impl TopologyConfig { network_params: NetworkParams::default(), wallet_config: WalletConfig::default(), node_config_patches: HashMap::new(), + persist_dirs: HashMap::new(), } } @@ -89,6 +91,7 @@ impl TopologyConfig { network_params: NetworkParams::default(), wallet_config: WalletConfig::default(), node_config_patches: HashMap::new(), + persist_dirs: HashMap::new(), } } @@ -103,6 +106,7 @@ impl TopologyConfig { network_params: NetworkParams::default(), wallet_config: WalletConfig::default(), node_config_patches: HashMap::new(), + persist_dirs: HashMap::new(), } } @@ -121,6 +125,17 @@ impl TopologyConfig { self.node_config_patches.insert(index, patch); self } + + #[must_use] + pub fn persist_dir(&self, index: usize) -> Option<&PathBuf> { + self.persist_dirs.get(&index) + } + + #[must_use] + pub fn with_persist_dir(mut self, index: usize, dir: PathBuf) -> Self { + self.persist_dirs.insert(index, dir); + self + } } /// Builder that produces `GeneratedTopology` instances from a `TopologyConfig`. @@ -163,6 +178,13 @@ impl TopologyBuilder { self } + #[must_use] + /// Apply a persist dir for a specific node index. + pub fn with_persist_dir(mut self, index: usize, dir: PathBuf) -> Self { + self.config.persist_dirs.insert(index, dir); + self + } + #[must_use] /// Set node counts. pub const fn with_node_count(mut self, nodes: usize) -> Self { @@ -240,6 +262,7 @@ impl TopologyBuilder { &kms_configs, &time_config, &config.node_config_patches, + &config.persist_dirs, )?; Ok(GeneratedTopology { config, nodes }) @@ -310,10 +333,7 @@ fn apply_consensus_genesis_tx( ) -> Result<(), TopologyBuildError> { for c in consensus_configs { c.genesis_tx = genesis_tx.clone(); - testing_framework_config::topology::configs::consensus::sync_utxos_with_genesis( - &mut c.utxos, - genesis_tx, - )?; + sync_utxos_with_genesis(&mut c.utxos, genesis_tx)?; } Ok(()) } @@ -333,6 +353,7 @@ fn build_node_descriptors( kms_configs: &[key_management_system_service::backend::preload::PreloadKMSBackendSettings], time_config: &testing_framework_config::topology::configs::time::GeneralTimeConfig, node_config_patches: &HashMap, + persist_dirs: &HashMap, ) -> Result, TopologyBuildError> { let mut nodes = Vec::with_capacity(config.n_nodes); @@ -367,6 +388,7 @@ fn build_node_descriptors( general, blend_port, config_patch: node_config_patches.get(&i).cloned(), + persist_dir: persist_dirs.get(&i).cloned(), }; nodes.push(descriptor); diff --git a/testing-framework/core/src/topology/generation.rs b/testing-framework/core/src/topology/generation.rs index 3ea2b2d..4aa779a 100644 --- a/testing-framework/core/src/topology/generation.rs +++ b/testing-framework/core/src/topology/generation.rs @@ -1,4 +1,4 @@ -use std::{collections::HashSet, time::Duration}; +use std::{collections::HashSet, path::PathBuf, time::Duration}; use reqwest::{Client, Url}; @@ -16,6 +16,7 @@ pub struct GeneratedNodeConfig { pub general: GeneralConfig, pub blend_port: u16, pub config_patch: Option, + pub persist_dir: Option, } impl GeneratedNodeConfig { diff --git a/testing-framework/deployers/compose/src/descriptor/mod.rs b/testing-framework/deployers/compose/src/descriptor/mod.rs index 305e5f7..47077dd 100644 --- a/testing-framework/deployers/compose/src/descriptor/mod.rs +++ b/testing-framework/deployers/compose/src/descriptor/mod.rs @@ -119,12 +119,10 @@ fn default_extra_hosts() -> Vec { } fn base_environment(cfgsync_port: u16) -> Vec { - let pol_mode = tf_env::pol_proof_dev_mode().unwrap_or_else(|| "true".to_string()); let rust_log = tf_env::rust_log().unwrap_or_else(|| "info".to_string()); let nomos_log_level = tf_env::nomos_log_level().unwrap_or_else(|| "info".to_string()); let time_backend = tf_env::nomos_time_backend().unwrap_or_else(|| "monotonic".into()); vec![ - EnvEntry::new("POL_PROOF_DEV_MODE", pol_mode), EnvEntry::new("RUST_LOG", rust_log), EnvEntry::new("LOGOS_BLOCKCHAIN_LOG_LEVEL", nomos_log_level), EnvEntry::new("LOGOS_BLOCKCHAIN_TIME_BACKEND", time_backend), diff --git a/testing-framework/deployers/k8s/src/infrastructure/assets.rs b/testing-framework/deployers/k8s/src/infrastructure/assets.rs index 729728e..d6980f2 100644 --- a/testing-framework/deployers/k8s/src/infrastructure/assets.rs +++ b/testing-framework/deployers/k8s/src/infrastructure/assets.rs @@ -291,11 +291,9 @@ fn build_values(topology: &GeneratedTopology) -> HelmValues { let cfgsync = CfgsyncValues { port: cfgsync_port(), }; - let pol_mode = pol_proof_mode(); let image_pull_policy = tf_env::nomos_testnet_image_pull_policy().unwrap_or_else(|| "IfNotPresent".into()); - debug!(pol_mode, "rendering Helm values for k8s stack"); - let nodes = build_node_group("node", topology.nodes(), &pol_mode); + let nodes = build_node_group("node", topology.nodes()); HelmValues { image_pull_policy, @@ -307,12 +305,11 @@ fn build_values(topology: &GeneratedTopology) -> HelmValues { fn build_node_group( kind: &'static str, nodes: &[testing_framework_core::topology::generation::GeneratedNodeConfig], - pol_mode: &str, ) -> NodeGroup { let node_values = nodes .iter() .enumerate() - .map(|(index, node)| build_node_values(kind, index, node, pol_mode)) + .map(|(index, node)| build_node_values(kind, index, node)) .collect(); NodeGroup { @@ -325,10 +322,8 @@ fn build_node_values( kind: &'static str, index: usize, node: &testing_framework_core::topology::generation::GeneratedNodeConfig, - pol_mode: &str, ) -> NodeValues { let mut env = BTreeMap::new(); - env.insert("POL_PROOF_DEV_MODE".into(), pol_mode.to_string()); env.insert("CFG_NETWORK_PORT".into(), node.network_port().to_string()); env.insert("CFG_BLEND_PORT".into(), node.blend_port.to_string()); env.insert( @@ -352,7 +347,3 @@ fn build_node_values( env, } } - -fn pol_proof_mode() -> String { - tf_env::pol_proof_dev_mode().unwrap_or_else(|| "true".to_string()) -} diff --git a/testing-framework/deployers/local/src/node_control/mod.rs b/testing-framework/deployers/local/src/node_control/mod.rs index b3b9846..da7ae79 100644 --- a/testing-framework/deployers/local/src/node_control/mod.rs +++ b/testing-framework/deployers/local/src/node_control/mod.rs @@ -110,7 +110,7 @@ impl LocalNodeManager { for node in descriptors.nodes() { let label = Self::default_label(node.index()); let config = create_node_config(node.general.clone()); - let spawned = Node::spawn(config, &label).await?; + let spawned = Node::spawn(config, &label, node.persist_dir.clone()).await?; nodes.push(spawned); } @@ -335,7 +335,7 @@ impl LocalNodeManager { )?; let api_client = self - .spawn_and_register_node(&node_name, network_port, config) + .spawn_and_register_node(&node_name, network_port, config, options.persist_dir) .await?; Ok(StartedNode { @@ -428,8 +428,9 @@ impl LocalNodeManager { node_name: &str, network_port: u16, config: RunConfig, + persist_dir: Option, ) -> Result { - let node = Node::spawn(config, node_name) + let node = Node::spawn(config, node_name, persist_dir) .await .map_err(|source| LocalNodeManagerError::Spawn { source })?; let client = node.api().clone(); diff --git a/testing-framework/env/src/lib.rs b/testing-framework/env/src/lib.rs index 671a392..b5a2437 100644 --- a/testing-framework/env/src/lib.rs +++ b/testing-framework/env/src/lib.rs @@ -52,11 +52,6 @@ pub fn nomos_testnet_image_pull_policy() -> Option { env::var("LOGOS_BLOCKCHAIN_TESTNET_IMAGE_PULL_POLICY").ok() } -#[must_use] -pub fn pol_proof_dev_mode() -> Option { - env::var("POL_PROOF_DEV_MODE").ok() -} - #[must_use] pub fn rust_log() -> Option { env::var("RUST_LOG").ok() diff --git a/testing-framework/workflows/src/expectations/consensus_liveness.rs b/testing-framework/workflows/src/expectations/consensus_liveness.rs index 085349f..434ef4f 100644 --- a/testing-framework/workflows/src/expectations/consensus_liveness.rs +++ b/testing-framework/workflows/src/expectations/consensus_liveness.rs @@ -25,7 +25,7 @@ impl Default for ConsensusLiveness { } const LAG_ALLOWANCE: u64 = 2; -const MIN_PROGRESS_BLOCKS: u64 = 5; +const MIN_PROGRESS_BLOCKS: u64 = 3; const REQUEST_RETRIES: usize = 15; const REQUEST_RETRY_DELAY: Duration = Duration::from_secs(2); const MAX_LAG_ALLOWANCE: u64 = 5; @@ -67,7 +67,7 @@ enum ConsensusLivenessIssue { #[derive(Debug, Error)] enum ConsensusLivenessError { - #[error("consensus liveness requires at least one node")] + #[error("consensus liveness requires at least one validator")] MissingParticipants, #[error("consensus liveness violated (target={target}):\n{details}")] Violations { From c80c3fd2e3622575ad7fdc67dbc1f0c50607264a Mon Sep 17 00:00:00 2001 From: Hansie Odendaal <39146854+hansieodendaal@users.noreply.github.com> Date: Mon, 9 Feb 2026 10:28:15 +0200 Subject: [PATCH 11/11] chore: config and naming updates (#27) * Update config and crate naming - Updated configs to the lates main repo configs. - Updated all main repo crate namings to be same as the main repo. - Added `create_dir_all` to `pub(crate) fn create_tempdir(custom_work_dir: Option) -> std::io::Result {`. - Wired in optional `persist_dir` when using the local deployer. - Update `time` vulnerability **Note:** Unsure about the `service_params` mapping in `pub(crate) fn cryptarchia_deployment(config: &GeneralConfig) -> CryptarchiaDeploymentSettings {` --- Cargo.lock | 224 +++++------------- Cargo.toml | 62 ++--- book/src/environment-variables.md | 14 +- book/src/logging-observability.md | 18 +- testing-framework/configs/Cargo.toml | 53 +++-- testing-framework/configs/src/lib.rs | 16 +- testing-framework/configs/src/nodes/blend.rs | 16 +- testing-framework/configs/src/nodes/common.rs | 75 +++--- testing-framework/configs/src/nodes/kms.rs | 4 +- testing-framework/configs/src/nodes/node.rs | 12 +- .../configs/src/topology/configs/api.rs | 2 +- .../configs/src/topology/configs/blend.rs | 8 +- .../configs/src/topology/configs/consensus.rs | 38 +-- .../src/topology/configs/deployment.rs | 8 +- .../configs/src/topology/configs/mod.rs | 10 +- .../configs/src/topology/configs/network.rs | 12 +- .../configs/src/topology/configs/runtime.rs | 4 +- .../configs/src/topology/configs/tracing.rs | 10 +- .../configs/src/topology/configs/wallet.rs | 2 +- testing-framework/core/Cargo.toml | 58 ++--- .../core/src/nodes/api_client.rs | 12 +- .../core/src/nodes/common/config/injection.rs | 2 +- .../core/src/nodes/common/lifecycle/spawn.rs | 2 +- .../core/src/nodes/common/node.rs | 2 +- testing-framework/core/src/nodes/mod.rs | 11 +- testing-framework/core/src/nodes/node.rs | 4 +- .../core/src/scenario/capabilities.rs | 2 +- .../core/src/scenario/cfgsync.rs | 4 +- .../core/src/scenario/definition.rs | 18 +- .../core/src/scenario/http_probe.rs | 2 +- .../core/src/scenario/runtime/block_feed.rs | 6 +- testing-framework/core/src/topology/config.rs | 35 +-- .../core/src/topology/readiness/network.rs | 8 +- testing-framework/core/src/topology/utils.rs | 10 +- .../deployers/compose/Cargo.toml | 14 +- .../deployers/compose/src/deployer/mod.rs | 10 +- .../deployers/compose/src/descriptor/mod.rs | 2 +- .../compose/src/infrastructure/cfgsync.rs | 4 +- testing-framework/deployers/k8s/Cargo.toml | 4 +- .../k8s/src/infrastructure/assets.rs | 4 +- testing-framework/deployers/local/Cargo.toml | 8 +- .../deployers/local/src/manual/readiness.rs | 2 +- .../local/src/node_control/config.rs | 4 +- .../deployers/local/src/node_control/mod.rs | 2 +- testing-framework/env/src/lib.rs | 2 +- testing-framework/tools/cfgsync_tf/Cargo.toml | 46 ++-- .../cfgsync_tf/src/bin/cfgsync-client.rs | 2 +- .../tools/cfgsync_tf/src/config/builder.rs | 8 +- .../tools/cfgsync_tf/src/config/kms.rs | 4 +- .../tools/cfgsync_tf/src/config/providers.rs | 4 +- .../tools/cfgsync_tf/src/config/tracing.rs | 2 +- .../tools/cfgsync_tf/src/network/address.rs | 2 +- .../tools/cfgsync_tf/src/network/peers.rs | 2 +- .../tools/cfgsync_tf/src/repo.rs | 2 +- .../tools/cfgsync_tf/src/server.rs | 4 +- testing-framework/workflows/Cargo.toml | 21 +- .../src/expectations/consensus_liveness.rs | 2 +- testing-framework/workflows/src/util/tx.rs | 4 +- .../src/workloads/transaction/expectation.rs | 4 +- .../src/workloads/transaction/workload.rs | 4 +- .../workflows/src/workloads/util.rs | 2 +- versions.env | 2 +- 62 files changed, 435 insertions(+), 500 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f62babc..9e534cb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -601,7 +601,6 @@ dependencies = [ "tower 0.5.3", "tower-layer", "tower-service", - "tracing", ] [[package]] @@ -622,7 +621,6 @@ dependencies = [ "sync_wrapper", "tower-layer", "tower-service", - "tracing", ] [[package]] @@ -1218,19 +1216,6 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "dashmap" -version = "5.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" -dependencies = [ - "cfg-if", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", -] - [[package]] name = "data-encoding" version = "2.10.0" @@ -1685,16 +1670,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "forwarded-header-value" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835f84f38484cc86f110a805655697908257fb9a7af005234060891557198e9" -dependencies = [ - "nonempty", - "thiserror 1.0.69", -] - [[package]] name = "futures" version = "0.3.31" @@ -1919,26 +1894,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "governor" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a7f542ee6b35af73b06abc0dad1c1bae89964e4e253bc4b587b91c9637867b" -dependencies = [ - "cfg-if", - "dashmap", - "futures", - "futures-timer", - "no-std-compat", - "nonzero_ext", - "parking_lot", - "portable-atomic", - "quanta", - "rand 0.8.5", - "smallvec", - "spinning_top", -] - [[package]] name = "group" version = "0.13.0" @@ -3389,12 +3344,13 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "logos-blockchain-api-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "bytes", "futures", "logos-blockchain-chain-broadcast-service", + "logos-blockchain-chain-leader-service", "logos-blockchain-chain-service", "logos-blockchain-core", "logos-blockchain-network-service", @@ -3415,7 +3371,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "logos-blockchain-blend-crypto", "logos-blockchain-blend-message", @@ -3427,7 +3383,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-crypto" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "blake2", "logos-blockchain-groth16", @@ -3441,7 +3397,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-message" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "blake2", "derivative", @@ -3463,7 +3419,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-network" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "either", "futures", @@ -3481,7 +3437,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-proofs" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "ed25519-dalek", "generic-array 1.3.5", @@ -3496,7 +3452,7 @@ dependencies = [ [[package]] name = "logos-blockchain-blend-scheduling" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "derivative", @@ -3513,13 +3469,14 @@ dependencies = [ "thiserror 1.0.69", "tokio", "tokio-stream", + "tokio-util", "tracing", ] [[package]] name = "logos-blockchain-blend-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "fork_stream", @@ -3554,7 +3511,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-broadcast-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "derivative", @@ -3570,7 +3527,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-leader-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "futures", @@ -3598,7 +3555,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-network-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "futures", @@ -3626,7 +3583,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "bytes", @@ -3656,7 +3613,7 @@ dependencies = [ [[package]] name = "logos-blockchain-chain-service-common" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "logos-blockchain-core", "serde", @@ -3665,7 +3622,7 @@ dependencies = [ [[package]] name = "logos-blockchain-circuits-prover" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "logos-blockchain-circuits-utils", "tempfile", @@ -3674,7 +3631,7 @@ dependencies = [ [[package]] name = "logos-blockchain-circuits-utils" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "dirs", ] @@ -3682,13 +3639,16 @@ dependencies = [ [[package]] name = "logos-blockchain-common-http-client" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "futures", + "hex", "logos-blockchain-chain-broadcast-service", "logos-blockchain-chain-service", "logos-blockchain-core", + "logos-blockchain-groth16", "logos-blockchain-http-api-common", + "logos-blockchain-key-management-system-keys", "reqwest", "serde", "serde_json", @@ -3699,7 +3659,7 @@ dependencies = [ [[package]] name = "logos-blockchain-core" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "ark-ff 0.4.2", "bincode", @@ -3729,7 +3689,7 @@ dependencies = [ [[package]] name = "logos-blockchain-cryptarchia-engine" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "cfg_eval", "logos-blockchain-utils", @@ -3744,7 +3704,7 @@ dependencies = [ [[package]] name = "logos-blockchain-cryptarchia-sync" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "bytes", "futures", @@ -3763,7 +3723,7 @@ dependencies = [ [[package]] name = "logos-blockchain-groth16" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "ark-bn254 0.4.0", "ark-ec 0.4.2", @@ -3781,22 +3741,20 @@ dependencies = [ [[package]] name = "logos-blockchain-http-api-common" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "axum", - "governor", "logos-blockchain-core", "logos-blockchain-key-management-system-keys", "serde", "serde_json", "serde_with", - "tower_governor", ] [[package]] name = "logos-blockchain-key-management-system-keys" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "bytes", @@ -3821,7 +3779,7 @@ dependencies = [ [[package]] name = "logos-blockchain-key-management-system-macros" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "proc-macro2", "quote", @@ -3831,7 +3789,7 @@ dependencies = [ [[package]] name = "logos-blockchain-key-management-system-operators" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "logos-blockchain-blend-proofs", @@ -3847,7 +3805,7 @@ dependencies = [ [[package]] name = "logos-blockchain-key-management-system-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "log", @@ -3863,7 +3821,7 @@ dependencies = [ [[package]] name = "logos-blockchain-ledger" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "derivative", "logos-blockchain-blend-crypto", @@ -3887,7 +3845,7 @@ dependencies = [ [[package]] name = "logos-blockchain-libp2p" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "backon", @@ -3916,7 +3874,7 @@ dependencies = [ [[package]] name = "logos-blockchain-network-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "futures", @@ -3935,7 +3893,7 @@ dependencies = [ [[package]] name = "logos-blockchain-node" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "axum", @@ -3991,7 +3949,7 @@ dependencies = [ [[package]] name = "logos-blockchain-poc" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", @@ -4006,7 +3964,7 @@ dependencies = [ [[package]] name = "logos-blockchain-pol" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", @@ -4022,7 +3980,7 @@ dependencies = [ [[package]] name = "logos-blockchain-poq" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", @@ -4038,7 +3996,7 @@ dependencies = [ [[package]] name = "logos-blockchain-poseidon2" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "ark-bn254 0.4.0", "ark-ff 0.4.2", @@ -4049,7 +4007,7 @@ dependencies = [ [[package]] name = "logos-blockchain-sdp-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "futures", @@ -4065,7 +4023,7 @@ dependencies = [ [[package]] name = "logos-blockchain-services-utils" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "futures", @@ -4080,7 +4038,7 @@ dependencies = [ [[package]] name = "logos-blockchain-storage-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "bytes", @@ -4098,7 +4056,7 @@ dependencies = [ [[package]] name = "logos-blockchain-system-sig-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-ctrlc", "async-trait", @@ -4109,7 +4067,7 @@ dependencies = [ [[package]] name = "logos-blockchain-time-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "cfg_eval", @@ -4131,7 +4089,7 @@ dependencies = [ [[package]] name = "logos-blockchain-tracing" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "opentelemetry", "opentelemetry-http", @@ -4154,7 +4112,7 @@ dependencies = [ [[package]] name = "logos-blockchain-tracing-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "logos-blockchain-tracing", @@ -4168,7 +4126,7 @@ dependencies = [ [[package]] name = "logos-blockchain-tx-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "futures", @@ -4190,7 +4148,7 @@ dependencies = [ [[package]] name = "logos-blockchain-utils" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "blake2", @@ -4207,7 +4165,7 @@ dependencies = [ [[package]] name = "logos-blockchain-utxotree" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "ark-ff 0.4.2", "logos-blockchain-groth16", @@ -4221,7 +4179,7 @@ dependencies = [ [[package]] name = "logos-blockchain-wallet" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "logos-blockchain-core", "logos-blockchain-key-management-system-keys", @@ -4236,7 +4194,7 @@ dependencies = [ [[package]] name = "logos-blockchain-wallet-service" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "async-trait", "bytes", @@ -4261,7 +4219,7 @@ dependencies = [ [[package]] name = "logos-blockchain-witness-generator" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "tempfile", ] @@ -4269,7 +4227,7 @@ dependencies = [ [[package]] name = "logos-blockchain-zksign" version = "0.1.0" -source = "git+https://github.com/logos-co/nomos-node.git?rev=2392190d88e8ae8271fa9321014ea33324be7c28#2392190d88e8ae8271fa9321014ea33324be7c28" +source = "git+https://github.com/logos-co/nomos-node.git?rev=a075fdf3209947572069e7b7b2ff6250576c8831#a075fdf3209947572069e7b7b2ff6250576c8831" dependencies = [ "logos-blockchain-circuits-prover", "logos-blockchain-circuits-utils", @@ -4644,12 +4602,6 @@ dependencies = [ "libc", ] -[[package]] -name = "no-std-compat" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" - [[package]] name = "nom" version = "7.1.3" @@ -4669,18 +4621,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "nonempty" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e591e719385e6ebaeb5ce5d3887f7d5676fceca6411d1925ccc95745f3d6f7" - -[[package]] -name = "nonzero_ext" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21" - [[package]] name = "nu-ansi-term" version = "0.50.3" @@ -5351,21 +5291,6 @@ dependencies = [ "prost", ] -[[package]] -name = "quanta" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3ab5a9d756f0d97bdc89019bd2e4ea098cf9cde50ee7564dde6b81ccc8f06c7" -dependencies = [ - "crossbeam-utils", - "libc", - "once_cell", - "raw-cpuid", - "wasi", - "web-sys", - "winapi", -] - [[package]] name = "quick-protobuf" version = "0.8.1" @@ -5527,15 +5452,6 @@ dependencies = [ "rand_core 0.9.5", ] -[[package]] -name = "raw-cpuid" -version = "11.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" -dependencies = [ - "bitflags 2.10.0", -] - [[package]] name = "rcgen" version = "0.13.2" @@ -6262,15 +6178,6 @@ dependencies = [ "windows-sys 0.60.2", ] -[[package]] -name = "spinning_top" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96d2d1d716fb500937168cc09353ffdc7a012be8475ac7308e1bdf0e3923300" -dependencies = [ - "lock_api", -] - [[package]] name = "spki" version = "0.7.3" @@ -6458,6 +6365,7 @@ dependencies = [ "hex", "logos-blockchain-api-service", "logos-blockchain-blend-service", + "logos-blockchain-chain-leader-service", "logos-blockchain-chain-network-service", "logos-blockchain-chain-service", "logos-blockchain-core", @@ -6597,7 +6505,6 @@ name = "testing-framework-workflows" version = "0.1.0" dependencies = [ "async-trait", - "logos-blockchain-chain-service", "logos-blockchain-core", "logos-blockchain-key-management-system-service", "rand 0.8.5", @@ -6660,9 +6567,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.46" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9da98b7d9b7dad93488a84b8248efc35352b0b2657397d4167e7ad67e5d535e5" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", "itoa", @@ -6681,9 +6588,9 @@ checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.26" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc610bac2dcee56805c99642447d4c5dbde4d01f752ffea0199aee1f601dc4" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" dependencies = [ "num-conv", "time-core", @@ -6910,7 +6817,6 @@ dependencies = [ "tokio", "tower-layer", "tower-service", - "tracing", ] [[package]] @@ -6982,22 +6888,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" -[[package]] -name = "tower_governor" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3790eac6ad3fb8d9d96c2b040ae06e2517aa24b067545d1078b96ae72f7bb9a7" -dependencies = [ - "axum", - "forwarded-header-value", - "governor", - "http 1.4.0", - "pin-project", - "thiserror 1.0.69", - "tower 0.4.13", - "tracing", -] - [[package]] name = "tracing" version = "0.1.44" diff --git a/Cargo.toml b/Cargo.toml index e59709a..675f508 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,37 +40,37 @@ testing-framework-runner-local = { default-features = false, path = "testing-f testing-framework-workflows = { default-features = false, path = "testing-framework/workflows" } # Logos git dependencies (pinned to latest master) -broadcast-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-broadcast-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -cfgsync_tf = { default-features = false, path = "testing-framework/tools/cfgsync_tf" } -chain-leader = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-leader-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -chain-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-network-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -chain-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -common-http-client = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-common-http-client", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -cryptarchia-engine = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-engine", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -cryptarchia-sync = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-sync", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -groth16 = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-groth16", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -key-management-system-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-key-management-system-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -nomos-api = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-api-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -nomos-blend-message = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-message", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -nomos-blend-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -nomos-core = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-core", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -nomos-http-api-common = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-http-api-common", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -nomos-ledger = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-ledger", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -nomos-libp2p = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-libp2p", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -nomos-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-network-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -nomos-node = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-node", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -nomos-sdp = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-sdp-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -nomos-time = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-time-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -nomos-tracing = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -nomos-tracing-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -nomos-utils = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-utils", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -nomos-wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -poc = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-poc", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -pol = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-pol", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -tests = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tests", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -tx-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tx-service", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } -zksign = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-zksign", rev = "2392190d88e8ae8271fa9321014ea33324be7c28" } +cfgsync_tf = { default-features = false, path = "testing-framework/tools/cfgsync_tf" } +lb-api-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-api-service", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-blend-message = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-message", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-blend-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-blend-service", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-chain-broadcast-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-broadcast-service", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-chain-leader-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-leader-service", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-chain-network = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-network-service", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-chain-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-chain-service", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-common-http-client = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-common-http-client", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-core = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-core", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-cryptarchia-engine = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-engine", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-cryptarchia-sync = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-cryptarchia-sync", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-groth16 = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-groth16", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-http-api-common = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-http-api-common", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-key-management-system-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-key-management-system-service", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-ledger = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-ledger", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-libp2p = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-libp2p", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-network-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-network-service", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-node = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-node", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-poc = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-poc", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-pol = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-pol", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-sdp-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-sdp-service", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-tests = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tests", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-time-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-time-service", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-tracing = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-tracing-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tracing-service", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-tx-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-tx-service", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-utils = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-utils", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-wallet = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-wallet-service = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-wallet-service", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } +lb-zksign = { default-features = false, git = "https://github.com/logos-co/nomos-node.git", package = "logos-blockchain-zksign", rev = "a075fdf3209947572069e7b7b2ff6250576c8831" } # External crates async-trait = { default-features = false, version = "0.1" } diff --git a/book/src/environment-variables.md b/book/src/environment-variables.md index bcfd7de..6896261 100644 --- a/book/src/environment-variables.md +++ b/book/src/environment-variables.md @@ -127,13 +127,13 @@ ls /tmp/test-logs/ **Common filter targets:** -| Target Prefix | Subsystem | -|---------------|-----------| -| `cryptarchia` | Consensus (Cryptarchia) | -| `nomos_blend` | Mix network/privacy layer | -| `chain_service` | Chain service (node APIs/state) | -| `chain_network` | P2P networking | -| `chain_leader` | Leader election | +| Target Prefix | Subsystem | +|---------------------------|-----------| +| `lb_cryptarchia` | Consensus (Cryptarchia) | +| `lb_blend` | Mix network/privacy layer | +| `lb_chain_service` | Chain service (node APIs/state) | +| `lb_chain_network` | P2P networking | +| `lb_chain_leader_service` | Leader election | --- diff --git a/book/src/logging-observability.md b/book/src/logging-observability.md index 9243874..eb0a3bd 100644 --- a/book/src/logging-observability.md +++ b/book/src/logging-observability.md @@ -45,7 +45,7 @@ See [Environment Variables Reference](environment-variables.md) for complete det LOGOS_BLOCKCHAIN_TESTS_TRACING=true \ LOGOS_BLOCKCHAIN_LOG_DIR=/tmp/test-logs \ LOGOS_BLOCKCHAIN_LOG_LEVEL=debug \ -LOGOS_BLOCKCHAIN_LOG_FILTER="cryptarchia=trace,chain_service=info,chain_network=info" \ +LOGOS_BLOCKCHAIN_LOG_FILTER="lb_cryptarchia=trace,lb_chain_service=info,lb_chain_network=info" \ cargo run -p runner-examples --bin local_runner ``` @@ -66,18 +66,18 @@ When `LOGOS_BLOCKCHAIN_LOG_DIR` is set, each node writes logs to separate files: Common target prefixes for `LOGOS_BLOCKCHAIN_LOG_FILTER`: -| Target Prefix | Subsystem | -|---------------|-----------| -| `cryptarchia` | Consensus (Cryptarchia) | -| `nomos_blend` | Mix network/privacy layer | -| `chain_service` | Chain service (node APIs/state) | -| `chain_network` | P2P networking | -| `chain_leader` | Leader election | +| Target Prefix | Subsystem | +|---------------------------|-----------| +| `lb_cryptarchia` | Consensus (Cryptarchia) | +| `lb_blend` | Mix network/privacy layer | +| `lb_chain_service` | Chain service (node APIs/state) | +| `lb_chain_network` | P2P networking | +| `lb_chain_leader_service` | Leader election | **Example filter:** ```bash -LOGOS_BLOCKCHAIN_LOG_FILTER="cryptarchia=trace,chain_service=info,chain_network=info" +LOGOS_BLOCKCHAIN_LOG_FILTER="lb_cryptarchia=trace,lb_chain_service=info,lb_chain_network=info" ``` --- diff --git a/testing-framework/configs/Cargo.toml b/testing-framework/configs/Cargo.toml index 5030d6d..993fea9 100644 --- a/testing-framework/configs/Cargo.toml +++ b/testing-framework/configs/Cargo.toml @@ -10,32 +10,33 @@ repository.workspace = true version = "0.1.0" [dependencies] -chain-network = { workspace = true } -chain-service = { workspace = true } -cryptarchia-engine = { features = ["serde"], workspace = true } -cryptarchia-sync = { workspace = true } -groth16 = { workspace = true } -hex = { default-features = false, version = "0.4.3" } -key-management-system-service = { workspace = true } -nomos-api = { workspace = true } -nomos-blend-service = { features = ["libp2p"], workspace = true } -nomos-core = { workspace = true } -nomos-ledger = { features = ["serde"], workspace = true } -nomos-libp2p = { workspace = true } -nomos-node = { default-features = false, features = ["testing"], workspace = true } -nomos-sdp = { workspace = true } -nomos-time = { workspace = true } -nomos-tracing = { workspace = true } -nomos-tracing-service = { workspace = true } -nomos-utils = { workspace = true } -nomos-wallet = { workspace = true } -num-bigint = { default-features = false, version = "0.4" } -rand = { workspace = true } -serde = { features = ["derive"], workspace = true } -testing-framework-env = { workspace = true } -thiserror = { workspace = true } -time = { default-features = true, version = "0.3" } -tracing = { workspace = true } +hex = { default-features = false, version = "0.4.3" } +lb-api-service = { workspace = true } +lb-blend-service = { features = ["libp2p"], workspace = true } +lb-chain-leader-service = { workspace = true } +lb-chain-network = { workspace = true } +lb-chain-service = { workspace = true } +lb-core = { workspace = true } +lb-cryptarchia-engine = { features = ["serde"], workspace = true } +lb-cryptarchia-sync = { workspace = true } +lb-groth16 = { workspace = true } +lb-key-management-system-service = { workspace = true } +lb-ledger = { features = ["serde"], workspace = true } +lb-libp2p = { workspace = true } +lb-node = { default-features = false, features = ["testing"], workspace = true } +lb-sdp-service = { workspace = true } +lb-time-service = { workspace = true } +lb-tracing = { workspace = true } +lb-tracing-service = { workspace = true } +lb-utils = { workspace = true } +lb-wallet-service = { workspace = true } +num-bigint = { default-features = false, version = "0.4" } +rand = { workspace = true } +serde = { features = ["derive"], workspace = true } +testing-framework-env = { workspace = true } +thiserror = { workspace = true } +time = { default-features = true, version = "0.3" } +tracing = { workspace = true } [lints] workspace = true diff --git a/testing-framework/configs/src/lib.rs b/testing-framework/configs/src/lib.rs index 0cc15c3..f2002a2 100644 --- a/testing-framework/configs/src/lib.rs +++ b/testing-framework/configs/src/lib.rs @@ -1,7 +1,7 @@ use std::{net::Ipv4Addr, ops::Mul as _, sync::LazyLock, time::Duration}; -use nomos_core::sdp::ProviderId; -use nomos_libp2p::{Multiaddr, PeerId, multiaddr}; +use lb_core::sdp::ProviderId; +use lb_libp2p::{Multiaddr, PeerId, multiaddr}; use testing_framework_env as tf_env; pub mod constants; @@ -31,17 +31,13 @@ pub fn node_address_from_port(port: u16) -> Multiaddr { } #[must_use] -pub fn secret_key_to_peer_id(node_key: nomos_libp2p::ed25519::SecretKey) -> PeerId { - PeerId::from_public_key( - &nomos_libp2p::ed25519::Keypair::from(node_key) - .public() - .into(), - ) +pub fn secret_key_to_peer_id(node_key: lb_libp2p::ed25519::SecretKey) -> PeerId { + PeerId::from_public_key(&lb_libp2p::ed25519::Keypair::from(node_key).public().into()) } #[must_use] -pub fn secret_key_to_provider_id(node_key: nomos_libp2p::ed25519::SecretKey) -> ProviderId { - let bytes = nomos_libp2p::ed25519::Keypair::from(node_key) +pub fn secret_key_to_provider_id(node_key: lb_libp2p::ed25519::SecretKey) -> ProviderId { + let bytes = lb_libp2p::ed25519::Keypair::from(node_key) .public() .to_bytes(); match ProviderId::try_from(bytes) { diff --git a/testing-framework/configs/src/nodes/blend.rs b/testing-framework/configs/src/nodes/blend.rs index 1f8dbd8..44f4775 100644 --- a/testing-framework/configs/src/nodes/blend.rs +++ b/testing-framework/configs/src/nodes/blend.rs @@ -1,19 +1,19 @@ use std::{num::NonZeroU64, path::PathBuf, time::Duration}; use blend_serde::Config as BlendUserConfig; -use key_management_system_service::keys::Key; -use nomos_blend_service::{ +use lb_blend_service::{ core::settings::{CoverTrafficSettings, MessageDelayerSettings, SchedulerSettings, ZkSettings}, settings::TimingSettings, }; -use nomos_node::config::{ +use lb_key_management_system_service::keys::Key; +use lb_node::config::{ blend::{ deployment::{self as blend_deployment, Settings as BlendDeploymentSettings}, serde as blend_serde, }, network::deployment::Settings as NetworkDeploymentSettings, }; -use nomos_utils::math::NonNegativeF64; +use lb_utils::math::NonNegativeF64; use crate::{ nodes::kms::key_id_for_preload_backend, @@ -33,6 +33,7 @@ const SAFETY_BUFFER_INTERVALS: u64 = 100; const MESSAGE_FREQUENCY_PER_ROUND: f64 = 1.0; const MAX_RELEASE_DELAY_ROUNDS: u64 = 3; const DATA_REPLICATION_FACTOR: u64 = 0; +pub const ACTIVITY_THRESHOLD_SENSITIVITY: u64 = 1; pub(crate) fn build_blend_service_config( config: &TopologyBlendConfig, @@ -138,19 +139,20 @@ fn build_blend_deployment_settings( }, minimum_messages_coefficient: backend_core.minimum_messages_coefficient, normalization_constant: backend_core.normalization_constant, + activity_threshold_sensitivity: ACTIVITY_THRESHOLD_SENSITIVITY, }, } } fn build_network_deployment_settings() -> NetworkDeploymentSettings { NetworkDeploymentSettings { - identify_protocol_name: nomos_libp2p::protocol_name::StreamProtocol::new( + identify_protocol_name: lb_libp2p::protocol_name::StreamProtocol::new( "/integration/nomos/identify/1.0.0", ), - kademlia_protocol_name: nomos_libp2p::protocol_name::StreamProtocol::new( + kademlia_protocol_name: lb_libp2p::protocol_name::StreamProtocol::new( "/integration/nomos/kad/1.0.0", ), - chain_sync_protocol_name: nomos_libp2p::protocol_name::StreamProtocol::new( + chain_sync_protocol_name: lb_libp2p::protocol_name::StreamProtocol::new( "/integration/nomos/cryptarchia/sync/1.0.0", ), } diff --git a/testing-framework/configs/src/nodes/common.rs b/testing-framework/configs/src/nodes/common.rs index 4fe836c..0f5afe2 100644 --- a/testing-framework/configs/src/nodes/common.rs +++ b/testing-framework/configs/src/nodes/common.rs @@ -5,19 +5,23 @@ use std::{ time::Duration, }; -use chain_network::{BootstrapConfig as ChainBootstrapConfig, OrphanConfig, SyncConfig}; -use chain_service::StartingState; -use key_management_system_service::keys::Key; -use nomos_api::ApiServiceSettings; -use nomos_node::{ +use lb_api_service::ApiServiceSettings; +use lb_chain_leader_service::LeaderWalletConfig; +use lb_chain_network::{BootstrapConfig as ChainBootstrapConfig, OrphanConfig, SyncConfig}; +use lb_chain_service::StartingState; +use lb_core::mantle::Value; +use lb_key_management_system_service::keys::{Key, secured_key::SecuredKey}; +use lb_node::{ api::backend::AxumBackendSettings as NodeAxumBackendSettings, config::{ cryptarchia::{ deployment::{ - SdpConfig as DeploymentSdpConfig, Settings as CryptarchiaDeploymentSettings, + SdpConfig as DeploymentSdpConfig, ServiceParameters, + Settings as CryptarchiaDeploymentSettings, }, serde::{ - Config as CryptarchiaConfig, NetworkConfig as CryptarchiaNetworkConfig, + Config as CryptarchiaConfig, LeaderConfig, + NetworkConfig as CryptarchiaNetworkConfig, ServiceConfig as CryptarchiaServiceConfig, }, }, @@ -25,7 +29,7 @@ use nomos_node::{ time::{deployment::Settings as TimeDeploymentSettings, serde::Config as TimeConfig}, }, }; -use nomos_wallet::WalletServiceSettings; +use lb_wallet_service::WalletServiceSettings; use crate::{nodes::kms::key_id_for_preload_backend, timeouts, topology::configs::GeneralConfig}; @@ -35,11 +39,29 @@ const MEMPOOL_PUBSUB_TOPIC: &str = "mantle"; const STATE_RECORDING_INTERVAL_SECS: u64 = 60; const IBD_DOWNLOAD_DELAY_SECS: u64 = 10; const MAX_ORPHAN_CACHE_SIZE: NonZeroUsize = unsafe { NonZeroUsize::new_unchecked(5) }; -const API_RATE_LIMIT_PER_SECOND: u64 = 10000; -const API_RATE_LIMIT_BURST: u32 = 10000; const API_MAX_CONCURRENT_REQUESTS: usize = 1000; pub(crate) fn cryptarchia_deployment(config: &GeneralConfig) -> CryptarchiaDeploymentSettings { + let mantle_service_params = &config + .consensus_config + .ledger_config + .sdp_config + .service_params; + let node_service_params = mantle_service_params + .iter() + .map(|(service_type, service_parameters)| { + ( + service_type.clone(), + ServiceParameters { + lock_period: service_parameters.lock_period, + inactivity_period: service_parameters.inactivity_period, + retention_period: service_parameters.retention_period, + timestamp: service_parameters.timestamp, + }, + ) + }) + .collect::>(); + CryptarchiaDeploymentSettings { epoch_config: config.consensus_config.ledger_config.epoch_config, security_param: config @@ -48,12 +70,7 @@ pub(crate) fn cryptarchia_deployment(config: &GeneralConfig) -> CryptarchiaDeplo .consensus_config .security_param(), sdp_config: DeploymentSdpConfig { - service_params: config - .consensus_config - .ledger_config - .sdp_config - .service_params - .clone(), + service_params: node_service_params, min_stake: config.consensus_config.ledger_config.sdp_config.min_stake, }, gossipsub_protocol: CRYPTARCHIA_GOSSIPSUB_PROTOCOL.to_owned(), @@ -79,10 +96,10 @@ pub(crate) fn cryptarchia_config(config: &GeneralConfig) -> CryptarchiaConfig { genesis_tx: config.consensus_config.genesis_tx.clone(), }, recovery_file: PathBuf::from("recovery/cryptarchia.json"), - bootstrap: chain_service::BootstrapConfig { + bootstrap: lb_chain_service::BootstrapConfig { prolonged_bootstrap_period: config.bootstrapping_config.prolonged_bootstrap_period, force_bootstrap: false, - offline_grace_period: chain_service::OfflineGracePeriodConfig { + offline_grace_period: lb_chain_service::OfflineGracePeriodConfig { grace_period: timeouts::grace_period(), state_recording_interval: Duration::from_secs(STATE_RECORDING_INTERVAL_SECS), }, @@ -90,7 +107,7 @@ pub(crate) fn cryptarchia_config(config: &GeneralConfig) -> CryptarchiaConfig { }, network: CryptarchiaNetworkConfig { bootstrap: ChainBootstrapConfig { - ibd: chain_network::IbdConfig { + ibd: lb_chain_network::IbdConfig { peers: HashSet::new(), delay_before_new_download: Duration::from_secs(IBD_DOWNLOAD_DELAY_SECS), }, @@ -101,14 +118,20 @@ pub(crate) fn cryptarchia_config(config: &GeneralConfig) -> CryptarchiaConfig { }, }, }, + leader: LeaderConfig { + wallet: LeaderWalletConfig { + max_tx_fee: Value::MAX, + funding_pk: config.consensus_config.funding_sk.as_public_key(), + }, + }, } } pub(crate) fn time_config(config: &GeneralConfig) -> TimeConfig { TimeConfig { - backend: nomos_time::backends::NtpTimeBackendSettings { + backend: lb_time_service::backends::NtpTimeBackendSettings { ntp_server: config.time_config.ntp_server.clone(), - ntp_client_settings: nomos_time::backends::ntp::async_client::NTPClientSettings { + ntp_client_settings: lb_time_service::backends::ntp::async_client::NTPClientSettings { timeout: config.time_config.timeout, listening_interface: config.time_config.interface.clone(), }, @@ -118,13 +141,13 @@ pub(crate) fn time_config(config: &GeneralConfig) -> TimeConfig { } } -pub(crate) fn mempool_config() -> nomos_node::config::mempool::serde::Config { - nomos_node::config::mempool::serde::Config { +pub(crate) fn mempool_config() -> lb_node::config::mempool::serde::Config { + lb_node::config::mempool::serde::Config { recovery_path: PathBuf::from("recovery/mempool.json"), } } -pub(crate) fn tracing_settings(config: &GeneralConfig) -> nomos_tracing_service::TracingSettings { +pub(crate) fn tracing_settings(config: &GeneralConfig) -> lb_tracing_service::TracingSettings { config.tracing_config.tracing_settings.clone() } @@ -132,8 +155,6 @@ pub(crate) fn http_config(config: &GeneralConfig) -> ApiServiceSettings RunConfig { fn build_node_deployment_settings( config: &GeneralConfig, - blend_deployment: nomos_node::config::blend::deployment::Settings, - network_deployment: nomos_node::config::network::deployment::Settings, + blend_deployment: lb_node::config::blend::deployment::Settings, + network_deployment: lb_node::config::network::deployment::Settings, ) -> DeploymentSettings { DeploymentSettings { blend: blend_deployment, diff --git a/testing-framework/configs/src/topology/configs/api.rs b/testing-framework/configs/src/topology/configs/api.rs index aaa97be..13bf132 100644 --- a/testing-framework/configs/src/topology/configs/api.rs +++ b/testing-framework/configs/src/topology/configs/api.rs @@ -1,6 +1,6 @@ use std::net::SocketAddr; -use nomos_utils::net::get_available_tcp_port; +use lb_utils::net::get_available_tcp_port; use thiserror::Error; const LOCALHOST: [u8; 4] = [127, 0, 0, 1]; diff --git a/testing-framework/configs/src/topology/configs/blend.rs b/testing-framework/configs/src/topology/configs/blend.rs index 60a631e..2a4be29 100644 --- a/testing-framework/configs/src/topology/configs/blend.rs +++ b/testing-framework/configs/src/topology/configs/blend.rs @@ -1,13 +1,13 @@ use core::time::Duration; use std::{net::Ipv4Addr, num::NonZeroU64}; -use key_management_system_service::keys::{Ed25519Key, UnsecuredEd25519Key, ZkKey}; -use nomos_blend_service::{ +use lb_blend_service::{ core::backends::libp2p::Libp2pBlendBackendSettings as Libp2pCoreBlendBackendSettings, edge::backends::libp2p::Libp2pBlendBackendSettings as Libp2pEdgeBlendBackendSettings, }; -use nomos_libp2p::{Multiaddr, Protocol, protocol_name::StreamProtocol}; -use nomos_utils::math::NonNegativeF64; +use lb_key_management_system_service::keys::{Ed25519Key, UnsecuredEd25519Key, ZkKey}; +use lb_libp2p::{Multiaddr, Protocol, protocol_name::StreamProtocol}; +use lb_utils::math::NonNegativeF64; use num_bigint::BigUint; const EDGE_NODE_CONNECTION_TIMEOUT: Duration = Duration::from_secs(1); diff --git a/testing-framework/configs/src/topology/configs/consensus.rs b/testing-framework/configs/src/topology/configs/consensus.rs index c620ea7..0082c37 100644 --- a/testing-framework/configs/src/topology/configs/consensus.rs +++ b/testing-framework/configs/src/topology/configs/consensus.rs @@ -5,12 +5,7 @@ use std::{ sync::Arc, }; -use cryptarchia_engine::EpochConfig; -use groth16::CompressedGroth16Proof; -use key_management_system_service::keys::{ - Ed25519Key, UnsecuredZkKey, ZkKey, ZkPublicKey, ZkSignature, -}; -use nomos_core::{ +use lb_core::{ mantle::{ GenesisTx as GenesisTxTrait, MantleTx, Note, OpProof, Utxo, genesis_tx::GenesisTx, @@ -22,11 +17,17 @@ use nomos_core::{ }, sdp::{DeclarationMessage, Locator, ProviderId, ServiceParameters, ServiceType}, }; -use nomos_node::{SignedMantleTx, Transaction as _}; -use nomos_utils::math::NonNegativeF64; +use lb_cryptarchia_engine::EpochConfig; +use lb_groth16::CompressedGroth16Proof; +use lb_key_management_system_service::keys::{ + Ed25519Key, UnsecuredZkKey, ZkKey, ZkPublicKey, ZkSignature, +}; +use lb_node::{SignedMantleTx, Transaction as _}; +use lb_utils::math::NonNegativeF64; use num_bigint::BigUint; use super::wallet::{WalletAccount, WalletConfig}; +use crate::nodes::blend::ACTIVITY_THRESHOLD_SENSITIVITY; #[derive(Debug, thiserror::Error)] pub enum ConsensusConfigError { @@ -101,7 +102,7 @@ impl ProviderInfo { pub struct GeneralConsensusConfig { pub leader_pk: ZkPublicKey, pub leader_sk: UnsecuredZkKey, - pub ledger_config: nomos_ledger::Config, + pub ledger_config: lb_ledger::Config, pub genesis_tx: GenesisTx, pub utxos: Vec, pub blend_notes: Vec, @@ -161,18 +162,18 @@ fn create_genesis_tx(utxos: &mut [Utxo]) -> Result Result { - Ok(nomos_ledger::Config { +) -> Result { + Ok(lb_ledger::Config { epoch_config: EpochConfig { epoch_stake_distribution_stabilization: unsafe { NonZero::new_unchecked(3) }, epoch_period_nonce_buffer: unsafe { NonZero::new_unchecked(3) }, epoch_period_nonce_stabilization: unsafe { NonZero::new_unchecked(4) }, }, - consensus_config: cryptarchia_engine::Config::new( + consensus_config: lb_cryptarchia_engine::Config::new( consensus_params.security_param, consensus_params.active_slot_coeff, ), - sdp_config: nomos_ledger::mantle::sdp::Config { + sdp_config: lb_ledger::mantle::sdp::Config { service_params: Arc::new( [( ServiceType::BlendNetwork, @@ -186,12 +187,12 @@ fn build_ledger_config( )] .into(), ), - min_stake: nomos_core::sdp::MinStake { + min_stake: lb_core::sdp::MinStake { threshold: 1, timestamp: 0, }, - service_rewards_params: nomos_ledger::mantle::sdp::ServiceRewardsParameters { - blend: nomos_ledger::mantle::sdp::rewards::blend::RewardsParameters { + service_rewards_params: lb_ledger::mantle::sdp::ServiceRewardsParameters { + blend: lb_ledger::mantle::sdp::rewards::blend::RewardsParameters { rounds_per_session: unsafe { NonZeroU64::new_unchecked(10) }, message_frequency_per_round: NonNegativeF64::try_from(1.0).map_err(|_| { ConsensusConfigError::LedgerConfig { @@ -201,6 +202,7 @@ fn build_ledger_config( num_blend_layers: unsafe { NonZeroU64::new_unchecked(3) }, minimum_network_size: unsafe { NonZeroU64::new_unchecked(1) }, data_replication_factor: 0, + activity_threshold_sensitivity: ACTIVITY_THRESHOLD_SENSITIVITY, }, }, }, @@ -397,7 +399,7 @@ fn build_genesis_inscription() -> Result { fn build_genesis_ops( inscription: InscriptionOp, - ledger_tx_hash: nomos_core::mantle::TxHash, + ledger_tx_hash: lb_core::mantle::TxHash, providers: &[ProviderInfo], ) -> Vec { let mut ops = Vec::with_capacity(1 + providers.len()); @@ -423,7 +425,7 @@ fn build_genesis_ops( } fn build_genesis_ops_proofs( - mantle_tx_hash: nomos_core::mantle::TxHash, + mantle_tx_hash: lb_core::mantle::TxHash, providers: Vec, ) -> Result, ConsensusConfigError> { let mut ops_proofs = Vec::with_capacity(1 + providers.len()); diff --git a/testing-framework/configs/src/topology/configs/deployment.rs b/testing-framework/configs/src/topology/configs/deployment.rs index 4f6284d..1c7df23 100644 --- a/testing-framework/configs/src/topology/configs/deployment.rs +++ b/testing-framework/configs/src/topology/configs/deployment.rs @@ -1,11 +1,11 @@ use core::{num::NonZeroU64, time::Duration}; -use nomos_blend_service::{ +use lb_blend_service::{ core::settings::{CoverTrafficSettings, MessageDelayerSettings, SchedulerSettings}, settings::TimingSettings, }; -use nomos_libp2p::protocol_name::StreamProtocol; -use nomos_node::config::{ +use lb_libp2p::protocol_name::StreamProtocol; +use lb_node::config::{ blend::deployment::{ CommonSettings as BlendCommonSettings, CoreSettings as BlendCoreSettings, Settings as BlendDeploymentSettings, @@ -13,7 +13,7 @@ use nomos_node::config::{ deployment::{CustomDeployment, Settings as DeploymentSettings}, network::deployment::Settings as NetworkDeploymentSettings, }; -use nomos_utils::math::NonNegativeF64; +use lb_utils::math::NonNegativeF64; const DEFAULT_ROUND_DURATION: Duration = Duration::from_secs(1); diff --git a/testing-framework/configs/src/topology/configs/mod.rs b/testing-framework/configs/src/topology/configs/mod.rs index 259c0ef..198f58e 100644 --- a/testing-framework/configs/src/topology/configs/mod.rs +++ b/testing-framework/configs/src/topology/configs/mod.rs @@ -16,13 +16,13 @@ use consensus::{ ConsensusConfigError, GeneralConsensusConfig, ProviderInfo, create_genesis_tx_with_declarations, sync_utxos_with_genesis, }; -use key_management_system_service::{backend::preload::PreloadKMSBackendSettings, keys::Key}; -use network::GeneralNetworkConfig; -use nomos_core::{ +use lb_core::{ mantle::GenesisTx as _, sdp::{Locator, ServiceType}, }; -use nomos_utils::net::get_available_udp_port; +use lb_key_management_system_service::{backend::preload::PreloadKMSBackendSettings, keys::Key}; +use lb_utils::net::get_available_udp_port; +use network::GeneralNetworkConfig; use rand::{Rng as _, thread_rng}; use tracing::GeneralTracingConfig; use wallet::WalletConfig; @@ -200,7 +200,7 @@ fn collect_blend_core_providers( fn apply_consensus_genesis_tx( consensus_configs: &mut [GeneralConsensusConfig], - genesis_tx: &nomos_core::mantle::genesis_tx::GenesisTx, + genesis_tx: &lb_core::mantle::genesis_tx::GenesisTx, ) -> Result<(), ConsensusConfigError> { for c in consensus_configs { c.genesis_tx = genesis_tx.clone(); diff --git a/testing-framework/configs/src/topology/configs/network.rs b/testing-framework/configs/src/topology/configs/network.rs index 49387e4..8f189ae 100644 --- a/testing-framework/configs/src/topology/configs/network.rs +++ b/testing-framework/configs/src/topology/configs/network.rs @@ -1,10 +1,10 @@ use std::time::Duration; -use nomos_libp2p::{ +use lb_libp2p::{ IdentifySettings, KademliaSettings, Multiaddr, NatSettings, Protocol, ed25519, gossipsub, }; -use nomos_node::config::network::serde::{BackendSettings, Config, SwarmConfig}; -use nomos_utils::net::get_available_udp_port; +use lb_node::config::network::serde::{BackendSettings, Config, SwarmConfig}; +use lb_utils::net::get_available_udp_port; use testing_framework_env as tf_env; use thiserror::Error; @@ -45,7 +45,7 @@ fn default_swarm_config() -> SwarmConfig { gossipsub_config: gossipsub::Config::default(), kademlia_config: KademliaSettings::default(), identify_config: IdentifySettings::default(), - chain_sync_config: cryptarchia_sync::Config::default(), + chain_sync_config: lb_cryptarchia_sync::Config::default(), nat_config: NatSettings::default(), } } @@ -85,7 +85,7 @@ pub fn create_network_configs( Ok(SwarmConfig { node_key, port, - chain_sync_config: cryptarchia_sync::Config { + chain_sync_config: lb_cryptarchia_sync::Config { peer_response_timeout: PEER_RESPONSE_TIMEOUT, }, nat_config: nat_settings(port)?, @@ -123,7 +123,7 @@ pub fn build_network_config_for_node( let swarm_config = SwarmConfig { node_key, port, - chain_sync_config: cryptarchia_sync::Config { + chain_sync_config: lb_cryptarchia_sync::Config { peer_response_timeout: PEER_RESPONSE_TIMEOUT, }, nat_config: nat_settings(port)?, diff --git a/testing-framework/configs/src/topology/configs/runtime.rs b/testing-framework/configs/src/topology/configs/runtime.rs index 62fd17f..76bbdec 100644 --- a/testing-framework/configs/src/topology/configs/runtime.rs +++ b/testing-framework/configs/src/topology/configs/runtime.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; -use key_management_system_service::{backend::preload::PreloadKMSBackendSettings, keys::Key}; -use nomos_libp2p::Multiaddr; +use lb_key_management_system_service::{backend::preload::PreloadKMSBackendSettings, keys::Key}; +use lb_libp2p::Multiaddr; use crate::{ node_address_from_port, diff --git a/testing-framework/configs/src/topology/configs/tracing.rs b/testing-framework/configs/src/topology/configs/tracing.rs index 75dc701..9d6e309 100644 --- a/testing-framework/configs/src/topology/configs/tracing.rs +++ b/testing-framework/configs/src/topology/configs/tracing.rs @@ -1,9 +1,9 @@ -use nomos_tracing::{ +use lb_tracing::{ logging::{local::FileConfig, loki::LokiConfig}, metrics::otlp::OtlpMetricsConfig, tracing::otlp::OtlpTracingConfig, }; -use nomos_tracing_service::{ +use lb_tracing_service::{ ConsoleLayer, FilterLayer, LoggerLayer, MetricsLayer, TracingLayer, TracingSettings, }; use testing_framework_env as tf_env; @@ -40,7 +40,7 @@ impl GeneralTracingConfig { .unwrap_or(MetricsLayer::None); let filter = file_filter_override().unwrap_or_else(|| { - nomos_tracing::filter::envfilter::EnvFilterConfig { + lb_tracing::filter::envfilter::EnvFilterConfig { filters: std::iter::once(&("nomos", "debug")) .map(|(k, v)| ((*k).to_owned(), (*v).to_owned())) .collect(), @@ -121,8 +121,8 @@ fn file_log_level() -> Level { .unwrap_or(Level::INFO) } -fn file_filter_override() -> Option { - tf_env::nomos_log_filter().map(|raw| nomos_tracing::filter::envfilter::EnvFilterConfig { +fn file_filter_override() -> Option { + tf_env::nomos_log_filter().map(|raw| lb_tracing::filter::envfilter::EnvFilterConfig { filters: raw .split(',') .filter_map(|pair| { diff --git a/testing-framework/configs/src/topology/configs/wallet.rs b/testing-framework/configs/src/topology/configs/wallet.rs index 43af407..a20d6eb 100644 --- a/testing-framework/configs/src/topology/configs/wallet.rs +++ b/testing-framework/configs/src/topology/configs/wallet.rs @@ -1,6 +1,6 @@ use std::num::NonZeroUsize; -use key_management_system_service::keys::{ZkKey, ZkPublicKey}; +use lb_key_management_system_service::keys::{ZkKey, ZkPublicKey}; use num_bigint::BigUint; /// Collection of wallet accounts that should be funded at genesis. diff --git a/testing-framework/core/Cargo.toml b/testing-framework/core/Cargo.toml index ee2bb8b..8b902b7 100644 --- a/testing-framework/core/Cargo.toml +++ b/testing-framework/core/Cargo.toml @@ -16,32 +16,32 @@ workspace = true default = [] [dependencies] -anyhow = "1" -async-trait = "0.1" -chain-service = { workspace = true } -common-http-client = { workspace = true } -futures = { default-features = false, version = "0.3" } -groth16 = { workspace = true } -hex = { default-features = false, version = "0.4.3" } -key-management-system-service = { workspace = true } -nomos-core = { workspace = true } -nomos-http-api-common = { workspace = true } -nomos-libp2p = { workspace = true } -nomos-network = { features = ["libp2p"], workspace = true } -nomos-node = { default-features = false, features = ["testing"], workspace = true } -nomos-tracing = { workspace = true } -nomos-tracing-service = { workspace = true } -nomos-utils = { workspace = true } -prometheus-http-query = "0.8" -rand = { workspace = true } -reqwest = { features = ["json"], workspace = true } -serde = { workspace = true } -serde_json = { workspace = true } -serde_with = { workspace = true } -serde_yaml = { workspace = true } -tempfile = { workspace = true } -testing-framework-config = { workspace = true } -testing-framework-env = { workspace = true } -thiserror = { workspace = true } -tokio = { features = ["macros", "process", "rt-multi-thread", "time"], workspace = true } -tracing = { workspace = true } +anyhow = "1" +async-trait = "0.1" +futures = { default-features = false, version = "0.3" } +hex = { default-features = false, version = "0.4.3" } +lb-chain-service = { workspace = true } +lb-common-http-client = { workspace = true } +lb-core = { workspace = true } +lb-groth16 = { workspace = true } +lb-http-api-common = { workspace = true } +lb-key-management-system-service = { workspace = true } +lb-libp2p = { workspace = true } +lb-network-service = { features = ["libp2p"], workspace = true } +lb-node = { default-features = false, features = ["testing"], workspace = true } +lb-tracing = { workspace = true } +lb-tracing-service = { workspace = true } +lb-utils = { workspace = true } +prometheus-http-query = "0.8" +rand = { workspace = true } +reqwest = { features = ["json"], workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +serde_with = { workspace = true } +serde_yaml = { workspace = true } +tempfile = { workspace = true } +testing-framework-config = { workspace = true } +testing-framework-env = { workspace = true } +thiserror = { workspace = true } +tokio = { features = ["macros", "process", "rt-multi-thread", "time"], workspace = true } +tracing = { workspace = true } diff --git a/testing-framework/core/src/nodes/api_client.rs b/testing-framework/core/src/nodes/api_client.rs index 1fdedab..e5e6671 100644 --- a/testing-framework/core/src/nodes/api_client.rs +++ b/testing-framework/core/src/nodes/api_client.rs @@ -1,14 +1,14 @@ use std::net::SocketAddr; -use chain_service::CryptarchiaInfo; -use common_http_client::CommonHttpClient; use hex; -use nomos_core::{block::Block, mantle::SignedMantleTx}; -use nomos_http_api_common::paths::{ +use lb_chain_service::CryptarchiaInfo; +use lb_common_http_client::CommonHttpClient; +use lb_core::{block::Block, mantle::SignedMantleTx}; +use lb_http_api_common::paths::{ CRYPTARCHIA_HEADERS, CRYPTARCHIA_INFO, MEMPOOL_ADD_TX, NETWORK_INFO, STORAGE_BLOCK, }; -use nomos_network::backends::libp2p::Libp2pInfo; -use nomos_node::HeaderId; +use lb_network_service::backends::libp2p::Libp2pInfo; +use lb_node::HeaderId; use reqwest::{Client, RequestBuilder, Response, Url}; use serde::{Serialize, de::DeserializeOwned}; use serde_json::Value; diff --git a/testing-framework/core/src/nodes/common/config/injection.rs b/testing-framework/core/src/nodes/common/config/injection.rs index 7682010..18172a8 100644 --- a/testing-framework/core/src/nodes/common/config/injection.rs +++ b/testing-framework/core/src/nodes/common/config/injection.rs @@ -1,5 +1,5 @@ use hex; -use key_management_system_service::keys::{Ed25519Key, Key}; +use lb_key_management_system_service::keys::{Ed25519Key, Key}; use serde_yaml::{Mapping, Number as YamlNumber, Value}; use testing_framework_config::nodes::kms::key_id_for_preload_backend; diff --git a/testing-framework/core/src/nodes/common/lifecycle/spawn.rs b/testing-framework/core/src/nodes/common/lifecycle/spawn.rs index b8409c9..86d5121 100644 --- a/testing-framework/core/src/nodes/common/lifecycle/spawn.rs +++ b/testing-framework/core/src/nodes/common/lifecycle/spawn.rs @@ -4,7 +4,7 @@ use std::{ path::Path, }; -use nomos_tracing::logging::local::FileConfig; +use lb_tracing::logging::local::FileConfig; use serde::Serialize; use serde_yaml::Value; use testing_framework_env as tf_env; diff --git a/testing-framework/core/src/nodes/common/node.rs b/testing-framework/core/src/nodes/common/node.rs index b6f05cb..1bc05a8 100644 --- a/testing-framework/core/src/nodes/common/node.rs +++ b/testing-framework/core/src/nodes/common/node.rs @@ -6,7 +6,7 @@ use std::{ time::Duration, }; -use nomos_tracing_service::LoggerLayer; +use lb_tracing_service::LoggerLayer; use reqwest::Url; use serde::Serialize; use tempfile::TempDir; diff --git a/testing-framework/core/src/nodes/mod.rs b/testing-framework/core/src/nodes/mod.rs index bd5c3b0..7b2ad55 100644 --- a/testing-framework/core/src/nodes/mod.rs +++ b/testing-framework/core/src/nodes/mod.rs @@ -3,6 +3,7 @@ pub mod common; pub mod node; use std::{ + fs, io::{Error, ErrorKind}, path::PathBuf, sync::LazyLock, @@ -20,7 +21,7 @@ pub(crate) fn create_tempdir(custom_work_dir: Option) -> std::io::Resul let final_dir_name = dir .components() .last() - .ok_or(Error::new(ErrorKind::Other, "invalid final directory"))? + .ok_or(Error::new(ErrorKind::Other, "Invalid final directory"))? .as_os_str() .display() .to_string() @@ -28,7 +29,13 @@ pub(crate) fn create_tempdir(custom_work_dir: Option) -> std::io::Resul + "_"; let parent_dir = dir .parent() - .ok_or(Error::new(ErrorKind::Other, "invalid parent directory"))?; + .ok_or(Error::new(ErrorKind::Other, "Invalid parent directory"))?; + fs::create_dir_all(parent_dir).map_err(|e| { + Error::new( + ErrorKind::Other, + format!("Error creating parent dir: {}", e), + ) + })?; let mut temp_dir = TempDir::with_prefix_in(final_dir_name, parent_dir)?; if should_persist_tempdir() { temp_dir.disable_cleanup(true); diff --git a/testing-framework/core/src/nodes/node.rs b/testing-framework/core/src/nodes/node.rs index 50878f5..f97c706 100644 --- a/testing-framework/core/src/nodes/node.rs +++ b/testing-framework/core/src/nodes/node.rs @@ -1,7 +1,7 @@ use std::{ops::Deref, path::PathBuf, time::Duration}; -use nomos_node::config::RunConfig; -use nomos_tracing_service::LoggerLayer; +use lb_node::config::RunConfig; +use lb_tracing_service::LoggerLayer; pub use testing_framework_config::nodes::node::create_node_config; use tracing::{debug, info}; diff --git a/testing-framework/core/src/scenario/capabilities.rs b/testing-framework/core/src/scenario/capabilities.rs index 712c966..ca89fea 100644 --- a/testing-framework/core/src/scenario/capabilities.rs +++ b/testing-framework/core/src/scenario/capabilities.rs @@ -58,7 +58,7 @@ impl Default for StartNodeOptions { impl StartNodeOptions { pub fn create_patch(mut self, f: F) -> Self where - F: Fn(nomos_node::config::RunConfig) -> Result + F: Fn(lb_node::config::RunConfig) -> Result + Send + Sync + 'static, diff --git a/testing-framework/core/src/scenario/cfgsync.rs b/testing-framework/core/src/scenario/cfgsync.rs index 1dca652..53ab636 100644 --- a/testing-framework/core/src/scenario/cfgsync.rs +++ b/testing-framework/core/src/scenario/cfgsync.rs @@ -1,8 +1,8 @@ use std::{fs::File, num::NonZero, path::Path, time::Duration}; use anyhow::{Context as _, Result}; -use nomos_tracing_service::TracingSettings; -use nomos_utils::bounded_duration::{MinimalBoundedDuration, SECOND}; +use lb_tracing_service::TracingSettings; +use lb_utils::bounded_duration::{MinimalBoundedDuration, SECOND}; use serde::{Deserialize, Serialize}; use serde_with::serde_as; use tracing::debug; diff --git a/testing-framework/core/src/scenario/definition.rs b/testing-framework/core/src/scenario/definition.rs index ded9307..da0f144 100644 --- a/testing-framework/core/src/scenario/definition.rs +++ b/testing-framework/core/src/scenario/definition.rs @@ -1,6 +1,6 @@ -use std::{num::NonZeroUsize, sync::Arc, time::Duration}; +use std::{num::NonZeroUsize, path::PathBuf, sync::Arc, time::Duration}; -use nomos_node::config::RunConfig; +use lb_node::config::RunConfig; use thiserror::Error; use tracing::{debug, info}; @@ -107,6 +107,7 @@ pub struct TopologyConfigurator { builder: Builder, nodes: usize, network_star: bool, + scenario_base_dir: Option, } impl Builder { @@ -286,6 +287,7 @@ impl TopologyConfigurator { builder, nodes: 0, network_star: false, + scenario_base_dir: None, } } @@ -296,6 +298,13 @@ impl TopologyConfigurator { self } + /// Set a base scenario directory for nodes to persist data. If not set, + /// nodes will use + pub fn scenario_base_dir(mut self, path: PathBuf) -> Self { + self.scenario_base_dir = Some(path); + self + } + /// Use a star libp2p network layout. #[must_use] pub fn network_star(mut self) -> Self { @@ -327,7 +336,10 @@ impl TopologyConfigurator { #[must_use] pub fn apply(self) -> Builder { let mut builder = self.builder; - builder.topology = builder.topology.with_node_count(self.nodes); + builder.topology = builder + .topology + .with_node_count(self.nodes) + .with_scenario_base_dir(self.scenario_base_dir); if self.network_star { builder.topology = builder diff --git a/testing-framework/core/src/scenario/http_probe.rs b/testing-framework/core/src/scenario/http_probe.rs index 7dfc823..835d7c5 100644 --- a/testing-framework/core/src/scenario/http_probe.rs +++ b/testing-framework/core/src/scenario/http_probe.rs @@ -1,7 +1,7 @@ use std::time::Duration; use futures::future::try_join_all; -use nomos_http_api_common::paths; +use lb_http_api_common::paths; use reqwest::Client as ReqwestClient; use thiserror::Error; use tokio::time::{Instant, sleep}; diff --git a/testing-framework/core/src/scenario/runtime/block_feed.rs b/testing-framework/core/src/scenario/runtime/block_feed.rs index b2f7d49..e30ed3a 100644 --- a/testing-framework/core/src/scenario/runtime/block_feed.rs +++ b/testing-framework/core/src/scenario/runtime/block_feed.rs @@ -8,9 +8,9 @@ use std::{ }; use anyhow::{Context as _, Result}; -use nomos_core::{block::Block, mantle::SignedMantleTx}; -use nomos_http_api_common::paths::STORAGE_BLOCK; -use nomos_node::HeaderId; +use lb_core::{block::Block, mantle::SignedMantleTx}; +use lb_http_api_common::paths::STORAGE_BLOCK; +use lb_node::HeaderId; use tokio::{sync::broadcast, task::JoinHandle, time::sleep}; use tracing::{debug, error}; diff --git a/testing-framework/core/src/topology/config.rs b/testing-framework/core/src/topology/config.rs index 0360754..0d9a903 100644 --- a/testing-framework/core/src/topology/config.rs +++ b/testing-framework/core/src/topology/config.rs @@ -1,10 +1,10 @@ use std::{collections::HashMap, path::PathBuf, sync::Arc}; -use nomos_core::{ +use lb_core::{ mantle::GenesisTx as _, sdp::{Locator, ServiceType}, }; -use nomos_node::config::RunConfig; +use lb_node::config::RunConfig; use testing_framework_config::topology::{ configs::{ api::{ApiConfigError, create_api_configs}, @@ -126,11 +126,6 @@ impl TopologyConfig { self } - #[must_use] - pub fn persist_dir(&self, index: usize) -> Option<&PathBuf> { - self.persist_dirs.get(&index) - } - #[must_use] pub fn with_persist_dir(mut self, index: usize, dir: PathBuf) -> Self { self.persist_dirs.insert(index, dir); @@ -144,6 +139,7 @@ pub struct TopologyBuilder { config: TopologyConfig, ids: Option>, blend_ports: Option>, + scenario_base_dir: Option, } impl TopologyBuilder { @@ -154,6 +150,7 @@ impl TopologyBuilder { config, ids: None, blend_ports: None, + scenario_base_dir: None, } } @@ -192,6 +189,11 @@ impl TopologyBuilder { self } + pub fn with_scenario_base_dir(mut self, scenario_base_dir: Option) -> Self { + self.scenario_base_dir = scenario_base_dir; + self + } + #[must_use] /// Configure the libp2p network layout. pub const fn with_network_layout(mut self, layout: Libp2pNetworkLayout) -> Self { @@ -208,12 +210,19 @@ impl TopologyBuilder { /// Finalize and generate topology and node descriptors. pub fn build(self) -> Result { let Self { - config, + mut config, ids, blend_ports, + scenario_base_dir, } = self; let n_participants = participant_count(&config)?; + if let Some(base_dir) = scenario_base_dir { + for i in 0..n_participants { + let dir = base_dir.join(format!("node_{i}")); + config = config.with_persist_dir(i, dir); + } + } let (ids, blend_ports) = resolve_and_validate_vectors(ids, blend_ports, n_participants)?; @@ -262,7 +271,6 @@ impl TopologyBuilder { &kms_configs, &time_config, &config.node_config_patches, - &config.persist_dirs, )?; Ok(GeneratedTopology { config, nodes }) @@ -322,14 +330,14 @@ fn collect_provider_infos( fn create_consensus_genesis_tx( first_consensus: &testing_framework_config::topology::configs::consensus::GeneralConsensusConfig, providers: Vec, -) -> Result { +) -> Result { let ledger_tx = first_consensus.genesis_tx.mantle_tx().ledger_tx.clone(); Ok(create_genesis_tx_with_declarations(ledger_tx, providers)?) } fn apply_consensus_genesis_tx( consensus_configs: &mut [testing_framework_config::topology::configs::consensus::GeneralConsensusConfig], - genesis_tx: &nomos_core::mantle::genesis_tx::GenesisTx, + genesis_tx: &lb_core::mantle::genesis_tx::GenesisTx, ) -> Result<(), TopologyBuildError> { for c in consensus_configs { c.genesis_tx = genesis_tx.clone(); @@ -350,10 +358,9 @@ fn build_node_descriptors( blend_configs: &[testing_framework_config::topology::configs::blend::GeneralBlendConfig], api_configs: &[testing_framework_config::topology::configs::api::GeneralApiConfig], tracing_configs: &[testing_framework_config::topology::configs::tracing::GeneralTracingConfig], - kms_configs: &[key_management_system_service::backend::preload::PreloadKMSBackendSettings], + kms_configs: &[lb_key_management_system_service::backend::preload::PreloadKMSBackendSettings], time_config: &testing_framework_config::topology::configs::time::GeneralTimeConfig, node_config_patches: &HashMap, - persist_dirs: &HashMap, ) -> Result, TopologyBuildError> { let mut nodes = Vec::with_capacity(config.n_nodes); @@ -388,7 +395,7 @@ fn build_node_descriptors( general, blend_port, config_patch: node_config_patches.get(&i).cloned(), - persist_dir: persist_dirs.get(&i).cloned(), + persist_dir: config.persist_dirs.get(&i).cloned(), }; nodes.push(descriptor); diff --git a/testing-framework/core/src/topology/readiness/network.rs b/testing-framework/core/src/topology/readiness/network.rs index eaf0af1..24751d8 100644 --- a/testing-framework/core/src/topology/readiness/network.rs +++ b/testing-framework/core/src/topology/readiness/network.rs @@ -1,5 +1,5 @@ -use nomos_libp2p::PeerId; -use nomos_network::backends::libp2p::Libp2pInfo; +use lb_libp2p::PeerId; +use lb_network_service::backends::libp2p::Libp2pInfo; use reqwest::{Client, Url}; use thiserror::Error; use tracing::warn; @@ -135,12 +135,12 @@ pub async fn try_fetch_network_info( client: &Client, base: &Url, ) -> Result { - let path = nomos_http_api_common::paths::NETWORK_INFO.trim_start_matches('/'); + let path = lb_http_api_common::paths::NETWORK_INFO.trim_start_matches('/'); let url = base .join(path) .map_err(|source| NetworkInfoError::JoinUrl { base: base.clone(), - path: nomos_http_api_common::paths::NETWORK_INFO, + path: lb_http_api_common::paths::NETWORK_INFO, message: source.to_string(), })?; diff --git a/testing-framework/core/src/topology/utils.rs b/testing-framework/core/src/topology/utils.rs index a9e6038..b2d65da 100644 --- a/testing-framework/core/src/topology/utils.rs +++ b/testing-framework/core/src/topology/utils.rs @@ -1,8 +1,8 @@ use std::{collections::HashMap, iter}; -use groth16::fr_to_bytes; -use key_management_system_service::{backend::preload::PreloadKMSBackendSettings, keys::Key}; -use nomos_utils::net::get_available_udp_port; +use lb_groth16::fr_to_bytes; +use lb_key_management_system_service::{backend::preload::PreloadKMSBackendSettings, keys::Key}; +use lb_utils::net::get_available_udp_port; use rand::{Rng, thread_rng}; use thiserror::Error; @@ -120,10 +120,10 @@ pub fn resolve_ports( Ok(resolved) } -pub fn multiaddr_port(addr: &nomos_libp2p::Multiaddr) -> Option { +pub fn multiaddr_port(addr: &lb_libp2p::Multiaddr) -> Option { for protocol in addr { match protocol { - nomos_libp2p::Protocol::Udp(port) | nomos_libp2p::Protocol::Tcp(port) => { + lb_libp2p::Protocol::Udp(port) | lb_libp2p::Protocol::Tcp(port) => { return Some(port); } _ => {} diff --git a/testing-framework/deployers/compose/Cargo.toml b/testing-framework/deployers/compose/Cargo.toml index f9e787f..9af9ea3 100644 --- a/testing-framework/deployers/compose/Cargo.toml +++ b/testing-framework/deployers/compose/Cargo.toml @@ -16,8 +16,8 @@ workspace = true anyhow = "1" async-trait = { workspace = true } cfgsync_tf = { workspace = true } -nomos-tracing = { workspace = true } -nomos-tracing-service = { workspace = true } +lb-tracing = { workspace = true } +lb-tracing-service = { workspace = true } reqwest = { features = ["json"], workspace = true } serde = { features = ["derive"], workspace = true } tempfile = { workspace = true } @@ -32,8 +32,8 @@ url = { version = "2" } uuid = { features = ["v4"], version = "1" } [dev-dependencies] -groth16 = { workspace = true } -key-management-system-service = { workspace = true } -nomos-core = { workspace = true } -nomos-ledger = { workspace = true } -zksign = { workspace = true } +lb-core = { workspace = true } +lb-groth16 = { workspace = true } +lb-key-management-system-service = { workspace = true } +lb-ledger = { workspace = true } +lb-zksign = { workspace = true } diff --git a/testing-framework/deployers/compose/src/deployer/mod.rs b/testing-framework/deployers/compose/src/deployer/mod.rs index df822f8..833ce28 100644 --- a/testing-framework/deployers/compose/src/deployer/mod.rs +++ b/testing-framework/deployers/compose/src/deployer/mod.rs @@ -91,14 +91,14 @@ mod tests { config::builder::create_node_configs, host::{Host, PortOverrides}, }; - use groth16::Fr; - use key_management_system_service::keys::ZkPublicKey; - use nomos_core::{ + use lb_core::{ mantle::{GenesisTx as GenesisTxTrait, ledger::NoteId}, sdp::{ProviderId, ServiceType}, }; - use nomos_ledger::LedgerState; - use nomos_tracing_service::TracingSettings; + use lb_groth16::Fr; + use lb_key_management_system_service::keys::ZkPublicKey; + use lb_ledger::LedgerState; + use lb_tracing_service::TracingSettings; use testing_framework_core::{ scenario::ScenarioBuilder, topology::{ diff --git a/testing-framework/deployers/compose/src/descriptor/mod.rs b/testing-framework/deployers/compose/src/descriptor/mod.rs index 47077dd..8d93e41 100644 --- a/testing-framework/deployers/compose/src/descriptor/mod.rs +++ b/testing-framework/deployers/compose/src/descriptor/mod.rs @@ -121,7 +121,7 @@ fn default_extra_hosts() -> Vec { fn base_environment(cfgsync_port: u16) -> Vec { let rust_log = tf_env::rust_log().unwrap_or_else(|| "info".to_string()); let nomos_log_level = tf_env::nomos_log_level().unwrap_or_else(|| "info".to_string()); - let time_backend = tf_env::nomos_time_backend().unwrap_or_else(|| "monotonic".into()); + let time_backend = tf_env::lb_time_service_backend().unwrap_or_else(|| "monotonic".into()); vec![ EnvEntry::new("RUST_LOG", rust_log), EnvEntry::new("LOGOS_BLOCKCHAIN_LOG_LEVEL", nomos_log_level), diff --git a/testing-framework/deployers/compose/src/infrastructure/cfgsync.rs b/testing-framework/deployers/compose/src/infrastructure/cfgsync.rs index a4b05ea..ebd7f17 100644 --- a/testing-framework/deployers/compose/src/infrastructure/cfgsync.rs +++ b/testing-framework/deployers/compose/src/infrastructure/cfgsync.rs @@ -1,7 +1,7 @@ use std::{path::Path, process::Command as StdCommand}; -use nomos_tracing::metrics::otlp::OtlpMetricsConfig; -use nomos_tracing_service::MetricsLayer; +use lb_tracing::metrics::otlp::OtlpMetricsConfig; +use lb_tracing_service::MetricsLayer; use reqwest::Url; use testing_framework_core::{ scenario::cfgsync::{apply_topology_overrides, load_cfgsync_template, write_cfgsync_template}, diff --git a/testing-framework/deployers/k8s/Cargo.toml b/testing-framework/deployers/k8s/Cargo.toml index 2d5f978..89b9056 100644 --- a/testing-framework/deployers/k8s/Cargo.toml +++ b/testing-framework/deployers/k8s/Cargo.toml @@ -17,8 +17,8 @@ anyhow = "1" async-trait = { workspace = true } k8s-openapi = { features = ["latest"], version = "0.20" } kube = { default-features = false, features = ["client", "runtime", "rustls-tls"], version = "0.87" } -nomos-tracing = { workspace = true } -nomos-tracing-service = { workspace = true } +lb-tracing = { workspace = true } +lb-tracing-service = { workspace = true } reqwest = { features = ["json"], workspace = true } serde = { features = ["derive"], version = "1" } serde_yaml = { workspace = true } diff --git a/testing-framework/deployers/k8s/src/infrastructure/assets.rs b/testing-framework/deployers/k8s/src/infrastructure/assets.rs index d6980f2..624d5f5 100644 --- a/testing-framework/deployers/k8s/src/infrastructure/assets.rs +++ b/testing-framework/deployers/k8s/src/infrastructure/assets.rs @@ -5,8 +5,8 @@ use std::{ }; use anyhow::{Context as _, Result as AnyResult}; -use nomos_tracing::metrics::otlp::OtlpMetricsConfig; -use nomos_tracing_service::MetricsLayer; +use lb_tracing::metrics::otlp::OtlpMetricsConfig; +use lb_tracing_service::MetricsLayer; use reqwest::Url; use serde::Serialize; use tempfile::TempDir; diff --git a/testing-framework/deployers/local/Cargo.toml b/testing-framework/deployers/local/Cargo.toml index 32b895a..1ea16bd 100644 --- a/testing-framework/deployers/local/Cargo.toml +++ b/testing-framework/deployers/local/Cargo.toml @@ -14,10 +14,10 @@ workspace = true [dependencies] async-trait = "0.1" -nomos-libp2p = { workspace = true } -nomos-network = { workspace = true } -nomos-node = { workspace = true } -nomos-utils = { workspace = true } +lb-libp2p = { workspace = true } +lb-network-service = { workspace = true } +lb-node = { workspace = true } +lb-utils = { workspace = true } rand = { workspace = true } testing-framework-config = { workspace = true } testing-framework-core = { path = "../../core" } diff --git a/testing-framework/deployers/local/src/manual/readiness.rs b/testing-framework/deployers/local/src/manual/readiness.rs index 327a2af..2e9ac08 100644 --- a/testing-framework/deployers/local/src/manual/readiness.rs +++ b/testing-framework/deployers/local/src/manual/readiness.rs @@ -1,6 +1,6 @@ use std::time::Duration; -use nomos_network::backends::libp2p::Libp2pInfo; +use lb_network_service::backends::libp2p::Libp2pInfo; use testing_framework_core::topology::readiness::ReadinessCheck; use tokio::time::timeout; diff --git a/testing-framework/deployers/local/src/node_control/config.rs b/testing-framework/deployers/local/src/node_control/config.rs index 8fe9aec..bcab4b9 100644 --- a/testing-framework/deployers/local/src/node_control/config.rs +++ b/testing-framework/deployers/local/src/node_control/config.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; -use nomos_libp2p::Multiaddr; -use nomos_utils::net::get_available_udp_port; +use lb_libp2p::Multiaddr; +use lb_utils::net::get_available_udp_port; use rand::Rng as _; use testing_framework_config::topology::configs::{ consensus, diff --git a/testing-framework/deployers/local/src/node_control/mod.rs b/testing-framework/deployers/local/src/node_control/mod.rs index da7ae79..d39965a 100644 --- a/testing-framework/deployers/local/src/node_control/mod.rs +++ b/testing-framework/deployers/local/src/node_control/mod.rs @@ -3,7 +3,7 @@ use std::{ sync::Mutex, }; -use nomos_node::config::RunConfig; +use lb_node::config::RunConfig; use testing_framework_config::topology::configs::{consensus, time}; use testing_framework_core::{ nodes::{ diff --git a/testing-framework/env/src/lib.rs b/testing-framework/env/src/lib.rs index b5a2437..1c5ccdb 100644 --- a/testing-framework/env/src/lib.rs +++ b/testing-framework/env/src/lib.rs @@ -58,7 +58,7 @@ pub fn rust_log() -> Option { } #[must_use] -pub fn nomos_time_backend() -> Option { +pub fn lb_time_service_backend() -> Option { env::var("LOGOS_BLOCKCHAIN_TIME_BACKEND").ok() } diff --git a/testing-framework/tools/cfgsync_tf/Cargo.toml b/testing-framework/tools/cfgsync_tf/Cargo.toml index 6951e60..d17c5b0 100644 --- a/testing-framework/tools/cfgsync_tf/Cargo.toml +++ b/testing-framework/tools/cfgsync_tf/Cargo.toml @@ -13,26 +13,26 @@ version = { workspace = true } workspace = true [dependencies] -anyhow = "1" -axum = { default-features = false, features = ["http1", "http2", "json", "tokio"], version = "0.7.5" } -clap = { default-features = false, version = "4" } -groth16 = { workspace = true } -hex = { workspace = true } -key-management-system-service = { workspace = true } -nomos-core = { workspace = true } -nomos-libp2p = { workspace = true } -nomos-node = { workspace = true } -nomos-tracing-service = { workspace = true } -nomos-utils = { workspace = true } -rand = { workspace = true } -reqwest = { workspace = true } -serde = { default-features = false, version = "1" } -serde_json = { default-features = false, version = "1.0" } -serde_path_to_error = "0.1" -serde_with = { workspace = true } -serde_yaml = "0.9" -testing-framework-config = { workspace = true } -testing-framework-core = { path = "../../core" } -thiserror = { workspace = true } -tokio = { default-features = false, features = ["macros", "net", "rt-multi-thread"], version = "1" } -tracing = { workspace = true } +anyhow = "1" +axum = { default-features = false, features = ["http1", "http2", "json", "tokio"], version = "0.7.5" } +clap = { default-features = false, version = "4" } +hex = { workspace = true } +lb-core = { workspace = true } +lb-groth16 = { workspace = true } +lb-key-management-system-service = { workspace = true } +lb-libp2p = { workspace = true } +lb-node = { workspace = true } +lb-tracing-service = { workspace = true } +lb-utils = { workspace = true } +rand = { workspace = true } +reqwest = { workspace = true } +serde = { default-features = false, version = "1" } +serde_json = { default-features = false, version = "1.0" } +serde_path_to_error = "0.1" +serde_with = { workspace = true } +serde_yaml = "0.9" +testing-framework-config = { workspace = true } +testing-framework-core = { path = "../../core" } +thiserror = { workspace = true } +tokio = { default-features = false, features = ["macros", "net", "rt-multi-thread"], version = "1" } +tracing = { workspace = true } diff --git a/testing-framework/tools/cfgsync_tf/src/bin/cfgsync-client.rs b/testing-framework/tools/cfgsync_tf/src/bin/cfgsync-client.rs index 8469338..cb95f6a 100644 --- a/testing-framework/tools/cfgsync_tf/src/bin/cfgsync-client.rs +++ b/testing-framework/tools/cfgsync_tf/src/bin/cfgsync-client.rs @@ -4,7 +4,7 @@ use cfgsync_tf::{ client::{FetchedConfig, get_config}, server::ClientIp, }; -use nomos_node::UserConfig; +use lb_node::UserConfig; use serde::{Serialize, de::DeserializeOwned}; use testing_framework_config::constants::cfgsync_port as default_cfgsync_port; use testing_framework_core::nodes::common::config::injection::{ diff --git a/testing-framework/tools/cfgsync_tf/src/config/builder.rs b/testing-framework/tools/cfgsync_tf/src/config/builder.rs index 74638f1..bbc1dae 100644 --- a/testing-framework/tools/cfgsync_tf/src/config/builder.rs +++ b/testing-framework/tools/cfgsync_tf/src/config/builder.rs @@ -1,8 +1,8 @@ use std::{collections::HashMap, net::Ipv4Addr, str::FromStr as _}; -use nomos_core::mantle::GenesisTx as _; -use nomos_libp2p::{Multiaddr, PeerId, ed25519}; -use nomos_tracing_service::TracingSettings; +use lb_core::mantle::GenesisTx as _; +use lb_libp2p::{Multiaddr, PeerId, ed25519}; +use lb_tracing_service::TracingSettings; use rand::{Rng as _, thread_rng}; use testing_framework_config::topology::configs::{ GeneralConfig, @@ -165,7 +165,7 @@ pub fn try_create_node_configs( message: source.to_string(), } })?; - network_config.backend.swarm.nat_config = nomos_libp2p::NatSettings::Static { + network_config.backend.swarm.nat_config = lb_libp2p::NatSettings::Static { external_address: nat_addr, }; diff --git a/testing-framework/tools/cfgsync_tf/src/config/kms.rs b/testing-framework/tools/cfgsync_tf/src/config/kms.rs index a7a76c9..f9699bb 100644 --- a/testing-framework/tools/cfgsync_tf/src/config/kms.rs +++ b/testing-framework/tools/cfgsync_tf/src/config/kms.rs @@ -1,5 +1,5 @@ -use groth16::fr_to_bytes; -use key_management_system_service::{backend::preload::PreloadKMSBackendSettings, keys::Key}; +use lb_groth16::fr_to_bytes; +use lb_key_management_system_service::{backend::preload::PreloadKMSBackendSettings, keys::Key}; use testing_framework_config::topology::configs::blend::GeneralBlendConfig; pub fn create_kms_configs(blend_configs: &[GeneralBlendConfig]) -> Vec { diff --git a/testing-framework/tools/cfgsync_tf/src/config/providers.rs b/testing-framework/tools/cfgsync_tf/src/config/providers.rs index e5ff712..c8fad65 100644 --- a/testing-framework/tools/cfgsync_tf/src/config/providers.rs +++ b/testing-framework/tools/cfgsync_tf/src/config/providers.rs @@ -1,7 +1,7 @@ use std::str::FromStr; -use nomos_core::sdp::{Locator, ServiceType}; -use nomos_libp2p::Multiaddr; +use lb_core::sdp::{Locator, ServiceType}; +use lb_libp2p::Multiaddr; use testing_framework_config::topology::configs::{ blend::GeneralBlendConfig, consensus::{GeneralConsensusConfig, ProviderInfo}, diff --git a/testing-framework/tools/cfgsync_tf/src/config/tracing.rs b/testing-framework/tools/cfgsync_tf/src/config/tracing.rs index 7a174ab..04123c2 100644 --- a/testing-framework/tools/cfgsync_tf/src/config/tracing.rs +++ b/testing-framework/tools/cfgsync_tf/src/config/tracing.rs @@ -1,4 +1,4 @@ -use nomos_tracing_service::{LoggerLayer, MetricsLayer, TracingLayer, TracingSettings}; +use lb_tracing_service::{LoggerLayer, MetricsLayer, TracingLayer, TracingSettings}; use testing_framework_config::topology::configs::tracing::GeneralTracingConfig; pub fn update_tracing_identifier( diff --git a/testing-framework/tools/cfgsync_tf/src/network/address.rs b/testing-framework/tools/cfgsync_tf/src/network/address.rs index 175a004..462a163 100644 --- a/testing-framework/tools/cfgsync_tf/src/network/address.rs +++ b/testing-framework/tools/cfgsync_tf/src/network/address.rs @@ -1,4 +1,4 @@ -use nomos_libp2p::{Multiaddr, Protocol}; +use lb_libp2p::{Multiaddr, Protocol}; pub fn extract_udp_port(addr: &Multiaddr) -> Option { addr.iter().find_map(|protocol| { diff --git a/testing-framework/tools/cfgsync_tf/src/network/peers.rs b/testing-framework/tools/cfgsync_tf/src/network/peers.rs index 1e0ebfe..138a96f 100644 --- a/testing-framework/tools/cfgsync_tf/src/network/peers.rs +++ b/testing-framework/tools/cfgsync_tf/src/network/peers.rs @@ -1,4 +1,4 @@ -use nomos_libp2p::{Multiaddr, PeerId, Protocol}; +use lb_libp2p::{Multiaddr, PeerId, Protocol}; use thiserror::Error; use super::address::find_matching_host; diff --git a/testing-framework/tools/cfgsync_tf/src/repo.rs b/testing-framework/tools/cfgsync_tf/src/repo.rs index 657bae3..6ccf57e 100644 --- a/testing-framework/tools/cfgsync_tf/src/repo.rs +++ b/testing-framework/tools/cfgsync_tf/src/repo.rs @@ -1,6 +1,6 @@ use std::{collections::HashMap, sync::Arc, time::Duration}; -use nomos_tracing_service::TracingSettings; +use lb_tracing_service::TracingSettings; use testing_framework_config::topology::configs::{ GeneralConfig, consensus::ConsensusParams, wallet::WalletConfig, }; diff --git a/testing-framework/tools/cfgsync_tf/src/server.rs b/testing-framework/tools/cfgsync_tf/src/server.rs index 48acd5b..7a79126 100644 --- a/testing-framework/tools/cfgsync_tf/src/server.rs +++ b/testing-framework/tools/cfgsync_tf/src/server.rs @@ -5,8 +5,8 @@ const DEFAULT_DELAY_BEFORE_NEW_DOWNLOAD_SECS: u64 = 10; const DEFAULT_MAX_ORPHAN_CACHE_SIZE: usize = 5; use axum::{Json, Router, extract::State, http::StatusCode, response::IntoResponse, routing::post}; -use nomos_tracing_service::TracingSettings; -use nomos_utils::bounded_duration::{MinimalBoundedDuration, SECOND}; +use lb_tracing_service::TracingSettings; +use lb_utils::bounded_duration::{MinimalBoundedDuration, SECOND}; use serde::{Deserialize, Serialize}; use serde_json::{Value, json, to_value}; use serde_with::serde_as; diff --git a/testing-framework/workflows/Cargo.toml b/testing-framework/workflows/Cargo.toml index 58b6337..9b575dd 100644 --- a/testing-framework/workflows/Cargo.toml +++ b/testing-framework/workflows/Cargo.toml @@ -13,17 +13,16 @@ version = "0.1.0" workspace = true [dependencies] -async-trait = "0.1" -chain-service = { workspace = true } -key-management-system-service = { workspace = true } -nomos-core = { workspace = true } -rand = { workspace = true } -reqwest = { workspace = true } -testing-framework-config = { workspace = true } -testing-framework-core = { workspace = true } -thiserror = { workspace = true } -tokio = { features = ["macros", "net", "rt-multi-thread", "time"], workspace = true } -tracing = { workspace = true } +async-trait = "0.1" +lb-core = { workspace = true } +lb-key-management-system-service = { workspace = true } +rand = { workspace = true } +reqwest = { workspace = true } +testing-framework-config = { workspace = true } +testing-framework-core = { workspace = true } +thiserror = { workspace = true } +tokio = { features = ["macros", "net", "rt-multi-thread", "time"], workspace = true } +tracing = { workspace = true } [package.metadata.cargo-machete] ignored = ["chain-service"] diff --git a/testing-framework/workflows/src/expectations/consensus_liveness.rs b/testing-framework/workflows/src/expectations/consensus_liveness.rs index 434ef4f..1cdabfc 100644 --- a/testing-framework/workflows/src/expectations/consensus_liveness.rs +++ b/testing-framework/workflows/src/expectations/consensus_liveness.rs @@ -1,7 +1,7 @@ use std::time::Duration; use async_trait::async_trait; -use nomos_core::header::HeaderId; +use lb_core::header::HeaderId; use testing_framework_core::{ nodes::ApiClient, scenario::{DynError, Expectation, RunContext}, diff --git a/testing-framework/workflows/src/util/tx.rs b/testing-framework/workflows/src/util/tx.rs index 4f60210..181e9a1 100644 --- a/testing-framework/workflows/src/util/tx.rs +++ b/testing-framework/workflows/src/util/tx.rs @@ -1,9 +1,9 @@ -use key_management_system_service::keys::{Ed25519Key, ZkKey}; -use nomos_core::mantle::{ +use lb_core::mantle::{ MantleTx, Op, OpProof, SignedMantleTx, Transaction as _, ledger::Tx as LedgerTx, ops::channel::{ChannelId, MsgId, inscribe::InscriptionOp}, }; +use lb_key_management_system_service::keys::{Ed25519Key, ZkKey}; use testing_framework_core::scenario::DynError; /// Builds a signed inscription transaction with deterministic payload for diff --git a/testing-framework/workflows/src/workloads/transaction/expectation.rs b/testing-framework/workflows/src/workloads/transaction/expectation.rs index eb258da..4aa62af 100644 --- a/testing-framework/workflows/src/workloads/transaction/expectation.rs +++ b/testing-framework/workflows/src/workloads/transaction/expectation.rs @@ -9,8 +9,8 @@ use std::{ }; use async_trait::async_trait; -use key_management_system_service::keys::ZkPublicKey; -use nomos_core::{header::HeaderId, mantle::AuthenticatedMantleTx as _}; +use lb_core::{header::HeaderId, mantle::AuthenticatedMantleTx as _}; +use lb_key_management_system_service::keys::ZkPublicKey; use testing_framework_core::scenario::{DynError, Expectation, RunContext}; use thiserror::Error; use tokio::{sync::broadcast, time::sleep}; diff --git a/testing-framework/workflows/src/workloads/transaction/workload.rs b/testing-framework/workflows/src/workloads/transaction/workload.rs index da6e077..389e771 100644 --- a/testing-framework/workflows/src/workloads/transaction/workload.rs +++ b/testing-framework/workflows/src/workloads/transaction/workload.rs @@ -6,10 +6,10 @@ use std::{ }; use async_trait::async_trait; -use key_management_system_service::keys::{ZkKey, ZkPublicKey}; -use nomos_core::mantle::{ +use lb_core::mantle::{ GenesisTx as _, Note, SignedMantleTx, Transaction as _, Utxo, tx_builder::MantleTxBuilder, }; +use lb_key_management_system_service::keys::{ZkKey, ZkPublicKey}; use testing_framework_config::topology::configs::wallet::WalletAccount; use testing_framework_core::{ scenario::{DynError, Expectation, RunContext, RunMetrics, Workload as ScenarioWorkload}, diff --git a/testing-framework/workflows/src/workloads/util.rs b/testing-framework/workflows/src/workloads/util.rs index b000f3d..95cc53f 100644 --- a/testing-framework/workflows/src/workloads/util.rs +++ b/testing-framework/workflows/src/workloads/util.rs @@ -1,6 +1,6 @@ use std::{sync::Arc, time::Duration}; -use nomos_core::{ +use lb_core::{ block::Block, mantle::{ AuthenticatedMantleTx as _, SignedMantleTx, Transaction as MantleTx, diff --git a/versions.env b/versions.env index 0bebacd..a316c07 100644 --- a/versions.env +++ b/versions.env @@ -1,7 +1,7 @@ VERSION=v0.3.2 LOGOS_BLOCKCHAIN_BUNDLE_VERSION=v4 # Pinned logos-blockchain-node revision used for CI builds and binary bundles. -LOGOS_BLOCKCHAIN_NODE_REV=2392190d88e8ae8271fa9321014ea33324be7c28 +LOGOS_BLOCKCHAIN_NODE_REV=a075fdf3209947572069e7b7b2ff6250576c8831 # Optional: local logos-blockchain-node checkout override (do not commit absolute paths). # LOGOS_BLOCKCHAIN_NODE_PATH=