Open siltribera opened 2 years ago
Concept ACK
@sipa is this good?
Oh wow, I completely missed this, sorry!
I will review in the next few days.
@siltribera I'm sorry for the slow response here. I finally had a look at the code.
I'm not sure I like how much the new code diverges further from the Bitcoin Core codebase. I think it'd be better to just bring the network code up-to-date with the Bitcoin Core source code, which has all of these things (access to proxies, various networks, BIP155 serialization, ...) already implemented, rather than reimplement everything from scratch. That'll make it easier to port future changes to the seeder as well.
Seems to work, after a bit of simple merges with master.
Can always revert it later when updating the network code?
This is BIP155 addrv2 support for TOR, I2P and CJDNS.
Resolves #92.
Included in this pull request is the complete implementation of BIP155.
Serialization to disk always uses addrv2 format (in order to save TOR and I2P addresses in the database); Serialization on the network only uses the addrv2 format when serializing an addrv2 message; For all other cases, the old address format is used (particularly when serializing the version message and the old addr message).
Commits were kept small and descriptive to convey information from the original developer to the potential code reviewer.
Two optional commits were left out of this pull request for submission in a follow up. This is an enhancement to the proxy implementation which adds HTTP proxy support (useful with I2P) and command line flags for setting a proxy for I2P and CJDNS. As this is an enhacement, it was postponed to keep this pull request small. If you wish to check it out you may find it here.
The crawler does attempt to communicate with TOR, I2P and CJDNS nodes to collect peer addresses from them, possibly through a proxy if supplied in the command line.
This implementation was carefully tested prior to submission for each of TOR, I2P and CJDNS nodes.