Skip to content
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

Add un ser unittests #10

Open
wants to merge 154 commits into
base: master
Choose a base branch
from
Open

Add un ser unittests #10

wants to merge 154 commits into from

Conversation

zancas
Copy link
Member

@zancas zancas commented Nov 9, 2021

No description provided.

luke-jr and others added 30 commits October 28, 2021 10:31
…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 b6c3ff3)
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)
-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)
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 <[email protected]>
(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)
zancas and others added 11 commits October 28, 2021 10:31
(cherry picked from commit 5c34bff)
CVectorWriter is useful for overwriting or appending an existing byte vector.

CNetMsgMaker is a shortcut for creating messages on-the-fly which are suitable
for pushing to CConnman.

(cherry picked from commit 2ec935d)
(cherry picked from commit 878e63c)
minimally change net_processing by adding "addrv2" as a strCommand
minimally change net.h with addition of m_wants_addrv2

(cherry picked from commit 353a3fd)
(cherry picked from commit d2d5557)
 (cherry picked from commit 353a3fd)

(cherry picked from commit 19ee7cf)
  (cherry picked from commit dcf0cb4)

(cherry picked from commit 796c30a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.