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 41 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
11 changes: 6 additions & 5 deletions pages/stack/transactions/_meta.json
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"
}
92 changes: 92 additions & 0 deletions pages/stack/transactions/transaction-finality.mdx
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.

Comment thread
krofax marked this conversation as resolved.
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.
Comment thread
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.
Comment thread
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.
Comment thread
krofax marked this conversation as resolved.
Outdated
Comment thread
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.
Comment thread
krofax marked this conversation as resolved.
Outdated
Comment thread
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.
Comment thread
krofax marked this conversation as resolved.
Outdated
* The sequencer cannot affect finalized transactions.
Comment thread
krofax marked this conversation as resolved.
Outdated

Comment thread
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
Comment thread
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:
Comment thread
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
Comment thread
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.
Comment thread
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.
Comment thread
krofax marked this conversation as resolved.
Outdated
Comment thread
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.
Comment thread
krofax marked this conversation as resolved.
Outdated
* Withdrawal delays (often 7 days) are separate from transaction finality.
* Withdrawal delays are application-level security features.
Comment thread
krofax marked this conversation as resolved.
Outdated
* These delays affect only L1 withdrawals, not L2 transaction finality.

### Bridge independence
Comment thread
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.
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.
5 changes: 2 additions & 3 deletions words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Arweave
authrpc
Badgeholder's
Badgeholders
badgeholders
basefee
BGEZ
BGTZ
Expand Down Expand Up @@ -169,7 +170,6 @@ leveldb
lightkdf
logfile
logfmt
marketshare
MAXAGE
maxage
MAXBACKUPS
Expand Down Expand Up @@ -204,7 +204,6 @@ MTHI
MTLO
MULT
multiaddr
Multichain
multichain
multiclient
multisigs
Expand Down Expand Up @@ -303,7 +302,7 @@ replayability
reproven
REQUIREDBLOCKS
requiredblocks
Rollouts
rollouts
Rollups
rollups
Routescan
Expand Down