RelayMessage
Purpose
A RelayMessage is used to relay an encrypted EngineMessage via multiple routing hops.
It is sent between two nodes and encapsulates either an EngineMessage or another RelayMessage.
Type
Reception:
RelayMessageV1
Record with fields:
Source Node ID
Destination Node ID
Transport preferences for outgoing messages
Expiry time for outgoing messages
Encrypted and padded EngineMessageV1 or RelayMessageV1
Signature over the above fields by src
Triggers:
EngineMessage
Behaviour
When the router receives a RelayMessage
from a remote node via the Transport engine,
it processes it the following way:
- It checks whether it is configured to allow relaying
either from the source node or to the destination node.
- If not, it drop the message
- It decrypts the contained EngineMessage or RelayMessage, and processes it.
Message flow
sequenceDiagram
%% --8<-- [start:sequence]
Router -) Router: RelayMessage
Router -) Router: EngineMessage
%% --8<-- [end:sequence]
(Wiki) links on this page