Skip to content

Commit 1367722

Browse files
Add message expiration doc
1 parent 5ffdbca commit 1367722

File tree

3 files changed

+48
-3
lines changed

3 files changed

+48
-3
lines changed

pages/interop/_meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"explainer": "Superchain interop explainer",
1313
"predeploy": "Superchain interop predeploys",
1414
"message-passing": "Superchain interop message passing",
15+
"message-expiration": "Message expiration",
1516
"reading-logs": "Reading logs",
1617
"op-supervisor": "OP Supervisor",
1718
"superchain-eth-bridge": "Superchain ETH bridge",
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: Message expiration
3+
description: What message expiration is, why it exists, and how to reemit a previously sent message if it has expired and was never relayed.
4+
lang: en-US
5+
content_type: guide
6+
topic: message-expiration
7+
personas:
8+
- protocol-developer
9+
- chain-operator
10+
- app-developer
11+
categories:
12+
- protocol
13+
- interoperability
14+
- cross-chain-messaging
15+
- security
16+
- block-safety
17+
- message-passing
18+
- reorgs
19+
- superchain
20+
is_imported_content: 'false'
21+
---
22+
23+
# Message expiration
24+
25+
[Initiating messages](/interop/message-passing) sent between OP Stack chains have a limited validity period called the expiry window. Once this window elapses, the initiating message becomes invalid and can no longer be executed on the destination chain.
26+
27+
If a message expires before being relayed, developers can reemit the message on the source chain. This triggers a fresh `SentMessage` event, allowing offchain infrastructure to pick it up and relay it again ensuring successful delivery.
28+
29+
## The expiry window
30+
31+
The expiry window is an offchain constant that defines how long a cross-chain message remains valid. For the [Superchain interop cluster](/interop/explainer), messages must be executed within 7 days (604,800 seconds) of the initiating message being sent.
32+
33+
After this period, a message can no longer be executed on the destination chain unless the event is remitted on the source chain.
34+
35+
## Reemitting an expired message
36+
37+
The `resendMessage` function on the [`L2ToL2CrossDomainMessenger`](/interop/message-passing) contract allows developers to reemit a message that was sent but not yet relayed.
38+
39+
This emits a new `SentMessage` log with the same content as the original message, enabling offchain relayers to pick it up again.
40+
41+
The process to reemit an expired message:
42+
43+
1. Call `resendMessage(messageHash)` on the origin chain to reemit the message event. The contract verifies the message hash was originally sent.
44+
2. Relay the new message as normal.

words.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,10 @@ datacap
9191
DATACAP
9292
datadir
9393
DATADIR
94+
devdocs
9495
devnet
9596
Devnet
9697
devnets
97-
Devs
98-
Devdocs
99-
devdocs
10098
Devnets
10199
direnv
102100
disabletxpoolgossip
@@ -334,6 +332,8 @@ quicknode
334332
Quicknode
335333
quickstarts
336334
rebalancing
335+
reemit
336+
Reemitting
337337
regenesis
338338
Regenesis
339339
Reimagine

0 commit comments

Comments
 (0)