feat: localnet v2 (#6277)

* squashing localnet-v2 commits (again)

cargo fmt

fixes to localnet purge

provide path in the error message

output args

log failed exec

print based on tty

check-prerequisites cmd

checked iptables update

basic kernel features check

enable ipv6 rules

add forwarding rules

squashing localnet-v2 commits

additional changes

propagate custom-dns flag to all run containers

remove is_mock from EcashManager

another localnet squash

unused import

chore: remove redundant testnet manager

missing impl

additional linux fixes

command to rebuild container image

wait for at least 2 blocks

additional node startup fixes

added --custom-dns flag to nym node setup

add gateway probe + wait for DKG magic file

fixed localnet down on linux

container ls

re-enable state resync

additional feature locking

macos adjustments

working nyxd startup on linux

wip linux box

wip

separating network inspect betweewn macos and linux

initial linux feature locking

moved all container commands into a single location

finally working initial node performance

squashing orchestrator commits

cleanup

fixed condition for naive rearrangement

added cache of cosmwasm contracts for speed up on subsequent runs

'down' command

refreshing described cache after nodes are bonded

nym nodes setup + wip on nym api refresh

nodes setup WIP

first pass cleanup

placeholder for nym-node setup

bypassing the dkg

further progress on nym-api setup

wip: api setup

up/down/purge placeholders

persisting contract setup data

fix contract upload by forcing amd64 container platform

wip: contracts setup4

wip: contracts setup3

wip: contracts setup2

wip: contracts setup

include network setup

init and spawn nyxd

build nyxd image in dedicated orchestrator

build nyxd image

squashed cherry-picked lp changes

Bits and bobs to make everything work

Title

MacOS setup instructions

Docker/Container localnet

* clippy

* fixes on non-unix targets

---------

Co-authored-by: durch <durch@users.noreply.github.com>
This commit is contained in:
Jędrzej Stuczyński
2026-03-12 14:46:00 +00:00
committed by GitHub
parent 8001fa7f40
commit e2dd8ac743
164 changed files with 9812 additions and 5434 deletions
+21 -2
View File
@@ -52,6 +52,7 @@ pub struct MixnetClientBuilder<S: MixnetClientStorage = Ephemeral> {
socks5_config: Option<Socks5>,
wait_for_gateway: bool,
wait_for_initial_topology: bool,
custom_topology_provider: Option<Box<dyn TopologyProvider + Send + Sync>>,
custom_gateway_transceiver: Option<Box<dyn GatewayTransceiver + Send + Sync>>,
custom_shutdown: Option<ShutdownTracker>,
@@ -94,6 +95,7 @@ impl MixnetClientBuilder<OnDiskPersistent> {
storage_paths: None,
socks5_config: None,
wait_for_gateway: false,
wait_for_initial_topology: false,
custom_topology_provider: None,
storage: storage_paths
.initialise_default_persistent_storage()
@@ -132,6 +134,7 @@ where
storage_paths: None,
socks5_config: None,
wait_for_gateway: false,
wait_for_initial_topology: false,
custom_topology_provider: None,
custom_gateway_transceiver: None,
custom_shutdown: None,
@@ -157,6 +160,7 @@ where
storage_paths: self.storage_paths,
socks5_config: self.socks5_config,
wait_for_gateway: self.wait_for_gateway,
wait_for_initial_topology: self.wait_for_initial_topology,
custom_topology_provider: self.custom_topology_provider,
custom_gateway_transceiver: self.custom_gateway_transceiver,
custom_shutdown: self.custom_shutdown,
@@ -293,13 +297,21 @@ where
self
}
/// Attempt to wait for the selected gateway (if applicable) to come online if its currently not bonded.
/// Attempt to wait for the selected gateway (if applicable) to come online if it's currently not bonded.
#[must_use]
pub fn with_wait_for_gateway(mut self, wait_for_gateway: bool) -> Self {
self.wait_for_gateway = wait_for_gateway;
self
}
/// Attempt to wait for initial network topology to become online before finalizing client setup
/// this is useful during network bootstrapping phases
#[must_use]
pub fn with_wait_for_initial_topology(mut self, wait_for_initial_topology: bool) -> Self {
self.wait_for_initial_topology = wait_for_initial_topology;
self
}
#[must_use]
pub fn with_user_agent(mut self, user_agent: UserAgent) -> Self {
self.user_agent = Some(user_agent);
@@ -352,6 +364,7 @@ where
client.custom_topology_provider = self.custom_topology_provider;
client.custom_shutdown = self.custom_shutdown;
client.wait_for_gateway = self.wait_for_gateway;
client.wait_for_initial_topology = self.wait_for_initial_topology;
client.force_tls = self.force_tls;
client.no_hostname = self.no_hostname;
client.user_agent = self.user_agent;
@@ -400,9 +413,13 @@ where
/// advanced usage of custom gateways
custom_gateway_transceiver: Option<Box<dyn GatewayTransceiver + Send + Sync>>,
/// Attempt to wait for the selected gateway (if applicable) to come online if its currently not bonded.
/// Attempt to wait for the selected gateway (if applicable) to come online if it's currently not bonded.
wait_for_gateway: bool,
/// Attempt to wait for initial network topology to become online before finalizing client setup
/// this is useful during network bootstrapping phases
wait_for_initial_topology: bool,
/// Force the client to connect using wss protocol with the gateway.
force_tls: bool,
@@ -476,6 +493,7 @@ where
custom_topology_provider: None,
custom_gateway_transceiver: None,
wait_for_gateway: false,
wait_for_initial_topology: false,
force_tls: false,
no_hostname: false,
custom_shutdown: None,
@@ -765,6 +783,7 @@ where
let mut base_builder: BaseClientBuilder<_, _> =
BaseClientBuilder::new(base_config, self.storage, self.dkg_query_client)
.with_wait_for_gateway(self.wait_for_gateway)
.with_wait_for_initial_topology(self.wait_for_initial_topology)
.with_forget_me(&self.forget_me)
.with_remember_me(&self.remember_me)
.with_derivation_material(self.derivation_material);