Skip to content

fix(p2p): allow longer Tor onion connection setup - #1191

Open
binarybaron wants to merge 1 commit into
masterfrom
fix/tor-onion-connection-timeout
Open

fix(p2p): allow longer Tor onion connection setup#1191
binarybaron wants to merge 1 commit into
masterfrom
fix/tor-onion-connection-timeout

Conversation

@binarybaron

Copy link
Copy Markdown

Problem

High-effort Tor onion-service proof-of-work can take longer than the uniform 15-second libp2p connection-setup timeout, making otherwise reachable makers impossible to connect to.

Solution

  • Apply a five-minute connection-setup timeout only to outbound multiaddresses containing /onion3.
  • Retain the existing 15-second timeout for non-onion outbound addresses and inbound connection upgrades.
  • Preserve Arti internal rendezvous, introduction, circuit, and stream timeouts; the five-minute timeout is the final upper bound for the complete onion attempt.
  • Add regression coverage for onion versus regular timeout selection.

libp2p continues racing known maker addresses concurrently, so a healthy clearnet address can win without waiting for onion PoW.

Closes #1190

Validation

  • cargo test -p swap --lib network::transport::tests::onion_dials_use_the_longer_connection_setup_timeout
  • cargo c --all-features
  • cargo c --tests
  • cargo c --all-targets
  • just docker_test happy_path

All passed. Existing unrelated compiler warnings remain.

AI usage

OpenAI Codex assisted with code investigation, implementation, and validation.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying eigenwallet-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1375348
Status: ✅  Deploy successful!
Preview URL: https://d0623a8c.eigenwallet-docs.pages.dev
Branch Preview URL: https://fix-tor-onion-connection-tim.eigenwallet-docs.pages.dev

View logs

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.

Allow up to five minutes for Tor onion-service PoW dials

1 participant