Beersy
BRC-131

Multicast Block Announcement Frame Format

Clients need to know when a new block arrives, and polling for it wastes time and bandwidth. This pushes the block's summary to everyone listening as soon as it exists.

Jeff Harrischanged 30 Jul 20268 min read
proxyminerexchangeoverlay

Summary

Why
Block announcements and the transaction that goes with them need to reach every subscriber at once, not just the ones assigned to a particular shard, and they need the same delivery guarantees as regular transaction traffic.
What
BRC-131 defines a 92-byte wire frame, reusing the BRC-124 header layout with a new frame version, for sending block announcements and coinbase transactions to all subscribers over a dedicated multicast group.
How
A sender builds a frame with FrameVer 0x04, sets MsgType to either BlockAnnounce (, coinbase transaction ID, and hashes) or CoinbaseTx (raw coinbase bytes), and publishes it to the fixed control group FF0E::B:FFFE, where listeners track sequence numbers and request retransmission over the same NACK

What this lets you do

  • Announce a new block header plus its subtree to every subscriber at once
  • Deliver the coinbase transaction to all subscribers regardless of their shard assignment
  • Detect missing block frames via sequence number gaps and trigger NACK-based retransmission
  • Fragment oversized coinbase payloads using the existing BRC-130 mechanism
  • Distinguish block frames from ordinary transaction frames using a dedicated frame version byte

Written by claude-sonnet-5 from the specification text. Where the two differ, the original is correct.

Reference for an AI

Everything an assistant needs to answer questions about BRC-131 accurately, including what it depends on.

The specification

Abstract

This BRC specifies the wire format for distributing block-level metadata over the IPv6 multicast fabric. A new frame version (0x04) reuses the BRC-124 92-byte header layout and carries either a block announcement ( + TxID + hashes) or a coinbase transaction, delivered to all subscribers via a dedicated control-plane multicast group (FF0E::B:FFFE).

This BRC is licensed under the Open BSV License.

Motivation

The multicast fabric defined in BRC-124 shards transaction delivery across deterministic IPv6 multicast groups. Block events require a complementary distribution path:

  1. Block announcements must reach every subscriber — miners, exchanges, and — so they can update block templates, advance chain state, and validate received transactions against the new tip.
  2. Coinbase transactions must be delivered to all subscribers regardless of shard assignment, since every node needs the coinbase to reconstruct the block .
  3. Both events must carry the same sequencing and reliability guarantees (/SeqNum stamping and NACK-based retransmission) as ordinary transaction frames, so existing retry infrastructure works without modification.

Defining a new FrameVer byte satisfies these requirements with minimal protocol surface: the BRC-124 header layout is fully preserved, the same proxy/listener/retry machinery applies, and the only routing change is substituting the shard-derived multicast group with the dedicated control group.

Specification

Frame Header Format (92 bytes)

The BRC-131 header is layout-identical to the BRC-124 header. All multi-byte integers are big-endian.

OffsetSizeAlignmentFieldDescription
04Network Magic0xE3E1F3E8 (BSV mainnet P2P magic)
42Protocol Ver0x02BF (703, BSV large-block baseline)
61Frame Version0x04 — BRC-131 block control
71MsgType0x01 = BlockAnnounce; 0x02 = CoinbaseTx
8328-byteBlockHash (announce) or CoinbaseTxID (coinbase)
4088-byteHashKeyXXH64(senderIPv6 ∥ ∥ zeros); proxy-stamped
4888-byteSeqNumPer-sender monotonic counter; stamped by proxy
56328-byteReserved32All zeros
8848-bytePayload Lengthuint32 BE
92*PayloadMsgType-specific (see below)

Distinction from BRC-124: Byte 7 carries MsgType rather than Reserved=0x00. The 32 bytes at 56–87 are always zeros (no subtree ID; block frames address all subscribers).

Field Definitions

Network Magic (bytes 0–3)

The value 0xE3E1F3E8 (BSV mainnet P2P magic). Frames with incorrect magic are rejected.

Protocol Version (bytes 4–5)

0x02BF (703). Informational; receivers do not validate.

Frame Version (byte 6)

0x04 for BRC-131 frames. Any other value causes the frame to be handled by a different decoder.

MsgType (byte 7)

Identifies the payload type:

ValueConstantPayload
0x01BlockMsgAnnounceBlock header + CoinbaseTxID + subtree root hashes
0x02BlockMsgCoinbaseRaw serialized coinbase transaction bytes

Any other value is rejected.

ContentID (bytes 8–39)

A 32-byte identifier:

  • BlockAnnounce: the block hash in internal byte order (not reversed display order).
  • CoinbaseTx: SHA256d of the raw coinbase transaction bytes (the CoinbaseTxID).

HashKey (bytes 40–47)

uint64 big-endian. XXH64 of (senderIPv6[16] ∥ flowIdx[4] ∥ zeroSubtreeID[32]) where flowIdx is a 4-byte big-endian value selected by MsgType, so the two payload types form independent flows on the shared egress group:

  • BlockAnnounce (MsgType 0x01): flowIdx = 0x0000FFFE (GroupBlockBroadcast).
  • CoinbaseTx (MsgType 0x02): flowIdx = 0x0000FFF8 (GroupCoinbaseFlow, a virtual HashKey index — see BRC-129 and BRC-133).

Stamped in-place by the proxy if zero on arrival.

SeqNum (bytes 48–55)

uint64 big-endian. Monotonic per-sender counter for the (HashKey, flowIdx) flow. Stamped in-place by the proxy if zero on arrival. Used by listeners and retry endpoints as the secondary cache key.

Reserved32 (bytes 56–87)

All zero bytes. Block control frames have no subtree ID; the field is reserved for future use.

Payload Length (bytes 88–91)

uint32 big-endian. Number of payload bytes immediately following the header.

Payload (byte 92 onward)

MsgType-specific (see below).

BlockAnnounce Payload (MsgType 0x01)

OffsetSizeFieldDescription
080BlockHeaderStandard 80-byte BSV block header
8032CoinbaseTxIDSHA256d of the coinbase transaction (internal BO)
1124SubtreeCountNumber of subtree root hashes (uint32 BE); ≥ 0
11632 × NSubtreeHashesOrdered list of N subtree Merkle root hashes

Minimum payload size: 116 bytes (N = 0). Total payload size: 116 + 32 × N bytes.

The ContentID in the frame header is the 32-byte block hash. The SubtreeHashes are the ordered Merkle roots of the sharded transaction subtrees included in this block, matching the producer's subtree enumeration. The count may be zero for empty blocks or blocks with no sharded subtrees.

CoinbaseTx Payload (MsgType 0x02)

The payload is the raw serialized coinbase transaction — the same encoding as a BRC-12 transaction payload (version LE32 + inputs + outputs + locktime LE32), with no additional envelope.

The ContentID in the frame header is the SHA256d of these raw bytes (the CoinbaseTxID), identical to the CoinbaseTxID field in the corresponding BlockAnnounce frame.

Control-Plane Multicast Group

BRC-131 frames are distributed exclusively on the group:

IndexScopeIPv6 AddressConstant
0xFFFEglobalFF0E::B:FFFEGroupBlockBroadcast

The global scope (FF0E) ensures block announcements cross site boundaries. The group index 0xFFFE is in the reserved control-plane range and is never used as a shard group for any shard_bits ≤ 12.

The address is shown in form (FF0E::B:FFFE), which under RFC 8815 is intra-domain only; inter-domain delivery across site boundaries uses the SSM address FF3E::B:FFFE (see BRC-129). The frame format, HashKey, SeqNum, and NACK path are unchanged across modes. Under SSM, receivers (S,G)-join using the block-announce source (the emitting proxy, senderIPv6); block-broadcast sources are distributed per BRC-129.

Sequence Tracking and Retransmission

BRC-131 frames use the same XXH64 hash-chain sequencing as BRC-124:

  • HashKey is computed as XXH64(senderIPv6 ∥ flowIdx ∥ zeroSubtreeID) where flowIdx = 0x0000FFFE for BlockAnnounce and 0x0000FFF8 for CoinbaseTx (see the HashKey field definition).
  • SeqNum is a monotonic per-sender counter for the (HashKey, flowIdx) flow.
  • The proxy stamps both fields in-place if SeqNum == 0 on arrival.
  • Listeners detect gaps by comparing consecutive SeqNum values on the control flow and dispatch BRC-126 NACKs to retry endpoints.
  • Retry endpoints cache BRC-131 frames by HashKey ∥ SeqNum and retransmit to FF0E::B:FFFE on NACK. The retransmit destination is the control group, not the shard group derived from ContentID.

TCP Transport

The read sequence is identical to BRC-124:

  1. Read 44 bytes (sufficient for legacy header or BRC-131 start).
  2. Inspect FrameVer at byte 6.
    • Version 0x04 (BRC-131): read 48 more bytes to complete the 92-byte header; PayLen is at bytes 88–91.
  3. Read exactly PayLen bytes.
  4. Process the complete frame.

Fragmentation (BRC-130 Extension)

When len(Payload) > fragDataSize, the proxy fragments the frame using BRC-130. The OrigFrameVer field at byte 100 of the BRC-130 fragment header is set to 0x04. The MsgType byte is preserved in the BRC-130 fragment's byte 7. Fragment gap tracking uses the (HashKey, flowIdx, zeroSubtreeID) flow identically to BRC-124 fragments.

Block announcements for typical blocks fit well within a 9000-byte jumbo frame (116 + 32 × 128 = 4212 bytes for 128 subtrees). Fragmentation is primarily relevant for large CoinbaseTx payloads.

Error Handling

ConditionUDP BehaviorTCP Behavior
Bad magicSilent dropConnection closed
FrameVer ≠ 0x04Not BRC-131Not BRC-131
Unknown MsgTypeSilent dropConnection closed
Payload length too largeSilent dropConnection closed
Truncated datagramSilent dropConnection closed
SeqNum == 0 at listenerDiscardDiscard

Examples

BlockAnnounce Frame (N=2 subtrees)

// Header (92 bytes)
E3E1F3E8                                                          // Network Magic
02BF                                                              // Protocol Version
04                                                                // Frame Version (BRC-131)
01                                                                // MsgType (BlockAnnounce)
<32-byte block hash>                                              // ContentID
<8-byte HashKey>                                                  // Proxy-stamped XXH64
<8-byte SeqNum>                                                   // Proxy-stamped monotonic
0000000000000000000000000000000000000000000000000000000000000000  // Reserved32
000000B4                                                          // PayloadLen = 180 (116 + 2×32)

// Payload (148 bytes)
<80-byte block header>                                            // BlockHeader
<32-byte coinbase TxID>                                           // CoinbaseTxID
00000002                                                          // SubtreeCount = 2
<32-byte subtree hash 0>                                          // SubtreeHashes[0]
<32-byte subtree hash 1>                                          // SubtreeHashes[1]

CoinbaseTx Frame

// Header (92 bytes)
E3E1F3E8                                                          // Network Magic
02BF                                                              // Protocol Version
04                                                                // Frame Version (BRC-131)
02                                                                // MsgType (CoinbaseTx)
<32-byte CoinbaseTxID>                                            // ContentID = SHA256d(payload)
<8-byte HashKey>                                                  // Proxy-stamped XXH64
<8-byte SeqNum>                                                   // Proxy-stamped monotonic
0000000000000000000000000000000000000000000000000000000000000000  // Reserved32
<4-byte PayloadLen>                                               // Coinbase tx byte count

// Payload
<raw coinbase transaction bytes>

Alignment Verification

FieldOffsetOffset % 8
ContentID80 ✓
HashKey400 ✓
SeqNum480 ✓
Reserved32560 ✓
Payload Length880 ✓
Payload924

Constants Reference

NameValueHexDescription
FrameVerV440x04BRC-131 block control frame version
BlockMsgAnnounce10x01MsgType: block announcement
BlockMsgCoinbase20x02MsgType: coinbase transaction
GroupBlockBroadcast655340xFFFEControl-plane group index for block frames
BlockHeaderSize800x50Standard BSV block header size (bytes)
BlockAnnounceMinPayload1160x74Minimum BlockAnnounce payload (N=0 subtrees)
HeaderSize920x5CBRC-131 header size (identical to BRC-124)

References

Was this helpful?

Search Beersy

Search standards by number, title, author or topic