Page MenuHomePhabricator

net: Add option `-enablebip61` to configure sending of BIP61 notifications

Authored by deadalnix on Wed, Jul 24, 00:56.



This commit adds a boolean option -enablebip61, defaulting to 1, that
can be used to disable the sending of BIP61 reject messages. This
functionality has been requested for various reasons:

  • security (DoS): reject messages can reveal internal state that can be used to target certain resources such as the mempool more easily.
  • bandwidth: a typical node sends lots of reject messages; this counts against upstream bandwidth. Also the reject messages tend to be larger than the message that was rejected.

On the other hand, reject messages can be useful while developing client
software (I found them indispensable while creating bitcoin-submittx),
as well as for our own test cases, so whatever the default becomes on the
long run, IMO the functionality should be retained as option. But that's
a discussion for later.

  • doc: Mention disabling BIP61 in

This is a backport of Core PR13134

Test Plan
make check

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

deadalnix created this revision.Wed, Jul 24, 00:56
Herald added a reviewer: Restricted Project. · View Herald TranscriptWed, Jul 24, 00:56
Fabien requested changes to this revision.Wed, Jul 24, 06:25
Fabien added a subscriber: Fabien.

The test is failing

This revision now requires changes to proceed.Wed, Jul 24, 06:25
Fabien added inline comments.Wed, Jul 24, 06:32
86 ↗(On Diff #10414)

Don't know if it's related to the test failure, but this change is from another PR:

Fabien accepted this revision.Thu, Jul 25, 06:45

Can't reproduce the issue

This revision is now accepted and ready to land.Thu, Jul 25, 06:45