This repository was archived by the owner on Apr 6, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 333
Add message expiration doc #1605
Merged
Merged
Changes from 6 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
1367722
Add message expiration doc
bradleycamacho 4b1224e
Auto-fix: Update breadcrumbs, spelling dictionary and other automated…
bradleycamacho c24ec58
Implement review
bradleycamacho c64be26
Add missing link
bradleycamacho 7490333
Auto-fix: Update breadcrumbs, spelling dictionary and other automated…
bradleycamacho aefdf2e
Merge branch 'main' into Message-expiration
bradleycamacho dd0209d
Fix flipflopped info
bradleycamacho 070d225
Merge branch 'Message-expiration' of https://github.com/ethereum-opti…
bradleycamacho ac54be7
Auto-fix: Update breadcrumbs, spelling dictionary and other automated…
bradleycamacho fc712c4
Next steps and logs reference
bradleycamacho 97bd758
fix link
bradleycamacho ee8b461
Lint
bradleycamacho 51b3e80
Auto-fix: Update breadcrumbs, spelling dictionary and other automated…
bradleycamacho 2bd4e3e
Add reviews
bradleycamacho 43b0411
Fix callout
bradleycamacho 375f96e
Fix callout
bradleycamacho 198805c
Update reading-logs.mdx
zainbacchus 65dd836
Update message-expiration.mdx
zainbacchus b1ee830
Update message-expiration.mdx
zainbacchus 825519b
Update message-expiration.mdx
zainbacchus 4e1ae12
Update message-expiration.mdx
zainbacchus cafff0f
Spelling fix
bradleycamacho fc29281
Update message-expiration.mdx
zainbacchus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| --- | ||
| title: Message expiration | ||
| description: What message expiration is, why it exists, and how to reemit a previously sent message if it has expired and was never relayed. | ||
| lang: en-US | ||
| content_type: guide | ||
| topic: message-expiration | ||
| personas: | ||
| - protocol-developer | ||
| - chain-operator | ||
| - app-developer | ||
| categories: | ||
| - protocol | ||
| - interoperability | ||
| - cross-chain-messaging | ||
| - security | ||
| - block-safety | ||
| - message-passing | ||
| - reorgs | ||
| - superchain | ||
| is_imported_content: 'false' | ||
| --- | ||
|
|
||
| # Message expiration | ||
|
|
||
| [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 referenced on the destination chain. | ||
|
|
||
| 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. | ||
|
|
||
| ## The expiry window | ||
|
|
||
| The expiry window is an offchain constant, defined by op-supervisor, that defines how long a cross-chain message or event emmitted by a chain remains valid. For any chain in the [interop set](/interop/explainer), messages must be executed within 7 days (604,800 seconds) of the initiating message being sent. | ||
|
bradleycamacho marked this conversation as resolved.
Outdated
|
||
|
|
||
| After this period, a message can no longer be executed on the destination chain unless the event is remitted on the source chain. | ||
|
bradleycamacho marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Reemitting an expired message | ||
|
|
||
| The `resendMessage` function on the [`L2ToL2CrossDomainMessenger`](/interop/message-passing) contract allows developers to reemit a message that was sent but not yet relayed. | ||
|
bradleycamacho marked this conversation as resolved.
|
||
|
|
||
| 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`](https://github.com/ethereum-optimism/optimism/blob/a979a9444dbb482843f2a42f437ced54a8ac1053/packages/contracts-bedrock/interfaces/L2/IL2ToL2CrossDomainMessenger.sol#L110-L128) on the origin chain to reemit the message event. The contract verifies the message hash was originally sent. The call required the following parameters: | ||
|
|
||
| * The origin (of the log entry) is `L2ToL2CrossDomainMessenger` on the other side. | ||
| * The destination chain ID is correct. | ||
| * The target is neither `CrossL2Inbox` nor `L2ToL2CrossDomainMessenger`. | ||
| * This message has not been relayed before. | ||
|
|
||
| This is the reason we need the nonce value, to enable us to send multiple messages that would be otherwise identical. | ||
|
|
||
| 2. [Relay the new message](/interop/message-passing#executing-message) as normal. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.