Beersy
BRC-127

Multicast Subtree Group Announcement Frame Format

A receiver has to know which network group carries the slice of traffic it wants before it can subscribe. This has senders announce that mapping periodically, so a listener can join without being told out of band.

Jeff Harrischanged 30 Jul 20265 min read
assemblerlistenerlistenerlistener

Summary

Why
identifiers change with every new block candidate, so listeners have no stable way to filter incoming transaction traffic by logical category without constant reconfiguration.
What
BRC-127 defines a periodic 64-byte multicast datagram that maps short-lived BRC-124 subtree identifiers to stable 128-bit group identifiers so listeners can filter transaction traffic by group.
How
A block assembler periodically sends one 64-byte datagram per subtree-to-group pairing over a reserved multicast address, and listeners join that address, record each pairing with an expiry time, and use the resulting registry to decide whether to accept incoming transaction frames.

What this lets you do

  • Subscribe to a logical group of transactions instead of a raw subtree id
  • Filter incoming transaction frames by group membership without static config
  • Let entries expire automatically so stale subtrees stop matching
  • Assign group ids yourself or derive them with XXH3-128 from a name
  • Restrict which senders' announcements a listener trusts

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-127 accurately, including what it depends on.

The specification

Abstract

This BRC specifies a periodic multicast announcement protocol that maps BRC-124 SubtreeID values to stable 128-bit group identifiers. Senders broadcast compact 64-byte datagrams on a reserved control-plane multicast group, allowing listeners to dynamically learn which IDs belong to which groups and filter incoming transaction traffic accordingly — without static configuration.

This BRC is licensed under the Open BSV License.

Motivation

BRC-124 frames carry a 32-byte SubtreeID that identifies the transaction subtree to which each frame belongs. Subtree IDs are derived deterministically by each block assembler and change with every new work candidate. Static subtree ID lists are impractical for listeners that want to subscribe to a logical class of transactions (a subtree group) across block boundaries.

This BRC introduces:

  1. Subtree groups — stable 128-bit identifiers that logically group related subtree IDs. A group ID is an XXH3-128 hash of a canonical group name, or any operator-assigned 128-bit value.
  2. — a periodic 64-byte control datagram sent by block assemblers announcing that a given SubtreeID is a member of a given group.
  3. Dynamic listener filtering — listeners join a dedicated control-plane multicast group, process SubtreeGroupAnnounce datagrams, maintain a time-bounded registry, and pass transactions based on group membership.

Subtrees are temporal: they are valid only for the duration of a work candidate. Announcements are sent periodically; entries not refreshed within their TTL are evicted automatically.

Specification

Control-Plane Group

SubtreeGroupAnnounce datagrams are sent to the reserved control-plane multicast group index 0xFFFC (GroupSubtreeGroupAnnounce), one slot below the BRC-126 beacon group (0xFFFD).

Control-plane addresses use the IANA-aligned layout: bytes 0–1 carry the scope prefix, bytes 2–11 are zero (IANA 96-bit boundary), bytes 12–13 carry the IANA Bitcoin group-id (0x000B), and bytes 14–15 carry the group index.

ScopeAnnounce Group
Site (0x05)FF05::B:FFFC
Org (0x08)FF08::B:FFFC
Global (0x0E)FF0E::B:FFFC

Operators MAY override the IANA group-id (0x000B) via the -mc-group-id configuration flag for private deployments; the resulting addresses change accordingly.

Announce-group addresses are shown in (FF0x) form; under SSM, substitute the FF3x prefix per BRC-129 (FF3E::B:FFFC for inter-domain scope, which is SSM-only per RFC 8815). The datagram format is unchanged. This is a control-plane group whose source — the announcing block assembler — is not discoverable from within the group, so SSM listeners (S,G)-join using the bootstrap source lists defined in BRC-129; these are the same source addresses a listener may configure in the include filter (see Sender Filtering).

SubtreeGroupAnnounce Wire Format (MsgType 0x30) — 64 bytes

OffsetSizeFieldDescription
04Network Magic0xE3E1F3E8 (BSV mainnet P2P magic)
42Protocol Ver0x02BF (703, BSV large-block baseline)
61MsgType0x30 (SubtreeGroupAnnounce)
71FlagsReserved; must be 0x00
832SHA-256 subtree root hash (from BRC-124 frame header)
4016128-bit group identifier, big-endian
564Unix timestamp (uint32 BE) when this announcement was created
602TTLValidity in seconds (uint16 BE); 0 = use listener default
622ReservedMust be 0x0000

Total: 64 bytes. Power-of-two message size; GroupID at offset 40 is 8-byte aligned.

Flags (byte 7)

All bits are reserved and must be zero. Future versions of this protocol may define flag bits.

GroupID

A GroupID is a 128-bit value uniquely identifying a logical subtree group. It is recommended to derive GroupIDs using XXH3-128 applied to a canonical group name string, as this provides hardware-accelerated, collision-resistant derivation. GroupIDs may also be assigned directly as opaque 128-bit values.

TTL and Expiry

A TTL value of 0 instructs the listener to apply its locally configured default TTL. Listeners SHOULD set the default TTL to at least 900 seconds (15 minutes) to accommodate block creation intervals. Senders SHOULD re-announce each (SubtreeID, GroupID) pair at an interval well below the effective TTL (recommended: every 10–30 seconds).

Multi-Group Membership

A single SubtreeID may belong to multiple groups. The sender emits one SubtreeGroupAnnounce datagram per (SubtreeID, GroupID) pair per announcement interval.

Sender Behaviour

  1. For each (SubtreeID, GroupID) pair, construct a 64-byte SubtreeGroupAnnounce datagram.
  2. Send the datagram as a UDP packet to the SubtreeGroupAnnounce control group on the configured multicast scope(s).
  3. Repeat at the configured announcement interval (recommended: 10–30 seconds).
  4. On work reset (new block), stop announcing old SubtreeIDs. Listeners will evict them when the TTL expires.

No retransmission or sequencing is required. Periodic re-announcement provides eventual consistency.

Listener Behaviour

  1. Join the SubtreeGroupAnnounce control-plane multicast group on the configured scope(s).
  2. For each received datagram, validate the magic, ProtoVer, MsgType, and length.
  3. If a sender include/exclude filter is configured, check the UDP source address before processing.
  4. If the GroupID matches a subscribed group, record (SubtreeID → expiry) in the group registry.
  5. Periodically evict entries whose expiry has passed.
  6. On data-plane frame receipt, allow the frame if its SubtreeID is present in any subscribed group's registry.

Sender Filtering

Listeners MAY configure include and exclude filters on announcement source addresses (IPv6 addresses or CIDR prefixes). The evaluation order is: exclude first, then include. An empty include list accepts all non-excluded sources.


Example

SubtreeGroupAnnounce for SubtreeID A3F1...9247, GroupID A1B2C3D4E5F6A7B8C9D0E1F2A3B4C5D6, Epoch 1746800000, TTL 0 (use listener default):

E3E1F3E8                                  // Network Magic
02BF                                      // Protocol Version
30                                        // MsgType = SubtreeGroupAnnounce
00                                        // Flags = 0
A3F1E8B04C7D2A9156E3F08B4D7C2E9A          // SubtreeID bytes 0–15
1B5F3D8E6C0A4279B1D5E8F3C6A09247          // SubtreeID bytes 16–31
A1B2C3D4E5F6A7B8C9D0E1F2A3B4C5D6          // GroupID (128-bit)
67E27D80                                  // Epoch = 1746800000
0000                                      // TTL = 0 (use listener default)
0000                                      // Reserved

Constants Reference

NameValueHexDescription
MagicBSV38232360720xE3E1F3E8BSV mainnet P2P magic
ProtoVer7030x02BFProtocol version
MsgTypeSubtreeGroupAnnounce480x30SubtreeGroupAnnounce datagram type
GroupSubtreeGroupAnnounce655320xFFFCControl-plane subtree group announce group
GroupBeacon655330xFFFDControl-plane beacon group (BRC-126)
SubtreeGroupAnnounceSize64Fixed datagram size in bytes
DefaultAnnounceTTL900Recommended listener default TTL (s)
DefaultAnnounceInterval10Recommended sender re-announce interval (s)

References

Was this helpful?

Search Beersy

Search standards by number, title, author or topic