Page MenuHomePhabricator

net: advertise support for ADDRv2 via new message
ClosedPublic

Authored by Fabien on Feb 10 2021, 11:17.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABC15f4d6097a4a: net: advertise support for ADDRv2 via new message
Summary
Introduce a new message `sendaddrv2` to signal support for ADDRv2.
Send the new message immediately after sending the `VERACK` message.

Add support for receiving and parsing ADDRv2 messages.

Send ADDRv2 messages (instead of ADDR) to a peer if he has
advertised support for it.

Partial backport (3/4) of core PR19954:
https://github.com/bitcoin/bitcoin/pull/19954/commits/353a3fdaad055eea42a0baf7326bdd591f541170

Depends on D9199.

Some functional tests required a debug log message update since we where
using a slightly different form from core. The new code is in sync with
core's message to make later backports easier.

Test Plan
ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Feb 10 2021, 11:17
majcosta requested changes to this revision.Feb 10 2021, 18:31
majcosta added a subscriber: majcosta.
majcosta added inline comments.
test/functional/p2p_invalid_messages.py
300–317 ↗(On Diff #27630)

something like this, ditto for cases above

This revision now requires changes to proceed.Feb 10 2021, 18:31
This revision is now accepted and ready to land.Feb 10 2021, 21:36