#36570 i2p: pass base32 address directly to stream connect
| Reviewability | Reviews | Agreement | Size | ||||
|---|---|---|---|---|---|---|---|
| #36570 i2p: pass base32 address directly to stream connect | Ready | 0 | Crickets | 1 | |||
|
|
|
|
| |||
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
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