Compare commits

...

3 Commits

Author SHA1 Message Date
benedetta davico 405d0924e1 Update ci-build-upload-binaries.yml 2025-10-01 07:54:37 +02:00
Jack Wampler 84cc20b11e Bridge proto client params in Self-Described (#6035) 2025-09-30 10:18:14 -06:00
benedetta davico 1487c0efa0 TEMP remove nym-node from publishing 2025-09-15 14:26:46 +02:00
10 changed files with 48 additions and 6 deletions
@@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ arc-ubuntu-22.04 ]
platform: [ arc-linux-latest ]
runs-on: ${{ matrix.platform }}
env:
@@ -30,13 +30,11 @@ jobs:
release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].published_at }}
client_hash: ${{ steps.binary-hashes.outputs.client_hash }}
nymvisor_hash: ${{ steps.binary-hashes.outputs.nymvisor_hash }}
nymnode_hash: ${{ steps.binary-hashes.outputs.nymnode_hash }}
socks5_hash: ${{ steps.binary-hashes.outputs.socks5_hash }}
netreq_hash: ${{ steps.binary-hashes.outputs.netreq_hash }}
cli_hash: ${{ steps.binary-hashes.outputs.cli_hash }}
client_version: ${{ steps.binary-versions.outputs.client_version }}
nymvisor_version: ${{ steps.binary-versions.outputs.nymvisor_version }}
nymnode_version: ${{ steps.binary-versions.outputs.nymnode_version }}
socks5_version: ${{ steps.binary-versions.outputs.socks5_version }}
netreq_version: ${{ steps.binary-versions.outputs.netreq_version }}
cli_version: ${{ steps.binary-versions.outputs.cli_version }}
@@ -76,7 +74,6 @@ jobs:
target/release/nym-network-requester
target/release/nym-cli
target/release/nymvisor
target/release/nym-node
retention-days: 30
- id: create-release
@@ -91,7 +88,6 @@ jobs:
target/release/nym-network-requester
target/release/nym-cli
target/release/nymvisor
target/release/nym-node
push-release-data-client:
if: ${{ (startsWith(github.ref, 'refs/tags/nym-binaries-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
@@ -39,3 +39,9 @@ pub struct WebSockets {
pub wss_port: Option<u16>,
}
#[derive(Serialize, Deserialize, Debug, Clone, JsonSchema)]
#[cfg_attr(feature = "openapi", derive(utoipa::ToSchema))]
pub struct Bridges {
pub client_params_path: String,
}
+1
View File
@@ -41,6 +41,7 @@ pub mod routes {
pub const GATEWAY: &str = "/gateway";
pub const MIXNODE: &str = "/mixnode";
pub const METRICS: &str = "/metrics";
pub const BRIDGES: &str = "/bridges";
pub const NETWORK_REQUESTER: &str = "/network-requester";
pub const IP_PACKET_ROUTER: &str = "/ip-packet-router";
pub const AUTHENTICATOR: &str = "/authenticator";
@@ -1489,6 +1489,7 @@ pub async fn try_upgrade_config_v9<P: AsRef<Path>>(
clients_storage: old_cfg.gateway_tasks.storage_paths.clients_storage,
stats_storage: old_cfg.gateway_tasks.storage_paths.stats_storage,
cosmos_mnemonic: old_cfg.gateway_tasks.storage_paths.cosmos_mnemonic,
bridge_client_params: None,
},
enforce_zk_nyms: old_cfg.gateway_tasks.enforce_zk_nyms,
ws_bind_address: old_cfg.gateway_tasks.ws_bind_address,
+4
View File
@@ -146,6 +146,9 @@ pub struct GatewayTasksPaths {
/// Path to file containing cosmos account mnemonic used for zk-nym redemption.
pub cosmos_mnemonic: PathBuf,
/// Path to file containing bridge client params to be served in the node self-described.
pub bridge_client_params: Option<PathBuf>,
}
impl GatewayTasksPaths {
@@ -154,6 +157,7 @@ impl GatewayTasksPaths {
clients_storage: data_dir.as_ref().join(DEFAULT_CLIENTS_STORAGE_FILENAME),
stats_storage: data_dir.as_ref().join(DEFAULT_STATS_STORAGE_FILENAME),
cosmos_mnemonic: data_dir.as_ref().join(DEFAULT_MNEMONIC_FILENAME),
bridge_client_params: None,
}
}
@@ -0,0 +1,19 @@
// Copyright 2023 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: GPL-3.0-only
use axum::Router;
use nym_node_requests::api::v1::gateway::models;
use tower_http::services::ServeFile;
#[derive(Debug, Clone, Default)]
pub struct Config {
pub details: Option<models::Bridges>,
}
pub(crate) fn routes<S: Send + Sync + 'static + Clone>(config: Config) -> Router<S> {
if let Some(cfg) = config.details {
Router::new().route_service("/client-params", ServeFile::new(cfg.client_params_path))
} else {
Router::new()
}
}
@@ -7,6 +7,7 @@ use axum::Router;
use nym_node_requests::routes::api::v1;
pub mod authenticator;
pub mod bridges;
pub mod gateway;
pub mod health;
pub mod ip_packet_router;
@@ -23,6 +24,7 @@ pub struct Config {
pub metrics: metrics::Config,
pub gateway: gateway::Config,
pub mixnode: mixnode::Config,
pub bridges: bridges::Config,
pub network_requester: network_requester::Config,
pub ip_packet_router: ip_packet_router::Config,
pub authenticator: authenticator::Config,
@@ -33,6 +35,7 @@ pub(super) fn routes(config: Config) -> Router<AppState> {
.route(v1::HEALTH, get(health::root_health))
.route(v1::LOAD, get(load::root_load))
.nest(v1::METRICS, metrics::routes(config.metrics))
.nest(v1::BRIDGES, bridges::routes(config.bridges))
.nest(v1::GATEWAY, gateway::routes(config.gateway))
.nest(v1::MIXNODE, mixnode::routes(config.mixnode))
.nest(
+9 -1
View File
@@ -10,7 +10,7 @@ use axum::Router;
use nym_bin_common::bin_info_owned;
use nym_http_api_common::middleware::logging;
use nym_node_requests::api::v1::authenticator::models::Authenticator;
use nym_node_requests::api::v1::gateway::models::Gateway;
use nym_node_requests::api::v1::gateway::models::{Bridges, Gateway};
use nym_node_requests::api::v1::ip_packet_router::models::IpPacketRouter;
use nym_node_requests::api::v1::mixnode::models::Mixnode;
use nym_node_requests::api::v1::network_requester::exit_policy::models::UsedExitPolicy;
@@ -48,6 +48,7 @@ impl HttpServerConfig {
metrics: Default::default(),
gateway: Default::default(),
mixnode: Default::default(),
bridges: Default::default(),
network_requester: Default::default(),
ip_packet_router: Default::default(),
authenticator: Default::default(),
@@ -121,6 +122,13 @@ impl HttpServerConfig {
self.api.v1_config.metrics.bearer_token = bearer_token.map(|b| Arc::new(Zeroizing::new(b)));
self
}
pub fn with_bridge_client_params_file(mut self, path: &Path) -> Self {
self.api.v1_config.bridges.details = Some(Bridges {
client_params_path: path.to_string_lossy().to_string(),
});
self
}
}
pub struct NymNodeRouter {
+4
View File
@@ -802,6 +802,10 @@ impl NymNode {
config.api.v1_config.node.roles.ip_packet_router_enabled = true;
}
if let Some(path) = &self.config.gateway_tasks.storage_paths.bridge_client_params {
config = config.with_bridge_client_params_file(path);
}
let x25519_versioned_noise_key = if self.config.mixnet.debug.unsafe_disable_noise {
None
} else {