Skip to content

Bump supported Bitcoin P2P protocol version past 70015 #235

@fpelliccioni

Description

@fpelliccioni

Current state

`kth::domain::message::version::level::maximum` is pinned to `bip152_fix = 70015` in `src/domain/include/kth/domain/message/version.hpp`. This is the highest protocol version we advertise on handshake and the one we pass to `to_data` / `from_data` when (de)serializing P2P messages.

70015 is pre-BCHN-fork. BCHN has bumped the wire version multiple times since, and ABC / BCHN / Knots have different ceilings today. We should at least catch up to the latest version BCHN supports.

What we need to figure out

  • What is BCHN's current `PROTOCOL_VERSION` (and what features each bump brought in — likely things like `send_headers` ordering, `xversion`/`extversion`, service-bit changes). Start here: https://github.com/bitcoin-cash-node/bitcoin-cash-node/blob/master/src/version.h.
  • Same check for BCHA / Bitcoin ABC if we still want to federate with them.
  • Decide whether we follow BCHN 1:1 or stay one step behind for compatibility.

What needs to change once we pick a target

  • Add the new `level` enumerators in `version.hpp` (e.g. `bchn_ = 700NN`) and update `maximum` accordingly.
  • For each new message type gated by the new version (e.g. `extversion`), add/regenerate the C-API binding once the C++ side lands.
  • Review every `from_data` / `to_data` that takes `uint32_t version` for behavior changes at the new level. Most are stable, but `send_compact` / `block` / `header` can shift on protocol bumps.
  • Handshake logic in `kth/network`: bump the advertised version in `version_message` construction.
  • Update the tests in `src/domain/test/message/` that currently use `version::level::minimum` as a sentinel — the round-trip tests need to cover the new ceiling too.

Scope note

This is a research + coordination task, not a one-commit fix. It needs a separate follow-up per message type once we know what BCHN added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions