Skip to content

Add rare BIP324 decoy packets for protocol compatibility enforcement #36376

Open

Description

@sipa

BIP324 supports decoy packets as a means for traffic shaping. That feature isn't used (we never send them, but support receiving them), and might never be, but not using it risks having other P2P clients not supporting it at all.

Therefore I suggest that every V2 connection occasionally is sent a decoy packet, even a tiny one, just to make sure support isn't silently missing from other software.

Activity

  1. fanquake commented on Sep 29, 2026

    @fanquake
    Member
  2. real-or-random commented on Oct 12, 2026

    @real-or-random
    Contributor

    Concept ACK -- it's better to do this now than when we need it

  3. fametrano commented on Oct 23, 2026

    @fametrano

    btclib-node, a Python node, already drops BIP324 decoy packets, so it would cope if Core started sending them.

    I wanted to know whether software other than Core is ready for this. I fed btclib-node's receiver packets built by Core's functional-test EncryptedP2PState, so no btclib code built them. It dropped every decoy and delivered every real message, as initiator and as responder. A receiver patched to keep decoys failed every case.

    Decoys came during the handshake, the first one carrying the garbage as AAD, and about 300 more between pings, across a rekey. One was empty, one was 1 MB, and one had every header bit set. A packet with header 0x7f, whose ignore bit is clear, was delivered as a message. I can share the test on request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions