feat: merge intermediate upgrade mode changes (#6174)

* squashing feat: merge intermediate upgrade mode changes #6174 to more easily resolve merge conflicts during rebasing

added additional v2 query for metadata endpoint for requesting upgrade mode recheck

added additional message to v6 authenticator to request explicit upgrade mode recheck

clippy

test fixes due to updated keys

updated assertion for upgrading v1 top up request to v2

compare attester public key against the expected value within the credential proxy

use pre-generated attestation public keys within nym-nodes

remove version deprecation

bugfix: default bandwidth response for authenticator

expose upgrade mode information in authenticator responses

adding tests for new v2 server

passing upgrade mode information in metadata endpoint

v2 wireguard private metadata

bugfix: make sure to immediately poll for attestation after spawning task

fix gateway probe and remove code duplication for finalizing registration

squashing before rebasing

post rebasing fixes

AuthenticatorVersion helpers

additional nits

allow unwraps in mocks

fixed linux build

clippy

integrating upgrade mode into authenticator

fixed build after adding wrappers to response types

conditionally updating peer handle bandwidth

cleanup

negotiate initial protocol during registration

change auth to use highest protocol

handler for JWT message

dont meter client bandwidth in upgrade mode

handling recheck requests

sending information about upgrade_mode on client messages

gateway watching for upgrade mode attestation

wip: gateways to disable bandwidth metering on upgrade mode

* fixed ServerResponse deserialisation

* fixed incorrect swagger path for upgrade mode check endpoint

* moved upgrade mode endpoint out of bandwidth routes

* chore: remove unused error variant

* removed re-export of UpgradeModeAttestation from credentials-interface

* chore: define single source of truth for minimum bandwidth threshold value

* moved type definitions out of traits.rs

* updated v6 versioning to point to niolo release instead

* fixed incorrect error mapping
This commit is contained in:
Jędrzej Stuczyński
2025-11-14 13:13:15 +00:00
committed by GitHub
parent 4dcc568ec2
commit 6b2bb3029b
160 changed files with 7878 additions and 2124 deletions
+3 -5
View File
@@ -159,7 +159,7 @@ impl Args {
name: "id".to_string(),
})?;
let config = ConfigBuilder::new(id, config_path.clone(), data_dir.clone())
ConfigBuilder::new(id, config_path.clone(), data_dir.clone())
// the old default behaviour of running in mixnode mode if nothing is explicitly set
.with_modes(
self.custom_modes()
@@ -172,11 +172,9 @@ impl Args {
.with_storage_paths(NymNodePaths::new(&data_dir))
.with_verloc(self.verloc.build_config_section())
.with_metrics(self.metrics.build_config_section())
.with_gateway_tasks(self.entry_gateway.build_config_section(&data_dir))
.with_gateway_tasks(self.entry_gateway.build_config_section(&data_dir)?)
.with_service_providers(self.exit_gateway.build_config_section(&data_dir))
.build();
Ok(config)
.build()
}
pub(crate) fn override_config(self, mut config: Config) -> Config {
+15 -3
View File
@@ -5,6 +5,7 @@ use super::DEFAULT_NYMNODE_ID;
use crate::config;
use crate::config::default_config_filepath;
use crate::env::vars::*;
use crate::error::NymNodeError;
use celes::Country;
use clap::Args;
use clap::builder::ArgPredicate;
@@ -426,6 +427,14 @@ pub(crate) struct EntryGatewayArgs {
env = NYMNODE_MNEMONIC_ARG
)]
pub(crate) mnemonic: Option<bip39::Mnemonic>,
/// Endpoint to query to retrieve current upgrade mode attestation.
#[clap(
long,
env = NYMNODE_UPGRADE_MODE_ATTESTATION_URL_ARG
)]
#[zeroize(skip)]
pub(crate) upgrade_mode_attestation_url: Option<Url>,
}
impl EntryGatewayArgs {
@@ -433,12 +442,12 @@ impl EntryGatewayArgs {
pub(crate) fn build_config_section<P: AsRef<Path>>(
self,
data_dir: P,
) -> config::GatewayTasksConfig {
self.override_config_section(config::GatewayTasksConfig::new_default(data_dir))
) -> Result<config::GatewayTasksConfig, NymNodeError> {
Ok(self.override_config_section(config::GatewayTasksConfig::new(data_dir)?))
}
pub(crate) fn override_config_section(
self,
mut self,
mut section: config::GatewayTasksConfig,
) -> config::GatewayTasksConfig {
if let Some(bind_address) = self.entry_bind_address {
@@ -453,6 +462,9 @@ impl EntryGatewayArgs {
if let Some(enforce_zk_nyms) = self.enforce_zk_nyms {
section.enforce_zk_nyms = enforce_zk_nyms
}
if let Some(upgrade_mode_attestation_url) = self.upgrade_mode_attestation_url.take() {
section.upgrade_mode.attestation_url = upgrade_mode_attestation_url
}
section
}