Skip to content

Conversation

@simonwicky
Copy link
Contributor

Description

PR on top of #4360.
This PR remove the need of accurate information in the self-described API (apart from the noise support)
IPs are retrieved from the bond, if it is a hostname, it will use the same resolving mechanism that currently exists. All resolved IPs are kept instead of just one.

Checklist:

  • added a changelog entry to CHANGELOG.md

@simonwicky simonwicky self-assigned this Mar 11, 2024
impl<'a> From<&'a Node> for SphinxNode {
fn from(node: &'a Node) -> Self {
let node_address_bytes = NymNodeRoutingAddress::from(node.mix_host)
let node_address_bytes = NymNodeRoutingAddress::from(node.mix_hosts[0])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.first()

impl<'a> From<&'a Node> for SphinxNode {
fn from(node: &'a Node) -> Self {
let node_address_bytes = NymNodeRoutingAddress::from(node.mix_host)
let node_address_bytes = NymNodeRoutingAddress::from(node.mix_hosts[0])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.first()

#[cfg_attr(feature = "wasm-serde-types", tsify(optional))]
#[serde(alias = "explicit_ip")]
pub explicit_ip: Option<IpAddr>,
pub explicit_ips: Option<Vec<IpAddr>>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might break --custom-mixnet flag. please double check.

Copy link
Contributor Author

@simonwicky simonwicky Mar 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the current state, --custom-mixnet is broken anyway because it doesn't exist on mix nodes and gateway. This doesn't mean that it will stay broken though

owner: value.owner.clone(),
host: value.host.to_string(),
mix_port: Some(value.mix_host.port()),
mix_port: Some(value.mix_hosts[0].port()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as @octol says, first() : )

@vercel
Copy link

vercel bot commented Mar 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
nym-explorer ⬜️ Ignored (Inspect) Visit Preview Mar 11, 2024 2:28pm

@simonwicky simonwicky merged commit 4d273ea into simon/noise_nodes Mar 12, 2024
@simonwicky simonwicky deleted the simon/noise_ip_from_bond branch March 12, 2024 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants