BRC-128 Transactions

Multicast Extended Transaction Frame Format

This BRC specifies a payload variant for the BRC-124 multicast frame format in which the transaction payload uses the BRC-30 Extended Format (EF) instead of the BRC-12 raw transaction format. The 92-byte BRC-124 header is unchanged; the payload is self-identifying via the BRC-30 EF marker. This enables multicast receivers and broadcast services to fully vali

Jeff Harris (jeff@lightweb.net)

How it connects

Relationships

Authoritative content mirror

Full upstream text

View source
Rendered from transactions/0128.md at the indexed upstream commit

Abstract

This BRC specifies a payload variant for the BRC-124 multicast frame format in which the transaction payload uses the BRC-30 Extended Format (EF) instead of the BRC-12 raw transaction format. The 92-byte BRC-124 header is unchanged; the payload is self-identifying via the BRC-30 EF marker. This enables multicast receivers and broadcast services to fully validate transaction signatures and fee amounts without external UTXO lookups.

Copyright

This BRC is licensed under the Open BSV License.

Motivation

BRC-124 frames carry BSV transactions in BRC-12 raw format, which omits the locking scripts and satoshi amounts of spent inputs. Validating signatures or computing fees from a BRC-12 payload requires an external UTXO lookup — a bottleneck that BRC-30 was specifically designed to eliminate.

By defining BRC-124 frames with BRC-30 Extended Format payloads, multicast infrastructure gains:

  1. Self-contained validation — receivers can verify all input signatures and compute exact fee amounts from the frame payload alone, with no UTXO index dependency.
  2. Zero header changes — the BRC-124 header (Frame Version 0x02, 92 bytes) is reused as-is. The EF marker embedded in the payload provides unambiguous format detection. No frame version bump is required.
  3. Transparent infrastructure — proxies, retry endpoints, and listeners treat the payload as opaque bytes. Existing multicast infrastructure forwards BRC-128 frames without modification.
  4. Coexistence — BRC-124 frames with BRC-12 payloads and BRC-128 frames with BRC-30 EF payloads share the same multicast groups, frame version, and processing pipeline.

Specification

Frame Structure Overview

A BRC-128 frame consists of a standard 92-byte BRC-124 header followed by a variable-length payload containing a BRC-30 Extended Format transaction. The header is identical to BRC-124 in every respect — same field layout, same Frame Version byte (0x02), same alignment.

Header Format (92 bytes)

The header is defined by BRC-124 and reproduced here for reference:

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 = unstamped
48 8 8-byte SeqNum Monotonic per-flow counter (starts at 1); 0 = unstamped
56 32 8-byte Subtree ID 32-byte batch identifier; zeros = unset
88 4 8-byte Payload Length uint32 BE
92 * Payload BRC-30 Extended Format transaction bytes

All header fields retain the semantics defined in BRC-124. The only difference from a BRC-124 frame is the payload format.

Payload Format (BRC-30 Extended Format)

The payload is a BSV transaction serialized in the BRC-30 Extended Format. The format is summarized here; see BRC-30 for the full specification.

EF Transaction Structure

Field Description Size
Version no Transaction version, currently 2 4 bytes (LE)
EF marker Extended Format marker 6 bytes: 0x00 0x00 0x00 0x00 0x00 0xEF
In-counter Number of inputs (VarInt) 1–9 bytes
list of inputs Extended Format input structures variable
Out-counter Number of outputs (VarInt) 1–9 bytes
list of outputs Standard output structures variable
nLocktime Lock time 4 bytes (LE)

Extended Format Input Structure

Each input in an EF transaction appends the spent output's satoshi value and locking script after the standard input fields:

Field Description Size
Previous Transaction hash TXID of the transaction the output was created in 32 bytes
Previous Txout-index Index of the output (non-negative integer) 4 bytes
Txin-script length VarInt 1–9 bytes
Txin-script / scriptSig Unlocking script