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 335
Transaction Finality Explainer #987
Merged
Changes from 2 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 |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| --- | ||
| title: Transaction Finality | ||
| lang: en-US | ||
| description: Learn the concept of finality in blockchain systems and the steps involved in achieving transaction settlement. | ||
| --- | ||
|
|
||
| import { Callout } from 'nextra/components' | ||
|
|
||
| # Transaction Finality | ||
|
|
||
| Transaction finality refers to the point at which a transaction is considered irreversible and is permanently recorded on the blockchain. | ||
|
|
||
| ## Finality on Ethereum | ||
|
|
||
| Ethereum is designed to provide strong transaction finality guarantees. Here's how it works: | ||
|
|
||
| * Time Frame: Under typical network conditions, transactions on Ethereum achieves finality in about 15 minutes. | ||
| * Consensus Cycles: This finality period is reached after 2 [epochs](https://info.etherscan.com/epoch-in-ethereum/) | ||
| * Block Confirmations: During this time, multiple blocks are added to the chain, each providing additional confirmation of the transactions in previous blocks. | ||
|
|
||
| This timeframe ensures enough block confirmations to safeguard against reorgs and guarantees secure settlement of transactions. | ||
|
|
||
| <Callout type="info"> | ||
| Reorg refers to a situation where part of the blockchain is replaced, discarding previously confirmed blocks. | ||
| </Callout> | ||
|
|
||
| ## OP Stack Finality | ||
|
|
||
| OP Stack derive security from Ethereum. Finality occurs when transaction data is posted to Ethereum's data availability (DA) layer, i.e., **Layer 1 (L1)**. | ||
| At this point, the state of the rollup becomes finalized, similar to L1 transaction finality, preventing reorgs at the L2 level. | ||
|
|
||
| In OP Stack, transaction finality involves three main stages: | ||
|
|
||
| * Unsafe: The L2 sequencer creates a block containing the transaction, but the transaction data hasn't been posted to L1 yet. It's circulated to the L2 network for speed. | ||
|
|
||
| * Safe: The sequencer's batcher posts transaction data to L1. Any L2 node can now derive this transaction. | ||
|
|
||
| * Finalized: Same as safe, but enough L1 blocks (>65) have passed to ensure the L1 data won't be reorged. This prevents L1 reorgs from affecting the rollup's state and transaction history. | ||
|
|
||
| <Callout type="info"> | ||
| The OP Stack ensures that even if an L2 sequencer produces invalid transactions, the network nodes will reject them, maintaining consensus and security. | ||
| </Callout> | ||
|
|
||
| ## The Settlement Layer | ||
|
|
||
| This mechanism allows Ethereum to establish a view of the state on an OP Stack chain: | ||
|
|
||
| * Rollup nodes post data to and monitor Ethereum. | ||
| * Ethereum processes transactions based on its consensus rules, without knowledge of the L2. | ||
| * For L2 to L1 messages (usually withdrawals), the L2 must prove its state's validity. | ||
|
|
||
| To ensure the finality of an OP Stack chain's state, wait for transaction finalization on L1. | ||
|
|
||
| ## Sequencer Reliability | ||
|
|
||
| Sequencers are centralized, raising concerns about potential equivocation (lying about block state). However: | ||
|
|
||
| * Sequencers and all L2 nodes must follow consensus rules. | ||
| * Invalid transactions are rejected by all network nodes. | ||
| * This process is similar to how Ethereum and Bitcoin handle transactions. | ||
|
|
||
| The L2 state is considered final once a batch is posted to L1 and enough blocks have passed to prevent reorgs. | ||
|
|
||
| ## Challenge Period | ||
|
|
||
| OP Stack rollups use a 7-day withdrawal challenge period for a specific reason: | ||
|
|
||
| * L1 has no inherent knowledge of L2. | ||
| * For L2 to L1 withdrawals, L1 needs to verify the withdrawal's validity. | ||
| * The 7-day period allows time to dispute withdrawal claims. | ||
| * The challenge process uses L2 transaction history to verify claim validity. | ||
|
|
||
| A successful challenge (a failed withdrawal claim): | ||
|
|
||
| * Doesn't impact the L2 state. | ||
| * Doesn't cause an L2 reorg. | ||
| * Only determines the validity of the specific withdrawal claim. | ||
|
|
||
| <Callout type="info"> | ||
| It's important to understand transaction finality and the challenge period as distinct concepts: | ||
|
|
||
| * The 7-day challenge period verifies the validity of L2 transactions during withdrawals to L1. It does not apply to general L2 transaction finality. | ||
| * Users can dispute a withdrawal claim by submitting a fraud proof. This ensures invalid withdrawals are identified before the state is finalized on L1. | ||
| * A successful challenge impacts only the withdrawal claim and does not delay L2 transaction finality. | ||
| * L2 transaction finality is achieved within minutes after data is posted on L1 and confirmed by approximately 65 blocks (\~10 minutes). | ||
| * Even if a challenge is successful, it does not cause a reorg or affect transaction finality on the L2. | ||
| </Callout> | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -355,6 +355,7 @@ therealbytes | |
| Thirdweb | ||
| threadcreate | ||
| tility | ||
| timeframe | ||
| timeseries | ||
| Tranfer | ||
| trustlessly | ||
|
|
||
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.