Skip to content

Conversation

@dynco-nym
Copy link
Contributor

@dynco-nym dynco-nym commented Dec 18, 2025

This change is Reviewable

@dynco-nym dynco-nym requested a review from jstuczyn December 18, 2025 13:22
@github-actions
Copy link

Thank you for making this first PR

@vercel
Copy link

vercel bot commented Dec 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
nym-explorer-v2 Ready Ready Preview, Comment Dec 19, 2025 2:43pm
2 Skipped Deployments
Project Deployment Review Updated (UTC)
docs-nextra Ignored Ignored Preview Dec 19, 2025 2:43pm
nym-node-status Ignored Ignored Preview Dec 19, 2025 2:43pm

- force route construction
- use same entry = exit
[package]
name = "nym-node-status-agent"
version = "1.0.7"
version = "1.0.8-gw-socks5"
Copy link
Contributor

Choose a reason for hiding this comment

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

does it make sense to annotate the version with gw-socks5 suffix? it will either have it or not. i.e. there wouldn't be 1.0.8 that does not have it

let available_gateways = self.available_gateways().await?;
info!("Listing all available gateways in topology:");
for node in available_gateways.iter() {
info!("{}", node.identity_key.to_base58_string());
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this should be at info level. on mainnet we have +300 gateways so on client startup you will see over 300 logs every single time. for debug/trace I think that's useful information though. maybe also include node_id there for debugging purposes?

#[arg(long)]
config_dir: Option<PathBuf>,
},
Socks5 {
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't socks5 test be part of the "normal" testing suite? maybe just introduce a flag in "normal" args to toggle it


/// endpoint to test against
/// https://www.quicknode.com/docs/ethereum/web3_clientVersion
const TARGET_URL: &str = "https://docs-demo.quiknode.pro";
Copy link
Contributor

Choose a reason for hiding this comment

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

why are we testing against this quite random website? why not something we control or something that's more used for this purpose

match tokio::time::timeout(
self.mixnet_client_timeout,
client
.post(TARGET_URL)
Copy link
Contributor

Choose a reason for hiding this comment

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

wouldn't a simple get be easier? then we could, say, test against our own website

) -> anyhow::Result<ProbeResult> {
let exit_gateway = match gateway_key {
Some(gateway_key) => NodeIdentity::from_base58_string(gateway_key)?,
None => directory.random_exit_with_nr()?,
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the point of testing a random gateway for socks5?


// test failure doesn't stop further tests
let socks5_outcome = {
if let Some(ref nr_details) = node_info.network_requester_details {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: you have exactly the same match logic in multiple places

if let Some(ref nr_details) = node_info.network_requester_details {
match do_socks5_connectivity_test(
&nr_details.address,
NymNetworkDetails::new_from_env(),
Copy link
Contributor

Choose a reason for hiding this comment

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

what if env is not set?

};

info!("Waiting for network topology to be ready...");
tokio::time::sleep(Duration::from_secs(10)).await;
Copy link
Contributor

Choose a reason for hiding this comment

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

couldn't we wait for some condition rather than always wait 10s? what if topology takes longer than that? (or way less than that)?

/// Creates a SOCKS5 proxy connection through the mixnet to the exit GW
/// and performs necessary tests.
#[instrument(level = "info", name = "socks5_test", skip_all)]
async fn do_socks5_connectivity_test(
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should still investigate just creating a single client and sending NR packets to exit gateways rather than starting local socks5 listeners.

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.

3 participants