$$ \newcommand \Tag {\mathrm{tag}} \newcommand \MessageHandler {\mathrm{MH}} \newcommand \ForwardingPolicy {\mathrm{ForwardingPolicy}} \newcommand \InMsg {\ast\texttt{M}} \newcommand \OutMsg {\texttt{M}\ast} $$
Message Handlers
Each incoming message \( \InMsg \) is deferred to the correct message handler \( \MessageHandler_t(\InMsg) \) given its protocol \( tag \) (\( t \)).
The message handler then processes the message and decides on a \( \ForwardingPolicy \) (see the definition of this data type for further details).
A message handler \( \MessageHandler_t(\InMsg) \) contains the logic for handling incoming messages.
The following is the list of registered message handlers defined in the reference implementation, ordered by \( tag \):
-
AV
for Agreement Vote: -
MI
for Message of Interest: -
MS
for Message Digest Skip: -
NP
for Net Priority Response: -
NI
for Network ID Verification: -
PP
for Proposal Payload: -
SP
for State Proof Signature: -
TS
for Topic Message Response: -
TX
for Transaction: -
UE
for Unicast Catchup Request: -
VB
for Vote Bundle: -
Unrecognized Tag case (a special tag value to account for transmission errors or adversarial behavior):
In general, after a preliminary validation and a series of computations, the produced output is an outgoing message \( \OutMsg \).
Internally, \( \MessageHandler_t(\InMsg) \) routes data to the corresponding component of the node (e.g., “Agreement” for protocol messages, “Transaction Pool” for transactions, etc.).
Refer to the normative section of each node component to see how these messages are processed and their impact on the node’s overarching state.
⚙️ IMPLEMENTATION
In the reference implementation, a single entry point callback
Notify()
is used to monitor an outgoing connection whenever a message is received. This function then sends the message metadata to the appropriate processing stage of thePerformanceMonitor
.Usage in Relay Network.
Usage in P2P Network.