Measure forced inclusion latency
The escape hatch is only as useful as its worst-case latency, and that number is the sum of L1
inclusion, the inbox grace period, and L2 execution — three components you can only get right by
measuring them, not by copying a doc figure.
Procedure
Break the path into timed segments and instrument each:
- t0: submission of the L1 transaction.
- t1: L1 inclusion (depends on base fee and priority; ~12 s per block but can stretch under
congested blocks).
- t2: end of the inbox grace period (Arbitrum 24 h = 86400 s; zkSync priority queue FIFO with a
bounded refusal window).
- t3: L2 execution and the first L2 block that contains it.
Capture t0 and t1 from the L1 receipt:
L1TS=$(cast receipt $L1_TXHASH --rpc-url $L1RPC --field blockNumber)
cast block $L1TS --rpc-url $L1RPC --field timestamp
Capture t3 from the L2: locate the delivered message or the executed call, then read its L2 block
timestamp.
cast receipt $L2_TXHASH --rpc-url $L2RPC --field blockNumber
Compute the honest worst case, not the happy case. If the sequencer honours the inbox promptly,
latency is t3 - t1 (minutes). If it does not, latency is grace + t3 - t1, which is the bound you
must plan against. Report both numbers.
Run a sample on a testnet or a fork before relying on it. Arbitrum Sepolia and OP Sepolia both
expose the same inbox contracts, so the calldata and gas can be rehearsed without mainnet cost:
anvil --fork-url $L1RPC & cast send $INBOX ... --rpc-url http://127.0.0.1:8545
Record per-sample: L1 gas cost, L1 base fee at submission, grace period observed, and L2 execution
timestamp. Report min, median, and max over at least a handful of samples; a single measurement is
not a latency estimate.
Feed the worst case into the incident runbook and set the retry/escalation triggers from it — if
your service cannot tolerate a 24 h forced-inclusion bound, the L2 is not a fit for that workload.
Pitfalls
- Quoting the doc's 24 h as the latency when the sequencer actually includes the delayed inbox in
seconds; the honest answer is a range with the pessimistic branch flagged.
- Measuring from submission and not from L1 inclusion, which folds gas-market variance into what looks
like inbox latency.
- Assuming the grace period is a fixed wall-clock constant when it is expressed in L1 blocks on some
chains (Arbitrum uses L1 blocks, ~6.4 days for withdrawals but the delayed-inbox force window is
block-based too).
- Ignoring that a forced transaction can itself fail on L2 (out of gas, revert) and that re-entry pays
the full cost again.
- Treating one testnet sample as representative when L1 congestion dominates the L1-inclusion segment.
Verification
# t1 from L1, t3 from L2, grace from the chain's config
L1_INCL=$(cast receipt $L1_TXHASH --rpc-url $L1RPC --field blockNumber)
L2_INCL=$(cast receipt $L2_TXHASH --rpc-url $L2RPC --field blockNumber)
# latency_happy = ts(L2_INCL) - ts(L1_INCL); latency_worst = grace + latency_happy
Report the two latency figures (happy-path and grace-bound), the grace period source, and the sample
size behind the numbers.
1---2name: measure-forced-inclusion-latency3description: Use when an incident plan or SLA depends on the real end-to-end time from submitting a forced-inclusion transaction on L1 to it executing on the L2.4metadata:5 source: https://skillmd.com/skills/jiayaoqijia/measure-forced-inclusion-latency6---78# Measure forced inclusion latency910The escape hatch is only as useful as its worst-case latency, and that number is the sum of L111inclusion, the inbox grace period, and L2 execution — three components you can only get right by12measuring them, not by copying a doc figure.1314## Procedure15161. Break the path into timed segments and instrument each:17 - t0: submission of the L1 transaction.18 - t1: L1 inclusion (depends on base fee and priority; ~12 s per block but can stretch under19 congested blocks).20 - t2: end of the inbox grace period (Arbitrum 24 h = 86400 s; zkSync priority queue FIFO with a21 bounded refusal window).22 - t3: L2 execution and the first L2 block that contains it.23242. Capture t0 and t1 from the L1 receipt:2526 L1TS=$(cast receipt $L1_TXHASH --rpc-url $L1RPC --field blockNumber)27 cast block $L1TS --rpc-url $L1RPC --field timestamp28293. Capture t3 from the L2: locate the delivered message or the executed call, then read its L2 block30 timestamp.3132 cast receipt $L2_TXHASH --rpc-url $L2RPC --field blockNumber33344. Compute the honest worst case, not the happy case. If the sequencer honours the inbox promptly,35 latency is t3 - t1 (minutes). If it does not, latency is grace + t3 - t1, which is the bound you36 must plan against. Report both numbers.37385. Run a sample on a testnet or a fork before relying on it. Arbitrum Sepolia and OP Sepolia both39 expose the same inbox contracts, so the calldata and gas can be rehearsed without mainnet cost:4041 anvil --fork-url $L1RPC & cast send $INBOX ... --rpc-url http://127.0.0.1:854542436. Record per-sample: L1 gas cost, L1 base fee at submission, grace period observed, and L2 execution44 timestamp. Report min, median, and max over at least a handful of samples; a single measurement is45 not a latency estimate.46477. Feed the worst case into the incident runbook and set the retry/escalation triggers from it — if48 your service cannot tolerate a 24 h forced-inclusion bound, the L2 is not a fit for that workload.4950## Pitfalls5152- Quoting the doc's 24 h as the latency when the sequencer actually includes the delayed inbox in53 seconds; the honest answer is a range with the pessimistic branch flagged.54- Measuring from submission and not from L1 inclusion, which folds gas-market variance into what looks55 like inbox latency.56- Assuming the grace period is a fixed wall-clock constant when it is expressed in L1 blocks on some57 chains (Arbitrum uses L1 blocks, ~6.4 days for withdrawals but the delayed-inbox force window is58 block-based too).59- Ignoring that a forced transaction can itself fail on L2 (out of gas, revert) and that re-entry pays60 the full cost again.61- Treating one testnet sample as representative when L1 congestion dominates the L1-inclusion segment.6263## Verification6465```bash66# t1 from L1, t3 from L2, grace from the chain's config67L1_INCL=$(cast receipt $L1_TXHASH --rpc-url $L1RPC --field blockNumber)68L2_INCL=$(cast receipt $L2_TXHASH --rpc-url $L2RPC --field blockNumber)69# latency_happy = ts(L2_INCL) - ts(L1_INCL); latency_worst = grace + latency_happy70```7172Report the two latency figures (happy-path and grace-bound), the grace period source, and the sample73size behind the numbers.