Page MenuHomePhabricator

net: add I2P to the reachability map, make outgoing and accept incoming connections from CConnman
ClosedPublic

Authored by PiRK on Feb 10 2022, 12:46.

Details

Summary

net: add I2P to the reachability map

Update CNetAddr::GetReachabilityFrom() to recognize the I2P network so
that we would prefer to advertise our I2P address to I2P peers.

https://github.com/bitcoin/bitcoin/pull/20685/commits/9559bd1404fbf74b0d09fe9019a9305cb4e151ce

net: make outgoing I2P connections from CConnman

https://github.com/bitcoin/bitcoin/pull/20685/commits/0635233a1e7e8c303073430092afd3e0fb0d927b

net: accept incoming I2P connections from CConnman

https://github.com/bitcoin/bitcoin/pull/20685/commits/b905363fa8b0bb03fe34b53b5410880f42e0af39i

net: use stronger AddLocal() for our I2P address

https://github.com/bitcoin/bitcoin/pull/21914/commits/105941b726c078642e785ecb7b6834ba814381b0

This is a backport of core#20685 [16,17,18/20] and core#21914

Depends on D11027

Test Plan

ninja all check-all

Run bitcoind using I2P (see detailed test plan in D11027).
ninja && src/bitcoind -regtest -i2psam=127.0.0.1:7656 -debug=i2p

Now you can see new interesting log messages:

2022-02-11T14:35:42Z i2paccept thread start
2022-02-11T14:35:42Z I2P: Creating SAM session with 127.0.0.1:7656
2022-02-11T14:35:45Z I2P: SAM session created: session id=xxxxxxxxxx, my address=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.b32.i2p:18444
2022-02-11T14:35:45Z AddLocal(xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.b32.i2p:18444,2)

Event Timeline

PiRK requested review of this revision.Feb 10 2022, 12:46
PiRK planned changes to this revision.Feb 11 2022, 08:04
PiRK requested review of this revision.Feb 11 2022, 14:40
PiRK edited the test plan for this revision. (Show Details)

edited test plan

Fabien requested changes to this revision.Feb 14 2022, 09:43
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/net.cpp
2701 ↗(On Diff #32327)

Please squash the bugfix from https://github.com/bitcoin/bitcoin/pull/21914

This revision now requires changes to proceed.Feb 14 2022, 09:43
PiRK edited the summary of this revision. (Show Details)
PiRK edited the test plan for this revision. (Show Details)

squash with core#21914, edit summary

This revision is now accepted and ready to land.Feb 15 2022, 07:19