From c444a6ee346c77f1fa5e1e4fda9fd9ab177ec2b7 Mon Sep 17 00:00:00 2001 From: Teodor Calin Date: Sun, 21 Jun 2026 04:22:29 +0300 Subject: [PATCH] protocol: add extended-discovery beacon message types (0x08/0x09) --- protocol/header.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/protocol/header.go b/protocol/header.go index 31aac7d..b3c1835 100644 --- a/protocol/header.go +++ b/protocol/header.go @@ -85,4 +85,14 @@ const ( BeaconMsgRelay byte = 0x05 BeaconMsgRelayDeliver byte = 0x06 BeaconMsgSync byte = 0x07 // gossip: beacon-to-beacon node list exchange + + // Extended discovery for endpoints that cannot infer a relayed frame's + // destination implicitly. A standard endpoint owns a single node id, so + // BeaconMsgRelayDeliver (0x06 = [0x06][srcNodeID(4)][frame]) carries no + // destination. An endpoint registered via BeaconMsgDiscoverEx (same wire + // shape as BeaconMsgDiscover: [0x08][nodeID(4)]) instead receives + // BeaconMsgRelayDeliverDest = [0x09][srcNodeID(4)][destNodeID(4)][frame...]. + // Opt-in: endpoints registered with 0x01 keep receiving 0x06. + BeaconMsgDiscoverEx byte = 0x08 + BeaconMsgRelayDeliverDest byte = 0x09 )