#36570 i2p: pass base32 address directly to stream connect

ReviewabilityReviewsAgreementSize
#36570 jpk68 i2p: pass base32 address directly to stream connectReady0Crickets1
  • Avoid a redundant SAM bridge lookup round trip when making outbound I2P connections
  • Correctly record peer reachability failures when an I2P address fails to resolve
  • Ready for review
  • No review verdicts recorded
  • No review comments or objections yet
  • Reviewers have been tagged for input (fanquake)
  • 1 lines added or modified outside tests
  • 0 lines added or modified in tests
  • 6 lines removed in total
  • 1 files, 1 commits
P2P#46 of 71
P3 · speedup
  • P3 because it reduces outbound connection latency by eliminating an extra SAM bridge round trip
  • Ensures unresolvable peers are treated as reachability failures rather than proxy errors
  • Ranking pass: Grouped with the Tor/I2P connection fixes; removes a round trip and corrects failure accounting.
Reviewability: ReadyStalePaused
Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets
Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs.
Size: lines added or modified outside tests, then in tests; greener = smaller.

Goal

Passes base32 I2P addresses directly to the SAM bridge `STREAM CONNECT` command rather than issuing a preliminary `NAMING LOOKUP` command. This eliminates a round trip to the local SAM bridge on every outbound I2P connection.

Problem: Outbound I2P connections perform a redundant `NAMING LOOKUP` step that adds latency. Furthermore, when unresolvable peers cause the lookup to return an empty `VALUE=` key, Bitcoin Core treats it as an internal proxy error rather than a peer reachability failure, preventing AddrMan from recording the failed attempt.

Evidence of importance:

  • PR description quotes the SAM v3 API specification stating that STREAM CONNECT accepts `.b32.i2p` as DESTINATION (https://i2p.net/en/docs/api/samv3/#sam-virtual-streams-connect)
  • PR description notes minimum router versions supporting this (Java I2P 0.9.48, i2pd 2.38.0) are older than encryption type requirements already merged in #35696

Risk of a mistake: medium (p2p). A flaw in the SAM command formatting or compatibility could break outbound I2P connections for node operators using I2P.

Reviewability

Ready

Nothing known that would invalidate a review now.

Waiting on (from the thread read):

  • reviewer: review from tagged contributors 2026-10-19

Agreement

Crickets

no substantive comment either way

Thread notes: Initial record. fanquake tagged potential reviewers for the PR. / Initial record. fanquake pinged relevant reviewers; no review comments or objections yet.

Objections, suggestions, and questions: none recorded.

Participants:

  • fanquake (member, neutral, 1 statements 2026-10-19 to 2026-10-19): tagged potential reviewers

Files

0 lines under test/bench/ci.

  • src/i2p.cpp +1/-6

Card

The short text the ranking pass compares across PRs.

Passes base32 I2P addresses directly to the SAM `STREAM CONNECT` command, removing a redundant preliminary `NAMING LOOKUP` round trip on outbound I2P connections. When peer lookups fail under the old approach, empty responses are treated as local proxy errors rather than unreachable peers, preventing AddrMan from recording the failed connection attempt. The SAM v3 specification supports base32 destinations directly across all supported I2P router implementations.

Data

dossier JSON · extract JSON · model ledger, generated 2026-10-21T01:17, confidence high, input hash 091ee5ce0decdcc8
thread read through 2026-10-19 (1 statements), head abbdec2149
labels: none

Categories

P2P

P3 · speedup (ranking pass: Grouped with the Tor/I2P connection fixes; removes a round trip and corrects failure accounting.)

Eliminating an extra SAM bridge round-trip removes connection latency and fixes unreachable peer error classification in AddrMan. According to the description, passing base32 addresses directly to STREAM CONNECT removes redundant NAMING LOOKUP requests and prevents unresolvable peers from being misclassified as internal proxy errors.

Membership: Touches src/i2p.cpp and modifies outbound I2P connection setup and AddrMan failure handling.

Factors: security/stability 1, bug 1, performance 1, user value 1, leverage 0