You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/stack/transactions/forced-transaction.mdx
+39-20Lines changed: 39 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,20 +4,24 @@ lang: en-US
4
4
description: Learn the forced transaction flow during sequencer downtime.
5
5
---
6
6
7
-
import { Callout } from'nextra/components'
7
+
import { Callout } from"nextra/components"
8
8
9
9
## Forced transaction flow
10
10
11
11
This guide explains the nuances of forced transactions during sequencer downtime.
12
12
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.
14
15
However, there are important nuances to understand about the chain derivation pipeline and sequencer behavior.
15
16
17
+
16
18
## Key concepts
17
19
18
20
***Sequencing Window**: A 12-hour rolling window to include L2 transactions, including native L2 transactions and deposit transactions.
19
21
***Max Time Drift**: 30 minutes, the maximum delay for including a deposit transaction, relative to the L2 chain.
20
22
***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.
21
25
22
26
## Normal operation
23
27
@@ -26,29 +30,41 @@ Under normal circumstances:
26
30
1. Deposit transactions are included within 30 minutes.
27
31
2. The sequencer processes transactions and produces blocks regularly.
28
32
29
-
## Sequencer downtime scenarios
33
+
## Forced transaction mechanism
30
34
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.
32
37
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:
35
40
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.
37
43
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:
42
46
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.
44
59
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.
50
62
63
+
## Benefits of forced transactions
51
64
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.
52
68
53
69
## Important considerations
54
70
@@ -60,14 +76,17 @@ Under normal circumstances:
60
76
61
77
If a deposit is initiated after the 30-minute mark but before the sequencing window expires:
62
78
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).
64
80
2. Nodes reading data from L1 will produce a block with the deposit after the sequencing window expires.
65
81
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.
66
82
67
83
<Callouttype="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.
69
87
</Callout>
70
88
71
89
## Conclusion
72
90
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