Skip to main content
Messages referenced between OP Stack chains have a limited validity period called the expiry window. Once this window elapses, the referenced message becomes invalid and can no longer be referenced. For messages using L2ToL2CrossDomainMessenger, if a message expires before being referenced, developers can reemit the message on the source chain. This triggers a fresh SentMessage event, enabling the message to be relayed.

The expiry window

The expiry window is an offchain constant, defined by OP-Supervisor, that defines how long a cross-chain message or event emitted remains valid. For any chain in the Superchain interop cluster, messages must be referenced within 7 days (604,800 seconds) of the log being created. After this period, a message can no longer be referenced unless the event is remitted.

Reemitting an expired message

The resendMessage function on the L2ToL2CrossDomainMessenger contract allows developers to reemit a message that was sent but not yet relayed. This emits a new SentMessage log with the same content as the original message, enabling offchain relayers to pick it up again. The process to reemit an expired message:
  1. Call resendMessage on the origin chain to reemit the message event. The contract verifies the message hash was originally sent. The call requires every parameter to rebuild the original message.
  2. Relay the new message as normal.
Note: Re-emitting an already relayed message will have no effect on the destination chain since the re-emitted event won’t be logged by OP-Supervisor.

Next steps