Skip to content

Commit 98ad68e

Browse files
authored
Merge pull request #1488 from ethereum-optimism/gk/downtime
Update forced-transactions
2 parents 13c1221 + 58d18a4 commit 98ad68e

File tree

1 file changed

+39
-20
lines changed

1 file changed

+39
-20
lines changed

pages/stack/transactions/forced-transaction.mdx

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,24 @@ lang: en-US
44
description: Learn the forced transaction flow during sequencer downtime.
55
---
66

7-
import { Callout } from 'nextra/components'
7+
import { Callout } from "nextra/components"
88

99
## Forced transaction flow
1010

1111
This guide explains the nuances of forced transactions during sequencer downtime.
1212

13-
Users are able to force-include deposit transactions, which can initiate withdrawals, at any time.
13+
In the OP Stack, forced transactions serve as a mechanism to ensure transaction inclusion, even during sequencer downtime.
14+
Users are able to force-include transactions, which can initiate withdrawals, at any time.
1415
However, there are important nuances to understand about the chain derivation pipeline and sequencer behavior.
1516

17+
1618
## Key concepts
1719

1820
* **Sequencing Window**: A 12-hour rolling window to include L2 transactions, including native L2 transactions and deposit transactions.
1921
* **Max Time Drift**: 30 minutes, the maximum delay for including a deposit transaction, relative to the L2 chain.
2022
* **Sequencer Downtime**: Period when the sequencer is offline or not producing blocks.
23+
* **Forced Transactions**: Transactions that users can submit directly to the L1 chain, ensuring their inclusion in the L2 chain without sequencer intervention.
24+
This mechanism is crucial during sequencer downtime.
2125

2226
## Normal operation
2327

@@ -26,29 +30,41 @@ Under normal circumstances:
2630
1. Deposit transactions are included within 30 minutes.
2731
2. The sequencer processes transactions and produces blocks regularly.
2832

29-
## Sequencer downtime scenarios
33+
## Forced transaction mechanism
3034

31-
### Short downtime (< 30 minutes)
35+
1. **Submission to L1:**
36+
Users can send transactions directly to the `OptimismPortal` contract on L1 Ethereum. This bypasses the sequencer, ensuring that the transaction is recorded on L1.
3237

33-
* Deposits are still included within the 30-minute max time drift.
34-
* Regular L2 transactions may be delayed.
38+
2. **Inclusion in L2:**
39+
Once submitted to L1, these transactions are automatically included in the L2 chain. The timing of their inclusion depends on the duration of the sequencer's downtime:
3540

36-
### Extended downtime (30 minutes to 12 hours)
41+
* **Short Downtime (< 30 minutes):**
42+
During short downtime `~ 30 minutes`, transactions may still be included within the usual 30-minute maximum time drift if the sequencer resumes operation within that window.
3743

38-
1. Deposits are force-included within 30 minutes.
39-
2. The L2 chain state remains uncertain until:
40-
* The sequencer comes back online, or
41-
* The 12-hour sequencing window expires.
44+
* **Extended Downtime (30 minutes to 12 hours):**
45+
During sequencer downtimes lasting between 30 minutes and 12 hours:
4246

43-
### Prolonged downtime (> 12 hours)
47+
* Deposit Transactions: Users can submit forced transactions directly to the [`OptimismPortal`](https://github.com/ethereum-optimism/optimism/blob/111f3f3a3a2881899662e53e0f1b2f845b188a38/packages/contracts-bedrock/src/L1/OptimismPortal.sol#L209) contract on L1. However, these transactions will only be included in the L2 chain once the sequencer resumes or the 12-hour sequencing window expires.
48+
Refer to the [Bypassing the Sequencer](/stack/rollup/outages#bypassing-the-sequencer) section for more information about this functionality.
49+
* L2 Chain State: The L2 chain's state remains uncertain until either:
50+
The sequencer resumes operations and processes pending transactions, or
51+
the 12-hour sequencing window expires (after which nodes begin generating blocks deterministically, incorporating only the forced-included deposit transactions).
52+
53+
* **Sequencer Catch-up Phase:**
54+
If the sequencer is offline for more than 30 minutes but less than 12 hours, it enters a **quick catch-up** phase upon restarting.
55+
During this phase:
56+
* The sequencer produces **deposit-only blocks** while moving the L1 origin forward with every block.
57+
* This continues until the L1 origin is back inside the sequencer drift window.
58+
* Normally, L2 blocks are produced at a **6:1 ratio** relative to their L1 origin (12s per L2 block vs. 2s per L1 block). However, during the catch-up phase, this ratio **switches to 1:1**, meaning each L2 block corresponds to a new L1 origin.
4459

45-
1. After 12 hours, nodes start generating blocks deterministically.
46-
2. These blocks only include deposit transactions.
47-
3. When the sequencer returns:
48-
* All deposit transactions are included first.
49-
* No regular L2 transactions are included until the L2 chain is within 12 hours of the chain.
60+
* **Prolonged Downtime (> 12 hours):**
61+
After 12 hours, nodes begin generating blocks deterministically, incorporating only the forced-included transactions. Regular L2 transactions are deferred until the sequencer is back online and has processed enough blocks to be within the last 12 hours of the L1 state.
5062

63+
## Benefits of forced transactions
5164

65+
* **Censorship Resistance:** Users can ensure their transactions are processed even if the sequencer attempts to censor them.
66+
* **Network Resilience:** The network remains operational, allowing critical transactions to proceed during sequencer downtimes.
67+
* **User Autonomy:** Users are not entirely dependent on the sequencer for transaction inclusion, providing an additional layer of trust and reliability.
5268

5369
## Important considerations
5470

@@ -60,14 +76,17 @@ Under normal circumstances:
6076

6177
If a deposit is initiated after the 30-minute mark but before the sequencing window expires:
6278

63-
1. The deposit will be effective when the sequencing window expires (up to ~11 hours later).
79+
1. The deposit will be effective when the sequencing window expires (up to \~11 hours later).
6480
2. Nodes reading data from L1 will produce a block with the deposit after the sequencing window expires.
6581
3. The eventual L2 chain will include the deposit in a block with an onchain timestamp close to the L1 block where the deposit originated.
6682

6783
<Callout type="info">
68-
The sequencing window is a rolling 12-hour delay from when an L1 block is first known. This design allows the sequencer a grace period to come back online without causing L2 chain reorganizations.
84+
The sequencing window is a rolling 12-hour delay from when an L1 block is
85+
first known. This design allows the sequencer a grace period to come back
86+
online without causing L2 chain reorganizations.
6987
</Callout>
7088

7189
## Conclusion
7290

73-
The forced transaction mechanism on OP Stack chains provides a robust way to handle sequencer downtime, ensuring that critical transactions are included in a timely manner. While the 12-hour sequencer window introduces a degree of uncertainty during downtime, the system is designed to guarantee eventual consistency and transaction inclusion.
91+
The forced transaction mechanism on OP Stack chains provides a robust way to handle [sequencer downtime](/stack/rollup/outages#sequencer-downtime-outages), ensuring that critical transactions are included in a timely manner.
92+
While the 12-hour sequencer window introduces a degree of uncertainty during downtime, the system is designed to guarantee eventual consistency and transaction inclusion.

0 commit comments

Comments
 (0)