|
| 1 | +--- |
| 2 | +title: Forced Transaction |
| 3 | +lang: en-US |
| 4 | +description: Learn the forced transaction flow during sequencer downtime. |
| 5 | +--- |
| 6 | + |
| 7 | +import { Callout } from 'nextra/components' |
| 8 | + |
| 9 | +## Forced Transaction Flow |
| 10 | + |
| 11 | +This guide explains the nuances of forced transactions during sequencer downtime. |
| 12 | + |
| 13 | +Users are able to force-include deposit transactions, which can initiate withdrawals, at any time. |
| 14 | +However, there are important nuances to understand about the chain derivation pipeline and sequencer behavior. |
| 15 | + |
| 16 | +## Key Concepts |
| 17 | + |
| 18 | +* **Sequencing Window**: A 12-hour rolling window to include L2 transactions, including native L2 transactions and deposit transactions. |
| 19 | +* **Max Time Drift**: 30 minutes, the maximum delay for including a deposit transaction, relative to the L2 chain. |
| 20 | +* **Sequencer Downtime**: Period when the sequencer is offline or not producing blocks. |
| 21 | + |
| 22 | +## Normal Operation |
| 23 | + |
| 24 | +Under normal circumstances: |
| 25 | + |
| 26 | +1. Deposit transactions are included within 30 minutes. |
| 27 | +2. The sequencer processes transactions and produces blocks regularly. |
| 28 | + |
| 29 | +## Sequencer Downtime Scenarios |
| 30 | + |
| 31 | +### Short Downtime (< 30 minutes) |
| 32 | + |
| 33 | +* Deposits are still included within the 30-minute max time drift. |
| 34 | +* Regular L2 transactions may be delayed. |
| 35 | + |
| 36 | +### Extended Downtime (30 minutes to 12 hours) |
| 37 | + |
| 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. |
| 42 | + |
| 43 | +### Prolonged Downtime (> 12 hours) |
| 44 | + |
| 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. |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | +## Important Considerations |
| 54 | + |
| 55 | +* Forced transactions, through deposits (no need for deposited value), ensure timely execution of actions, mitigating risks like DEX price divergence during sequencer downtime. |
| 56 | +* Actions remain speculative for up to 12 hours due to the sequencing window. |
| 57 | +* The 12-hour window is a balance between operational reliability and minimizing potential L2 reorganizations. |
| 58 | + |
| 59 | +## Example Scenario |
| 60 | + |
| 61 | +If a deposit is initiated after the 30-minute mark but before the sequencing window expires: |
| 62 | + |
| 63 | +1. The deposit will be effective when the sequencing window expires (up to ~11 hours later). |
| 64 | +2. Nodes reading data from L1 will produce a block with the deposit after the sequencing window expires. |
| 65 | +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 | + |
| 67 | +<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. |
| 69 | +</Callout> |
| 70 | + |
| 71 | +## Conclusion |
| 72 | + |
| 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. |
0 commit comments