Transaction Lifecycle

The transaction flow for cross-chain message transmission involves three key components: Gateway, Executor, and GMP Receiver.
Source Chain
- Message Initiation: A user or contract on the source chain calls the submitMessage() function on the
IGatewayinterface, providing:- Destination address
- Destination network ID
- Execution gas limit
- Message payload data
- Message Processing: The Gateway:
- Calculates the gas cost using estimateMessageCost()
- Generates a unique message ID (EIP-712 hash)
- Assigns a sequential
nonceto ensure uniqueness - Emits a GmpCreated event with all message details
- Returns the message ID to the caller
Cross-Chain Transmission
- Message Relay: Behind the scenes, the message is picked up by the Timechain:
- The message details are observed by Timechain shards (Chronicle Nodes)
- Shards validate and sign the message using signatures
- The Timechain prepares the message for delivery to the destination chain
Destination Chain
-
Message Execution: On the destination chain, the
IExecutorinterface:- Receives the signed message via
executeorbatchExecute()with a signature andInboundMessage - Verifies the signature against registered shards (TSS keys)
- Processes the message according to registered routes
- Forwards the message to the appropriate destination address
- Receives the signed message via
-
Message Receipt: The destination contract (implementing IGmpReceiver):
- Receives the message via onGmpReceived() function
- Validates that the caller is the authorized Gateway contract
- Processes the message payload
- Returns a 32-byte result
-
Execution Confirmation: The Executor:
- Captures the execution result
- Updates the message status
- Emits a GmpExecuted event with the message ID, source, destination, status, and result
- Emits a BatchExecuted event for the batch containing the message