Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
a6ac1ab
Initial commit
krofax Oct 14, 2024
0b36071
updated docs
krofax Oct 14, 2024
10bac65
updated the docs and added image
krofax Oct 14, 2024
2063c26
updated the docs
krofax Oct 14, 2024
880a3eb
fix lint issues
krofax Oct 14, 2024
7cbd715
updated finality docs
krofax Oct 23, 2024
f35ba6c
fix linting errors
krofax Oct 23, 2024
0b66134
fix conflict
krofax Oct 23, 2024
e87c41b
updated few grammar errors
krofax Oct 23, 2024
d1003e6
updated the tones
krofax Oct 23, 2024
5d50382
updated some concepts
krofax Oct 23, 2024
96d6722
removed duplications
krofax Oct 23, 2024
565bc82
Updated structure
krofax Oct 23, 2024
1a136d6
resolved suggestions
krofax Oct 23, 2024
16f6052
fix lint errors
krofax Oct 23, 2024
0139df2
Update pages/stack/transactions/_meta.json
krofax Oct 24, 2024
186d941
Update pages/stack/transactions/_meta.json
krofax Oct 24, 2024
4eced45
Update pages/stack/transactions/_meta.json
krofax Oct 24, 2024
062aa1a
Update pages/stack/transactions/_meta.json
krofax Oct 24, 2024
fc42888
Update pages/stack/transactions/transaction-finality.mdx
krofax Oct 24, 2024
c1ebce7
Update pages/stack/transactions/transaction-finality.mdx
krofax Oct 24, 2024
2b3e7ed
Update pages/stack/transactions/transaction-finality.mdx
krofax Oct 24, 2024
965f8b9
Update pages/stack/transactions/transaction-finality.mdx
krofax Oct 24, 2024
8cf8f59
Update pages/stack/transactions/transaction-finality.mdx
krofax Oct 24, 2024
60e3688
Update pages/stack/transactions/transaction-finality.mdx
krofax Oct 24, 2024
a19a677
Update pages/stack/transactions/transaction-finality.mdx
krofax Oct 24, 2024
6340edd
Update pages/stack/transactions/transaction-finality.mdx
krofax Oct 24, 2024
ce345b5
Update pages/stack/transactions/transaction-finality.mdx
krofax Oct 24, 2024
1d70689
Update pages/stack/transactions/transaction-finality.mdx
krofax Oct 24, 2024
b9acf97
Update pages/stack/transactions/transaction-finality.mdx
krofax Oct 24, 2024
f6f4a38
resolved comments
krofax Oct 24, 2024
376a990
fix conflict
krofax Oct 24, 2024
867fb4c
Update pages/stack/transactions/transaction-finality.mdx
krofax Oct 24, 2024
8a9ecd0
Update pages/stack/transactions/transaction-finality.mdx
krofax Oct 24, 2024
b2cac6a
Update pages/stack/transactions/transaction-finality.mdx
krofax Oct 24, 2024
f5929b5
updated content
krofax Oct 24, 2024
d27bae6
updated the docs
krofax Oct 24, 2024
b71df34
removed wrong word
krofax Oct 24, 2024
aacd64f
resolved comments
krofax Oct 24, 2024
71ea8fc
Used sentence case in meta json file
krofax Oct 24, 2024
d7bec26
Update pages/stack/transactions/transaction-finality.mdx
sbvegan Oct 24, 2024
04bb7e9
Update pages/stack/transactions/transaction-finality.mdx
krofax Oct 24, 2024
e755619
Update pages/stack/transactions/transaction-finality.mdx
krofax Oct 30, 2024
f9a4bb0
updated text
krofax Oct 30, 2024
4513c5c
fix merge conflict
krofax Oct 30, 2024
99abedd
fix merge conflcits
krofax Oct 30, 2024
8c54927
feat: miscellanous improvements to finality doc
smartcontracts Nov 1, 2024
eda6ab7
Removed passive tones, and rephrased contents
krofax Nov 6, 2024
4c88d3a
replaced image with a mermaid diagram
krofax Nov 6, 2024
241c587
update meta.json
krofax Nov 6, 2024
1a13d97
Fix merge conflict
krofax Nov 6, 2024
c8c3d52
updated meta.json
krofax Nov 6, 2024
76396df
Update pages/stack/transactions/transaction-finality.mdx
krofax Nov 7, 2024
47ad29d
Update pages/stack/transactions/transaction-finality.mdx
krofax Nov 7, 2024
71774a7
Update pages/stack/transactions/transaction-finality.mdx
krofax Nov 7, 2024
816ac38
Update pages/stack/transactions/transaction-finality.mdx
krofax Nov 7, 2024
45a3248
Update pages/stack/transactions/transaction-finality.mdx
krofax Nov 7, 2024
1186141
remove todo
krofax Nov 7, 2024
4460b89
Update pages/stack/transactions/transaction-finality.mdx
krofax Nov 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pages/stack/protocol/rollup/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"deposit-flow": "Deposit Flow",
"transaction-flow": "Transaction Flow",
"withdrawal-flow": "Withdrawal Flow",
"transaction-finality": "Transaction Finality ",
"forced-transaction": "Forced Transaction"
}
89 changes: 89 additions & 0 deletions pages/stack/protocol/rollup/finality.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
title: Transaction Finality
lang: en-US
description: Learn about finality in blockchain systems and the steps to achieve transaction settlement.
---

import Image from 'next/image'
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 provides strong guarantees for transaction finality. Here's how it works:

* Time Frame: Under normal network conditions, Ethereum transactions achieve finality in approximately 15 minutes.
* Consensus Cycles: Finality is reached after two [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 transactions in earlier blocks.

This timeframe ensures sufficient block confirmations to protect against reorganizations (reorgs) and guarantees secure settlement.

<Callout type="info">
A reorg occurs when part of the blockchain is replaced, discarding previously confirmed blocks.
</Callout>

## OP Stack Finality

The OP Stack derives its security from Ethereum. Finality occurs when transaction data is posted to Ethereum's Layer 1 (L1) data availability layer. At this point, the rollup state becomes finalized, similar to L1 finality, preventing L2 reorgs.

In OP Stack, transaction finality involves three main stages:

* Unsafe: The L2 sequencer creates a block containing the transaction, but the transaction data has not yet been posted to L1. It is circulated within the L2 network for speed.

* Safe: The sequencer's batcher posts transaction data to L1. Any L2 node can now derive this transaction.

* Finalized: The state is considered finalized once more than (>65) L1 blocks have passed(approximately 10 minutes), ensuring the L1 data is secure and won't be reorganized.

<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} />

<Callout type="info">
Even if an L2 sequencer generates invalid transactions, OP Stack ensures that network nodes will reject them, maintaining consensus and security.
</Callout>

## The Settlement Layer

Ethereum provides a view of the state on an OP Stack chain using the following mechanism:

* Rollup nodes post data to and monitor Ethereum.
* Ethereum processes transactions according to its consensus rules, without requiring knowledge of the L2.
* For L2 to L1 messages (e.g., withdrawals), L2 must prove the validity of its state.

To ensure the finality of an OP Stack chain's state, wait for transaction finalization on L1.

## Sequencer Reliability

While sequencers are centralized, the risk of equivocation (false reporting of block state) is mitigated as follows:

* Sequencers and all L2 nodes must follow consensus rules.
* Invalid transactions are rejected by all network nodes.
* This process mirrors how Ethereum and Bitcoin handle transactions.

The L2 state is considered final once the batch is posted to L1 and enough blocks have passed to prevent a reorg.

## Challenge Period

OP Stack rollups use a 7-day withdrawal challenge period for specific reasons:

* L1 has no direct knowledge of L2.
* For L2 to L1 withdrawals, L1 must verify the withdrawal's validity.
* The 7-day period allows time to dispute withdrawal claims.
* The challenge process uses L2 transaction history to validate withdrawal claims.

If a challenge is successful, meaning the withdrawal claim fails:

* The L2 state remains unaffected.
* There is no L2 reorganization.
* The challenge only affects the specific withdrawal claim.

## Conclusion

It's important to understand transaction finality and the challenge period as distinct concepts:

* The 7-day challenge window ensures the validity of L2 transactions during withdrawals to L1. It is not related to general L2 transaction finality.
* Users can dispute a withdrawal claim by submitting a fraud proof, ensuring invalid withdrawals are caught before finalizing the state on L1.
* A successful challenge impacts only the withdrawal claim and does not affect L2 transaction finality.
* L2 finality occurs within minutes after data is posted to L1 and confirmed by around 65 blocks (\~10 minutes).
* Even if a challenge is successful, it does not cause a reorg or delay L2 transaction finality.
Binary file added public/img/op-stack/protocol/tx-finality.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ therealbytes
Thirdweb
threadcreate
tility
timeframe
timeseries
Tranfer
trustlessly
Expand Down