Skip to content

Conversation

@ajtowns
Copy link
Contributor

@ajtowns ajtowns commented Jan 7, 2026

Abstract:

This BIP defines a peer-to-peer message that can be used for announcements and negotiation related to support of new peer-to-peer features.

Mailing list post: https://gnusha.org/pi/bitcoindev/[email protected]/T/#u

Mailing list discussion: https://groups.google.com/g/bitcoindev/c/DFXtbUdCNZE

@murchandamus murchandamus changed the title BIP???: Peer feature negotiation BIP Draft: Peer Feature Negotiation Jan 8, 2026
Copy link
Contributor

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your submission. This proposal appears already complete from an editorial perspective, and I have hardly any other comments. It would be great to see some P2P experts weigh in, but otherwise, this seems fairly mature.

Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the headers will need to be updated to BIP 3 now. Some editorial comments on first read. Agree it is ready for number.

Nodes implementing this BIP MAY disconnect peers that send `feature`
messages where the `feature` message's payload cannot be correctly
parsed (including having missing or additional data), even if they do
not recognise the `featureid`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be clearer to place this paragraph after the next one, as the "even if" phrase is confusing before reading the next paragraph.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be phrased more positively to disambiguate:

Nodes implementing this BIP MAY disconnect peers that send `feature`
messages where the `feature` message's payload cannot be correctly
parsed (including having missing or additional data). In the special case where a node is able to partially parse the message to read the `featureid`, but they do not recognise the `featureid`, they SHOULD NOT disconnect (to preserve upgradability of feature messages).

This is a valid reinterpretation of the earlier bit because the "MAY" disconnect is truly optional, so the addition of a SHOULD NOT doesn't modify the semantic, but makes it more clear what should be implemented, while still retaining valid behavior if a node disconnects because of upgraded feature types.

but no experience with doing so via `verack` payload.

A mild disadvantage compared to using a `verack` payload is that this
approach allows the possibility of interactive feature negotiation prior
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may be confused.

Suggested change
approach allows the possibility of interactive feature negotiation prior
approach does not allow the possibility of interactive feature negotiation prior

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is that interactive feature negotiation is a "bad" thing, as it makes negotiation more complex and potentially slower, so allowing it is a disadvantage.

@murchandamus
Copy link
Contributor

Let’s call this BIP 434.

@murchandamus murchandamus changed the title BIP Draft: Peer Feature Negotiation BIP 434: Peer Feature Negotiation Jan 14, 2026
parsed (including having missing or additional data), even if they do
not recognise the `featureid`.

Nodes implementing this BIP MUST ignore `feature` messages specifying a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not a MUST, it's a SHOULD

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it is a MUST; implementations that do not comply with that requirement do not correctly implement this specification.

The reason it's a requirement is that not ignoring such messages means your implementation is not forwards compatible with new features.

@ajtowns ajtowns force-pushed the 202512-p2p-feature branch from 9697b2b to 9630c4c Compare January 15, 2026 07:21

Nodes implementing both this BIP and [BIP 324 (v2 P2P encrypted
transport)][BIP324] MUST treat a message with a 1-byte `message_type`
equal to `XXX` that is received prior to `verack` as the `feature` message.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should synchronise specifying a real number here with updating BIP 324 to claim that number.

Copy link
Contributor

@murchandamus murchandamus Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems reasonable to add the change of BIP 324 to this PR in the same commit. Or alternatively, that could be another separate PR after this document is published before it’s progressed to Complete.

@ajtowns
Copy link
Contributor Author

ajtowns commented Jan 15, 2026

Updated for number assignment, BIP3 headers, and @jonatack's phrasing suggestions

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants