Skip to content

contrib, doc: v2flood harness, handshake benchmark, operator guide and release note (#184 part 8) #215

Closed

Description

@djh58

Part 8 of 9 · #184 · Size L · Base 1.x.x · Needs part 4 (#199), part 6 (#209) · Unblocks part 9 (#222)

Consolidates work items H1 (#215) and H3 (#216), each formerly its own sub-issue. Their full text is below as sections; the closed issues point here.

Goal

The flood measurement's tooling and the operator-facing docs: the v2flood harness with its lab script, a handshake benchmark, the operator guide, the release note, doc updates, a quick-start test and a doc string check.

Work items

In suggested commit order. Each item is a section below.

  • H1 · contrib: add the v2flood harness and a V2Transport handshake benchmark
  • H3 · doc: operator guide, release note and doc updates for hybrid v2 transport

Starting early

  • H1 can start once part 4 merges; flooding a hybrid node needs F5's option from part 6.
  • H3 needs part 6's exact option, RPC and log strings, and links the spec from part 4.

H1 · contrib: add the v2flood harness and a V2Transport handshake benchmark

Needs E3 (#199), F5 (#209).

Goal

Reproducible tools for the flood measurement (R3) and for later releases: a C++ flood driver, a lab script that prints the measurement table, and a handshake benchmark.

Scope

  • contrib/devtools/v2flood/: a C++ tool that drives V2Transport directly, so it completes handshakes at full speed. It opens connections to a target as fast as the target accepts them, keeping every inbound slot busy. Three modes, each ending in a disconnect:

    • junk: 64 random bytes, then nothing;
    • handshake: complete handshakes, hybrid or legacy depending on the target's offer;
    • maxversion: an authenticated maximum-size version packet of minimal unknown records ending in a malformed one, (01 01 repeated 2,000,006 times) ‖ 00, 4,000,013 bytes in total.

    It uses production entropy. --help lists the modes. It builds when BUILD_V2FLOOD=ON, a root CMake option that one CI build turns on so the tool doesn't rot.

  • contrib/devtools/v2flood/run-item3.sh: sets up the regtest lab and prints R3's table.

    • Topology: node A is flooded; node B holds an outbound connection to A; node C, connected only to A, mines.
    • For each mode, with A's switch on and off: the time from C finding a block to B's tip updating, over 100 blocks (median, p95, max), plus unflooded reference figures.
    • perf stat CPU time of qbitd per attempted junk handshake and per completed handshake.
    • For maxversion: socket-thread delay and memory, including transient transport buffers (the receive path holds both the ciphertext and the decoded contents).
  • src/bench/v2_transport.cpp: a full V2Transport pair handshake, legacy against hybrid, reporting CPU and bytes, once with native code and once forced portable.

  • A contrib/devtools/README.md entry.

Acceptance criteria

  • It builds in CI with BUILD_V2FLOOD=ON, and --help works.
  • A lab dry run of run-item3.sh with a small block count prints the table (output on the PR).
  • The benchmark lists legacy and hybrid for each backend. Run it once inside a VM and post the numbers, which would expose an uncached capability check.

Suggested commit: tools: add reproducible transport flood and handshake measurements.


H3 · doc: operator guide, release note and doc updates for hybrid v2 transport

Needs F6 (#209), H2 (#199).

Goal

Operators can turn the feature on or off, check that it works and troubleshoot it in about five minutes, and the docs can't drift from the code.

Scope

  • New doc/user/network/pq-transport.md, listed in doc/user/README.md next to Tor and I2P and linked from the release note:
    • Try it: a copy-paste two-node regtest quick start (separate data directories and ports, readiness checks, addnode … onetry) that ends with getpeerinfo showing "transport_pq": true, -netinfo showing 2p, and the startup line. Cleanup follows. No chain sync and no wallet; about 5 minutes and 3 steps. GUI users get one line: Settings → Options → Open Configuration File.

    • A two-line BIP324 primer.

    • Verify: the startup line, getpeerinfo transport_pq and transport_pq_status, -netinfo 2p, getnetworkinfo connections_pq, and getpqtransportinfo.

    • The fallback and load shedding, in plain words.

    • What it protects: recorded traffic between upgraded nodes. What it doesn't:

      • no authentication;
      • no protection from spy peers or an active man-in-the-middle;
      • nothing for traffic to v1.0.0 nodes;
      • no transaction-origin privacy.

      Hybrid sessions are recognizable by packet sizes (the initiator's terminator-only first send, and version packets of about 1.6 KB), so censorship-sensitive users should use Tor or I2P.

    • Troubleshooting: a table keyed by exact log text and counter name, giving the meaning, likely causes, the action, what to attach to a report, and when to go to SECURITY.md instead. Say where the log is: the debug.log path, or journalctl -u qbitd under systemd.

    • Upgrading and rolling back: how to switch it on or off (v2pqtransport=0 or 1, then restart); booleans must be numeric (true parses as 0); check with getpqtransportinfo; -mlkemportable as the escape hatch.

  • Release-note fragment doc/release-notes-<PR number>.md: what the feature does and doesn't protect, the default, and how to switch it off. R1 (release: hybrid v2 transport release gate and default-on (#184 part 9) #222) updates the wording for the default.
  • Updates to doc/user/bitcoin-core-differences.md, doc/integration/rpc-delta-reference.md, contrib/devtools/README.md, test/lint/README.md and doc/development/fuzzing.md. The three pq-transport documents (spec, operator guide, release note) link to each other.
  • test/functional/feature_pq_quickstart.py: runs the documented quick-start commands with ports and data directories from the framework's allocator, checks the outputs the doc shows, and cleans up.
  • Doc string check, run in lint: extract the explicitly marked quoted interface tokens (options, RPC fields, log strings) from the docs, and check that each exists in the code or in -help.

Acceptance criteria

  • The markdown lint, the doc string check and feature_pq_quickstart.py pass.

Suggested commit: doc: specify and document hybrid v2 transport rollout.


One pull request against 1.x.x closes this issue. The shared contract is the Design section of #184; change it there first if needed.

Activity

  1. added
    enhancement
    pq-transport
    on Oct 5, 2026
  2. changed the title [-]contrib: add the v2flood harness and a V2Transport handshake benchmark (#184 H1)[/-] [+]contrib, doc: v2flood harness, handshake benchmark, operator guide and release note (#184 part 8)[/+] on Oct 5, 2026
  3. 8 remaining items

  4. djh58 commented on Oct 23, 2026

    @djh58
    MemberAuthor

    Done in #240, merged into feature/pq-transport as 5da8c1f. It reaches 1.1.0 with #233 and ships in 1.1.0.

    The v2flood harness was not built. R3 in #222 was settled with CPU benchmarks of the handshake instead, and the load-shedding threshold stays at 1,000 per second.

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

    enhancementpq-transport

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions