HomePhabricator

net: CAddress & CAddrMan: (un)serialize as ADDRv2

Description

net: CAddress & CAddrMan: (un)serialize as ADDRv2

Summary:

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.

Partial backport (2/4) of core PR19954:
https://github.com/bitcoin/bitcoin/pull/19954/commits/201a4596d92d640d5eb7e76cc8d959228fa09dbb

Includes a fix for the symbol check that would cause the gitian build to
fail:
Backport of core PR20129.
and a fix for a mismatch initialization order in the CAddress class
(reversal of nTime and nServices to match core).

Depends on D9190 and D9198.

Test Plan:

ninja all check-all

Run the Linux Gitian build.

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D9199

Details

Provenance
Vasil Dimov <vd@FreeBSD.org>Authored on May 19 2020, 15:39
FabienCommitted on Feb 11 2021, 08:23
FabienPushed on Feb 11 2021, 08:24
Reviewer
Restricted Project
Differential Revision
D9199: net: CAddress & CAddrMan: (un)serialize as ADDRv2
Parents
rABC9f2f484d69d2: Support bypassing range check in ReadCompactSize
Branches
Unknown
Tags
Unknown