-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TorV3 Backport ZIP155: For test purposes only #5366
Draft
zancas
wants to merge
134
commits into
zcash:master
Choose a base branch
from
zingolabs:FOR_TEST_PURPOSES_ONLY
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…n be shared and reused (cherry picked from commit 5e10922)
To make it clear where DNS resolves are happening (cherry picked from commit e9fc71e)
Note: Some seeds aren't actually returning an IP for their name entries, so they're being added to addrman with a source of [::]. This commit shouldn't change that behavior, for better or worse. (cherry picked from commit a98cd1f)
Rather than allowing CNetAddr/CService/CSubNet to launch DNS queries, require that addresses are already resolved. This greatly simplifies async resolve logic, and makes it harder to accidentally leak DNS queries. (cherry picked from commit 3675699)
CNetAddr/CService/CSubnet can no longer resolve DNS. (cherry picked from commit d39f5b4)
(cherry picked from commit ee06e04)
…round use of nServices
(cherry picked from commit 31d6b1d)
(cherry picked from commit f96c7c4)
(cherry picked from commit b6c3ff3)
(cherry picked from commit 1017b8a)
(cherry picked from commit 21e5b96)
Net functionality is no longer needed for CAddress/CAddrman/etc. now that CNetAddr/CService/CSubNet are dumb storage classes. (cherry picked from commit 21ba407)
Also fix up a few small issues: - Lookup with "badip:port" now sets the port to 0 - Don't allow assert to have side-effects (cherry picked from commit 8945384)
(cherry picked from commit 9e9d644)
(cherry picked from commit ccef5d7)
-BEGIN VERIFY SCRIPT- sed --in-place'' --expression='s/NET_TOR/NET_ONION/g' $(git grep -I --files-with-matches 'NET_TOR') -END VERIFY SCRIPT- The --in-place'' hack is required for sed on macOS to edit files in-place without passing a backup extension. (cherry picked from commit 07c493f)
( cherry-plucked from: b691f2d ) In github context: bitcoin/bitcoin@b691f2d#diff-9281caf81406a5c4e11f572f613a4cc9769f39c66579ed75a4c957f30b39d836
Do not access `CNetAddr::ip` directly from `CService` methods. This improvement will help later when we change the type of `CNetAddr::ip` (in the BIP155 implementation). Co-authored-by: Carl Dong <contact@carldong.me> (cherry picked from commit bc74a40)
(cherry picked from commit 100c64a)
We currently do two resolves for dns seeds: one for the results, and one to serve in addrman as the source for those addresses. There's no requirement that the source hostname resolves to the stored identifier, only that the mapping is unique. So rather than incurring the second lookup, combine a private subnet with a hash of the hostname. The resulting v6 ip is guaranteed not to be publicy routable, and has only a negligible chance of colliding with a user's internal network (which would be of no consequence anyway). (cherry picked from commit 7f31762)
(cherry picked from commit 100c64a)
(cherry picked from commit 2ac8bf9)
FastRandomContext now provides all functionality that the real Rand* functions provide. (cherry picked from commit 37e864e)
Note this doesn't build, missing identifier: SHA256D64 (cherry picked from commit e549bf8)
(cherry picked from commit 92beff1)
Change the serialization of `CAddrMan` to serialize its addresses in ADDRv2/BIP155 format by default. Introduce a new `CAddrMan` format version (3). Add support for ADDRv2 format in `CAddress` (un)serialization. Co-authored-by: Carl Dong <contact@carldong.me> (cherry picked from commit 201a459) (cherry picked from commit bd2c485)
(cherry picked from commit 857baca)
(cherry picked from commit 27d53eb)
(cherry picked from commit 5c34bff)
zancas
changed the title
For test purposes only
TorV3 Backport ZIP155: For test purposes only
Oct 28, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This builds, and passes the full test suite tests. It's almost completely composed of code cherry-picked from bitcoin's implementation of BIP155 and subsequent Torv3 support.
NOTE: It's likely that it will need commit-history modifying refactor (among many other things).
The next step is to attempt to establish communication between two nodes using torv3.