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 336
Transaction Finality Explainer #987
Merged
Changes from 41 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| { | ||
| "fees": "Transaction Fees", | ||
| "transaction-flow": "Transaction Flow", | ||
| "deposit-flow": "Deposit Flow", | ||
| "withdrawal-flow": "Withdrawal Flow", | ||
| "forced-transaction": "Forced Transaction" | ||
| "fees": "Transaction fees", | ||
| "transaction-flow": "Transaction flow", | ||
| "transaction-finality":"Transaction finality", | ||
| "deposit-flow": "Deposit flow", | ||
| "withdrawal-flow": "Withdrawal flow", | ||
| "forced-transaction": "Forced transaction" | ||
| } |
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,92 @@ | ||
| --- | ||
| title: Transaction Finality | ||
| lang: en-US | ||
| description: Learn about finality in OP Stack and the steps to achieve transaction settlement. | ||
| --- | ||
|
|
||
| import Image from 'next/image' | ||
| import { Callout } from 'nextra/components' | ||
|
|
||
| # Transaction finality | ||
|
|
||
| This guide explains how transaction finality works in the OP Stack and addresses common misconceptions around transaction finality and the Fault Proof System. | ||
|
|
||
| The OP Stack derives its security from Ethereum by utilizing Ethereum's consensus mechanism. Instead of running an entirely separate consensus protocol, the OP Stack derives a layer 2 blockchain by reading the finalized state on Ethereum. | ||
|
|
||
| ## Transaction finality states | ||
|
|
||
| In the OP Stack, transaction finality progresses through three key stages: | ||
|
|
||
| 1. **Unsafe:** The sequencer creates a block containing the transaction, but the transaction data has not yet been posted to Ethereum (L1). The block is circulated within the L2 network for speed. | ||
|
krofax marked this conversation as resolved.
Outdated
|
||
|
|
||
| 2. **Safe:** The batcher posts the transaction data to L1. At this point, any L2 node can derive the transaction. | ||
|
krofax marked this conversation as resolved.
Outdated
|
||
|
|
||
| 3. **Finalized:** Transactions are finalized once more than 65 Ethereum blocks (approximately 10-15 minutes) have passed, ensuring that the L1 data is secure and cannot be reorganized. | ||
|
krofax marked this conversation as resolved.
Outdated
krofax marked this conversation as resolved.
Outdated
|
||
|
|
||
| <Image src="/img/op-stack/protocol/tx-finality.png" alt="Transaction Finality Diagram." width={0} height={0} sizes="100vw" style={{ width: '100%', height: 'auto' }} quality={100} /> | ||
|
|
||
| ### Transaction validity | ||
|
|
||
| When a transaction is submitted to the network, it is either valid or invalid. If the transaction is valid, the sequencer puts it in a block. If it is invalid, the transaction is discarded. There is no way the sequencer can write an invalid transaction to a new block. | ||
|
krofax marked this conversation as resolved.
Outdated
krofax marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Sequencer trust assumptions | ||
|
|
||
| The sequencer operates with the following trust assumptions: | ||
|
|
||
| * It can temporarily withhold transactions. | ||
| * It may attempt to reorder transactions before L1 publication. | ||
| * Once transactions are published on L1, the sequencer cannot modify or censor them. | ||
|
krofax marked this conversation as resolved.
Outdated
|
||
| * The sequencer cannot affect finalized transactions. | ||
|
krofax marked this conversation as resolved.
Outdated
|
||
|
|
||
|
krofax marked this conversation as resolved.
Outdated
|
||
| ## Common misconceptions | ||
|
|
||
| The biggest misconception about transaction finality is that a transaction needs to wait for the entire challenge window to become finalized. | ||
| The reality is the OP Stack transaction finality takes minutes, not over a week. This section explains transaction finality and the Fault Proof System's challenge mechanism. | ||
|
|
||
| ### Reorgs and finality | ||
|
krofax marked this conversation as resolved.
Outdated
|
||
| Once a transaction is included in a finalized Ethereum block, it cannot be reorganized. | ||
|
|
||
| If an Ethereum reorganization (reorg) occurs: | ||
|
krofax marked this conversation as resolved.
Outdated
|
||
|
|
||
| 1. L2 nodes detect the L1 reorg. | ||
| 2. Affected `safe` L2 blocks revert to an `unsafe` status. | ||
| 3. The sequencer typically republishes the same transactions. | ||
| 4. The system returns to a consistent state after reprocessing. | ||
|
|
||
| ### The role of proof system | ||
|
krofax marked this conversation as resolved.
Outdated
|
||
|
|
||
| The Fault Proof System is designed to ensure the accuracy of certain claims about the transaction state on the L2. It provides a way to prove messages from L2 to L1 are correct. It does not have to do with transaction finality. | ||
|
krofax marked this conversation as resolved.
Outdated
|
||
|
|
||
| A claim in the context of OP Stack is a statement asserting the state of the system at a specific block height. For instance, a claim might assert that at block 1,000,000 a certain address has all of the ether on the entire L2. If other participants believe this claim to be incorrect, they can challenge it. | ||
|
|
||
| Challenges focus on proving whether a given claim is valid. The outcome of a challenge does not impact the underlying chain. For example, if a claim about a certain address owning all the ether on the L2 is proven wrong, that address would not be able to move the ether from L2 to their address on L1. | ||
|
|
||
| The challenge period provides time for challenges to be raised and resolved. | ||
| Although OP Stack finalizes transactions quickly (within 20 minutes), the 7-day challenge window serves two critical purposes: | ||
|
|
||
| 1. It allows time to dispute the correctness of output state roots posted to Ethereum by the proposer. | ||
| 2. It provides a security period for withdrawal processing, ensuring the integrity of cross-chain operations. | ||
|
krofax marked this conversation as resolved.
Outdated
krofax marked this conversation as resolved.
Outdated
|
||
|
|
||
| ### Withdrawal delays vs. finality | ||
|
|
||
| One common misconception is confusing withdrawal delays with transaction finality: | ||
|
|
||
| * Transaction finality occurs in approximately 20 minutes. | ||
|
krofax marked this conversation as resolved.
Outdated
|
||
| * Withdrawal delays (often 7 days) are separate from transaction finality. | ||
| * Withdrawal delays are application-level security features. | ||
|
krofax marked this conversation as resolved.
Outdated
|
||
| * These delays affect only L1 withdrawals, not L2 transaction finality. | ||
|
|
||
| ### Bridge independence | ||
|
krofax marked this conversation as resolved.
Outdated
|
||
|
|
||
| Key aspects of bridge systems include: | ||
|
|
||
| * Bridges are application-level constructs. | ||
| * They operate independently of the core OP Stack protocol. | ||
| * Bridge security does not affect the validity of L2 transactions. | ||
| * Bridge failures do not cause L2 reorgs or state changes. | ||
|
|
||
| For example, a custom bridge might be developed to allow ERC-20 tokens to move between layers. However, this bridge is application-level and not native to the OP Stack. If there is an issue with the bridge, such as incorrect proof validation, it does not impact the protocol itself but affects the subjective value of the bridged assets. | ||
|
|
||
| ## Conclusion | ||
|
|
||
| Transaction finality in the OP Stack relies on Ethereum's consensus mechanism. The OP Stack inherits Ethereum's finality guarantees, while the proof system adds a layer of validation for app-level functionality. | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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.