Jeff Harris (jeff@lightweb.net)
This BRC specifies the wire format for transporting BSV transactions over IPv6 multicast and TCP/UDP unicast. The format extends the legacy BRC-12 frame with additional fields for flow identification, sequence tracking, and subtree identification. All fields are 8-byte aligned for efficient memory access on 64-bit architectures. The frame is transport-agnostic: the on-wire bytes are identical under Any-Source (ASM) and Source-Specific (SSM) multicast. Multicast group addressing, scopes, and the SSM (S,G) join and source-discovery model are specified in BRC-129; the frame's source is the emitting proxy (senderIPv6, the first HashKey ingredient).
This BRC is licensed under the Open BSV License.
As BSV transaction throughput scales to billions of transactions per second, efficient distribution infrastructure becomes critical. IPv6 multicast provides a scalable one-to-many transport mechanism, but globally scalable transaction distribution requires:
- Deterministic sharding — routing transactions to specific multicast groups based on transaction ID
- Subtree identification — filtering batches of related transactions at the network layer
- Flow and Sequence tracking — stable per-flow hashing and monotonic sequencing for gap tracking and NACK-based retransmission
This frame format addresses these requirements while maintaining compatibility with the existing BRC-12 transaction payload format. It uses a 92-byte header that provides the metadata necessary for high-throughput multicast distribution with best-effort reliability, complementing the legacy 44-byte header defined in BRC-12.
Conceptual Attribution: The IPv6 multicast transaction broadcast architecture from which this software draws inspiration was articulated by Dr. Craig S. Wright in Multicast Within Multicast: Anycast, Sharded Resends, and Hierarchical Distribution for Transaction and Block Propagation.
A frame consists of a 92-byte header followed by a variable-length payload containing a BRC-12 raw transaction. All multi-byte integers are big-endian. All fields from offset 8 onward are 8-byte aligned.
| Offset | Size | Alignment | Field | Description |
|---|---|---|---|---|
| 0 | 4 | — | Network Magic | 0xE3E1F3E8 (BSV mainnet P2P magic) |
| 4 | 2 | — | Protocol Version | 0x02BF (703, BSV large-block baseline) |
| 6 | 1 | — | Frame Version | 0x02 |
| 7 | 1 | — | Reserved | Must be 0x00 |
| 8 | 32 | 8-byte | Transaction ID | Raw 256-bit TXID (internal byte order) |
| 40 | 8 | 8-byte | HashKey | Stable per-flow XXH64 identifier; 0 = unset |
| 48 | 8 | 8-byte | SeqNum | Monotonic per-flow counter; 0 = unset |
| 56 | 32 | 8-byte | Subtree ID | 32-byte batch identifier; zeros = unset |
| 88 | 4 | 8-byte | Payload Length | uint32 BE |
| 92 | * | — | Payload | BRC-12 raw transaction bytes |
The value 0xE3E1F3E8 (BSV mainnet P2P network magic). This enables standard BSV firewall rules and network monitoring tools to correctly classify shard frames. Frames with incorrect magic are rejected.
The value 0x02BF (703 in decimal), representing the BSV node protocol version that introduced the large-block policy. This field is informational; receivers do not validate it.
The value 0x02 for frames following this specification. The legacy format defined in BRC-12 uses 0x01 (see Compatibility section). Any other value causes the frame to be rejected.
Must be 0x00. Reserved for future protocol extensions.
The 32-byte transaction hash in internal byte order (as used in BSV P2P protocol), not the reversed display order used by block explorers.
A 64-bit unsigned integer (big-endian) containing a stable per-flow identifier computed as:
HashKey = XXH64(senderIPv6 [16B] ∥ groupIdx [4B BE] ∥ subtreeID [32B])
The 52-byte hash input combines the sender's IPv6 address, the derived multicast group index, and the subtree identifier to produce an 8-byte key that is constant for all frames in a flow. This enables per-flow gap tracking, NACK dispatch, and cache lookup without carrying the full 52 bytes in every frame.
This field is stamped in-place by the ingress proxy before multicast forwarding. Senders (generators) set it to 0; a value of 0 indicates the frame has not been stamped and gap tracking is skipped.
A 64-bit unsigned integer (big-endian) containing a monotonic counter per flow, starting at 1. Incremented by 1 for each frame in a (sender, group, subtree) flow. Used by receivers to detect gaps: a gap is detected when the incoming SeqNum advances by more than 1 from the last-seen value for the same HashKey.
The pair (HashKey, SeqNum) forms the 16-byte cache key used by retry endpoints for NACK-based retransmission.
This field is stamped in-place by the ingress proxy alongside HashKey. A value of 0 indicates the frame has not been stamped.
A 32-byte opaque batch identifier. A subtree is an ordered set of related transactions sharing a common batch context. This field enables downstream subscribers to filter frames by batch at the application layer. All-zero bytes indicate the field is unset.
A 32-bit unsigned integer (big-endian) specifying the number of payload bytes immediately following the header. It is up to the application to determine the maximum allowed payload size.
Raw serialized BSV transaction in BRC-12 format: version (4 bytes LE) + input vector + output vector + locktime (4 bytes LE). No additional envelope wraps the transaction.
| Field | Offset | Offset % 8 |
|---|---|---|
| Transaction ID | 8 | 0 ✓ |
| HashKey | 40 | 0 ✓ |
| SeqNum | 48 | 0 ✓ |
| Subtree ID | 56 | 0 ✓ |
| Payload Length | 88 | 0 ✓ |
| Payload | 92 | 4 |
Legacy BRC-12 frames (Frame Version 0x01) use a 44-byte header with no HashKey, SeqNum, or subtree fields:
| Offset | Size | Field |
|---|---|---|
| 0 | 4 | Network Magic |
| 4 | 2 | Protocol Version |
| 6 | 1 | Frame Version (0x01 = legacy) |
| 7 | 1 | Reserved |
| 8 | 32 | Transaction ID |
| 40 | 4 | Payload Length |
| 44 | * | Payload |
When transported over TCP, frames are concatenated end-to-end with no additional envelope. The reader:
- Reads 44 bytes (sufficient for legacy header or BRC-124 header start)
- Inspects byte 6 (Frame Version)
- Version 0x01 (legacy): header complete; read
PayLenat bytes 40–43 - Version 0x02 (BRC-124): read 48 more bytes; read
PayLenat bytes 88–91
- Version 0x01 (legacy): header complete; read
- Reads exactly
PayLenbytes - Processes the complete frame
A frame following this specification carrying a 200-byte transaction:
// Header (92 bytes)
E3E1F3E8 // Network Magic
02BF // Protocol Version
02 // Frame Version
00 // Reserved
11c6900eee6e68d191cd25034a5f872ed29e3b69273906a10e021f39ed866471 // TXID
A1B2C3D400000001 // HashKey (XXH64 of sender+group+subtree)
00000000000004D2 // SeqNum = 1234
baadf498a00ca5a44d1c4d9d103b49017f53cd8cb2a70a9c67fc884ecdd622b5 // Subtree ID
000000C8 // Payload Length (200)
// Payload (200 bytes of BRC-12 transaction data)
0200000001...00000000
The same transaction in legacy (BRC-12) format:
// Header (44 bytes)
E3E1F3E8 // Network Magic
02BF // Protocol Version
01 // Frame Version (0x01 = legacy)
00 // Reserved
11c6900eee6e68d191cd25034a5f872ed29e3b69273906a10e021f39ed866471 // TXID
000000C8 // Payload Length (200)
// Payload (200 bytes)
0200000001...00000000
- BRC-12: Raw Transaction Format — Payload format for transaction data
- BRC-74: BSV Unified Merkle Path (BUMP) Format — Merkle proof format used for transaction verification
- BRC-119: SubTree Unified Merkle Path (STUMP) Format — Defines the Subtree ID concept referenced in this frame format
- BRC-129: Multicast Group Address Assignments — SSM/ASM addressing, scopes, and
(S,G)source discovery
| Name | Value | Hex | Description |
|---|---|---|---|
MagicBSV |
3823236072 | 0xE3E1F3E8 |
BSV mainnet P2P magic |
ProtoVer |
703 | 0x02BF |
Protocol version |
FrameVerLegacy |
1 | 0x01 |
Legacy BRC-12 frame version |
FrameVerBRC124 |
2 | 0x02 |
Current BRC-124 frame version |
HeaderSizeLegacy |
44 | 0x2C |
Legacy header size in bytes |
HeaderSize |
92 | 0x5C |
BRC-124 header size in bytes |