Page MenuHomePhabricator

net: advertise support for ADDRv2 via new message
ClosedPublic

Authored by Fabien on Wed, Feb 10, 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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien requested review of this revision.Wed, Feb 10, 11:17
majcosta requested changes to this revision.Wed, Feb 10, 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.Wed, Feb 10, 18:31
This revision is now accepted and ready to land.Wed, Feb 10, 21:36