partial #8149 and merge #19845, #19954: Complete the BIP155 implementation and upgrade to TORv3 #4025
+1,231
−100
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Continuing the work from #3939 to ensure that Tor support is available after the deprecation of Torv2 (source). More information about it is available at bitcoin#18884.
This PR attempts to implement bitcoin#19031 (which were split into various pull requests for ease of review) so that Torv3 support is available in Core.
Contents
The PR heavily relies upon functionality that wasn't been implemented then, requiring multiple dependencies. Therefore, those features have also been backported and logged accordingly.
Dependencies needed by bitcoin#19031
Merge p2p: supplying and using asmap to improve IP bucketing in addrman bitcoin/bitcoin#16702 ("p2p: supplying and using asmap to improve IP bucketing in addrman" by naumenkogs)Merge config, net, test: asmap feature refinements and functional tests bitcoin/bitcoin#17812 ("config, net, test: asmap feature refinements and functional tests" by fanquake)Merge Support serialization of std::vector<bool> bitcoin/bitcoin#16730 ("Support serialization of std::vector" by sipa)Merge util: Add [[nodiscard]] to all {Decode,Parse}[...](...) functions returning bool bitcoin/bitcoin#13815 ("util: Add [[nodiscard]] to all {Decode,Parse}... functions returning bool" by practicalswift)Partial merge Support output descriptors in scantxoutset bitcoin/bitcoin#13697 ("Support output descriptors in scantxoutset" by sipa)Mostly merge Add C++17 build to Travis bitcoin/bitcoin#18591 ("Add C++17 build to Travis" by sipa)Mostly merge span: update constructors to match c++20 draft spec and add lifetimebound attribute bitcoin/bitcoin#19387 ("span: update constructors to match c++20 draft spec and add lifetimebound attribute" by theuni)Mostly merge Serialization improvements step 5 (blockencodings) bitcoin/bitcoin#18112 ("Serialization improvements step 5 (blockencodings)" by sipa)Partial merge Serialization improvements step 4 (undo.h) bitcoin/bitcoin#18021 ("Serialization improvements step 4 (undo.h)" by sipa)Merge refactor: Make HexStr take a span bitcoin/bitcoin#19660 ("refactor: Make HexStr take a span" by laanwj)Merge refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o) bitcoin/bitcoin#19373 ("refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o)" by laanwj, using script documented by MarcoFalke)Merge Implement Keccak and SHA3_256 bitcoin/bitcoin#19841 ("Implement Keccak and SHA3_256" by laanwj)Merge refactor: make EncodeBase{32,64} consume Spans bitcoin/bitcoin#19687 ("refactor: make EncodeBase{32,64} consume Spans" by theStack)As part of bitcoin#19031
Complete the BIP155 implementation and upgrade to TORv3 bitcoin/bitcoin#19954 ("Complete the BIP155 implementation and upgrade to TORv3" by vasild)net: CNetAddr: add support to (un)serialize as ADDRv2 bitcoin/bitcoin#19845 ("net: CNetAddr: add support to (un)serialize as ADDRv2" by vasild)net: change CNetAddr::ip to have flexible size bitcoin/bitcoin#19628 ("net: change CNetAddr::ip to have flexible size" by vasild)Disclosures
Tests fail. I do not know why, I do not know how. They fail.No, they don't :)Changes that need review
SerializationOp
's handling ofnServices
inCAddress
28878d3#diff-8e2ffc8fe0e0847a6aac311a93b2faeebd2d76ddb2c81741bb8cf7448287807eR381