-
Notifications
You must be signed in to change notification settings - Fork 265
Transaction Finality Explainer #987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
a6ac1ab
Initial commit
krofax 0b36071
updated docs
krofax 10bac65
updated the docs and added image
krofax 2063c26
updated the docs
krofax 880a3eb
fix lint issues
krofax 7cbd715
updated finality docs
krofax f35ba6c
fix linting errors
krofax 0b66134
fix conflict
krofax e87c41b
updated few grammar errors
krofax d1003e6
updated the tones
krofax 5d50382
updated some concepts
krofax 96d6722
removed duplications
krofax 565bc82
Updated structure
krofax 1a136d6
resolved suggestions
krofax 16f6052
fix lint errors
krofax 0139df2
Update pages/stack/transactions/_meta.json
krofax 186d941
Update pages/stack/transactions/_meta.json
krofax 4eced45
Update pages/stack/transactions/_meta.json
krofax 062aa1a
Update pages/stack/transactions/_meta.json
krofax fc42888
Update pages/stack/transactions/transaction-finality.mdx
krofax c1ebce7
Update pages/stack/transactions/transaction-finality.mdx
krofax 2b3e7ed
Update pages/stack/transactions/transaction-finality.mdx
krofax 965f8b9
Update pages/stack/transactions/transaction-finality.mdx
krofax 8cf8f59
Update pages/stack/transactions/transaction-finality.mdx
krofax 60e3688
Update pages/stack/transactions/transaction-finality.mdx
krofax a19a677
Update pages/stack/transactions/transaction-finality.mdx
krofax 6340edd
Update pages/stack/transactions/transaction-finality.mdx
krofax ce345b5
Update pages/stack/transactions/transaction-finality.mdx
krofax 1d70689
Update pages/stack/transactions/transaction-finality.mdx
krofax b9acf97
Update pages/stack/transactions/transaction-finality.mdx
krofax f6f4a38
resolved comments
krofax 376a990
fix conflict
krofax 867fb4c
Update pages/stack/transactions/transaction-finality.mdx
krofax 8a9ecd0
Update pages/stack/transactions/transaction-finality.mdx
krofax b2cac6a
Update pages/stack/transactions/transaction-finality.mdx
krofax f5929b5
updated content
krofax d27bae6
updated the docs
krofax b71df34
removed wrong word
krofax aacd64f
resolved comments
krofax 71ea8fc
Used sentence case in meta json file
krofax d7bec26
Update pages/stack/transactions/transaction-finality.mdx
sbvegan 04bb7e9
Update pages/stack/transactions/transaction-finality.mdx
krofax e755619
Update pages/stack/transactions/transaction-finality.mdx
krofax f9a4bb0
updated text
krofax 4513c5c
fix merge conflict
krofax 99abedd
fix merge conflcits
krofax 8c54927
feat: miscellanous improvements to finality doc
smartcontracts eda6ab7
Removed passive tones, and rephrased contents
krofax 4c88d3a
replaced image with a mermaid diagram
krofax 241c587
update meta.json
krofax 1a13d97
Fix merge conflict
krofax c8c3d52
updated meta.json
krofax 76396df
Update pages/stack/transactions/transaction-finality.mdx
krofax 47ad29d
Update pages/stack/transactions/transaction-finality.mdx
krofax 71774a7
Update pages/stack/transactions/transaction-finality.mdx
krofax 816ac38
Update pages/stack/transactions/transaction-finality.mdx
krofax 45a3248
Update pages/stack/transactions/transaction-finality.mdx
krofax 1186141
remove todo
krofax 4460b89
Update pages/stack/transactions/transaction-finality.mdx
krofax 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
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,85 @@ | ||
--- | ||
title: Transaction finality | ||
lang: en-US | ||
description: Learn when transactions on OP Stack chains can be considered finalized. | ||
--- | ||
|
||
import Image from 'next/image' | ||
import { Callout } from 'nextra/components' | ||
|
||
# Transaction finality | ||
|
||
This guide explains when transactions on OP Stack chains are considered finalized and addresses common misconceptions about transaction finality on the OP Stack. | ||
|
||
## Basics of finality | ||
|
||
Transaction finality refers to the point at which a transaction becomes irreversible under certain assumptions. For example, Ethereum transactions are considered finalized when specific conditions in Ethereum's consensus mechanism are met. Many applications built on Ethereum rely on this property when making decisions, such as crediting a user's account after they deposit funds. | ||
|
||
## OP Stack finality | ||
|
||
OP Stack chains in the standard configuration are Rollups that use Ethereum's consensus mechanism to order and finalize transactions rather than running a separate consensus protocol. Therefore, OP Stack chains inherit Ethereum's ordering and finality properties. | ||
|
||
## Steps to finality | ||
|
||
Transactions on OP Stack chains go through the following process to reach finality: | ||
|
||
1. A user submits a transaction to the network, which forwards it to the Sequencer. | ||
2. The Sequencer includes the transaction in a block and distributes it over a public peer-to-peer network. At this point, the transaction is considered **"unsafe"**, a technical term indicating that the transaction is in a block but its data has not yet been posted to Ethereum. This process typically takes a few seconds from transaction submission. | ||
3. The Sequencer publishes this block's data to Ethereum, either as [blob data](https://www.eip4844.com/) or as calldata attached to a standard Ethereum transaction. Once included in an Ethereum block, the transaction is considered **"safe"**. This step usually takes 5–10 minutes from transaction submission. | ||
4. The Ethereum block containing the Sequencer's transaction is finalized. At this point, the transaction reaches a **"finalized"** state. Ethereum finalization typically takes about 2 epochs (approximately 12.8 minutes from transaction submission) under normal network conditions, but may take longer during adverse conditions. Finality depends entirely on [Ethereum's consensus mechanism](https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/#finality). | ||
|
||
```mermaid | ||
|
||
sequenceDiagram | ||
participant User | ||
participant Network | ||
participant Sequencer | ||
participant Ethereum | ||
|
||
User->>Network: Submit transaction | ||
Network->>Sequencer: Forward transaction | ||
Sequencer->>Sequencer: Include transaction in block | ||
Sequencer->>Network: Distribute block over P2P network | ||
Note right of Sequencer: Transaction status: "unsafe"<br>(block data not yet posted to Ethereum)<br>~a few seconds | ||
|
||
Sequencer->>Ethereum: Publish block data (as blob data<br>or calldata) | ||
Note right of Ethereum: Transaction status: "safe"<br>(included in Ethereum block)<br>~5–10 minutes | ||
|
||
Ethereum->>Ethereum: Finalize block (~65 blocks or ~13 mins) | ||
Note right of Ethereum: Transaction status: "finalized"<br>~13 minutes (may vary) | ||
|
||
|
||
``` | ||
krofax marked this conversation as resolved.
Show resolved
Hide resolved
|
||
## Common misconceptions | ||
|
||
### Transactions take 7 days to finalize | ||
|
||
A common misconception is that transactions on OP Stack chains take 7 days to finalize. **This is incorrect.** Transactions on OP Stack chains become finalized when their data is included in a finalized Ethereum block, typically around 20–30 minutes after submission. To reorg a finalized OP Stack chain transaction, a reorg of the corresponding Ethereum block would be required. | ||
|
||
This misconception often arises due to the OP Stack's Standard Bridge, which includes a 7-day delay on *withdrawals* of ETH and ERC-20 tokens. Withdrawing tokens from an OP Stack chain to Ethereum using the Standard Bridge requires a minimum 7-day wait. This delay affects only withdrawals through the Standard Bridge and does not impact transaction finality on the OP Stack chain. | ||
krofax marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Challenges in the Standard Bridge can cause a chain reorg | ||
krofax marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Another misconception related to the belief that [finalization takes 7 days](#misconception-transactions-take-7-days-to-finalize) is that **Fault Proof challenges** created in response to withdrawals in the Standard Bridge can reorganize the OP Stack chain. **This is incorrect.** OP Stack transactions are not reorganized in response to Fault Proof challenges. | ||
|
||
The [Standard Bridge](/builders/app-developers/bridging/standard-bridge) is a bridge application that is included by default with any OP Stack chain and connects the chain to its "parent" blockchain (usually Ethereum). It offers a high level of security for ETH and ERC-20 tokens moved through the bridge. | ||
|
||
When using the Standard Bridge, users who send ETH or ERC-20 tokens to Ethereum must first burn those tokens on the OP Stack chain and then create a **withdrawal claim** on Ethereum. | ||
|
||
Because the Standard Bridge cannot immediately verify withdrawal claims, it delays the claim by 7 days to allow the OP Stack Fault Proof system to filter out any invalid claims. Challenges only remove bad claims without affecting the Standard Bridge or the OP Stack chain. | ||
|
||
### The Sequencer can always reorg the chain | ||
|
||
A common misconception is that the Sequencer can trigger reorganizations of the OP Stack chain at any time. However, while the Sequencer can reorganize **"unsafe"** blocks (not yet published to Ethereum), reorganizations become more challenging once blocks are **"safe"** and become effectively impossible once blocks are **"finalized."** | ||
|
||
* **Unsafe blocks:** The Sequencer can reorganize these blocks (typically within \~5–10 minutes). | ||
* **Safe blocks:** The Sequencer would need to trigger a reorg on Ethereum itself, which is complex and unlikely. | ||
* **Finalized blocks:** Once blocks are included in a finalized Ethereum block (typically after \~15–30 minutes), the Sequencer cannot reorganize them without compromising Ethereum's finality guarantees. | ||
krofax marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Ethereum reorgs cause OP Stack chain reorgs | ||
|
||
If Ethereum experiences a reorg, OP Stack chains will attempt a graceful recovery. OP Stack nodes will downgrade **"safe"** transactions to **"unsafe"** if needed, while the Sequencer republishes transaction data to maintain chain continuity. Although extreme Ethereum network conditions could potentially affect the OP Stack chain, **"finalized"** OP Stack transactions are protected from reorgs. | ||
|
||
## Conclusion | ||
|
||
Transaction finality on the OP Stack is simpler than it may seem. OP Stack chains inherit Ethereum's finality guarantees, so once a transaction is **"finalized,"** it cannot be reversed. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.