Skip to content

Commit 296eff0

Browse files
authored
Update whitelist specs with min tx and max skip (#570)
* Update whitelist specs with min tx and max skip * Rename to PRECONF_MAX_SKIPPED_L2_SLOTS * Be explicit about anchor * Update param
1 parent eb1d547 commit 296eff0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/whitelist-launch-specs.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
- **`HANDOVER_WINDOW_SLOTS`** (in slots)**:** The timeframe during which the current preconfer transfers preconf responsibilities to the next preconfer. This window ensures that preconfed blocks are properly included before the transition.
77
- **`HANDOVER_START_BUFFER_MS`** (in ms)**:** The maximum wait time at the beginning of the `HANDOVER_WINDOW_SLOTS` for the previous preconfer's final preconfed L2 block.
88
- **`DEFAULT_ANCHOR_ID_LAG`** (in slots): The default number of L1 blocks to lag behind the current L1 when setting the anchor ID.
9+
- **`PRECONF_MIN_TXS`** (in txs): Minimum transaction count, excluding the anchor transaction, below which you don’t have to preconfirm.
10+
- **`PRECONF_MAX_SKIPPED_L2_SLOTS`** (in L2 slots): Maximum number of consecutive L2 blocks you can skip before you must preconfirm regardless of transaction count.
911

1012
### Current Values
1113

@@ -15,6 +17,8 @@ Based on what Gattaca is using, it can change based on experiments.
1517
- **`HANDOVER_WINDOW_SLOTS` : 4**
1618
- **`HANDOVER_START_BUFFER_MS` : 6000ms**
1719
- **`DEFAULT_ANCHOR_ID_LAG` : 4**
20+
- **`PRECONF_MIN_TXS` : 3**
21+
- **`PRECONF_MAX_SKIPPED_L2_SLOTS` : 2**
1822

1923
## Timeline Diagram
2024

@@ -40,7 +44,11 @@ As `Preconfer X`, who is assigned the epoch containing slots `N` through `N+31`:
4044
- `status.highestUnsafeL2PayloadBlockID` is in sync with Taiko geth chain tip.
4145
3. After the above checks, `Preconfer X` will start preconfing based on its latest-seen preconfed block from the previous preconfer.
4246
4. There is a further edge case where the previous preconfer does not propagate the preconfed L2 block on time but still includes them into the L1, reorging the preconfs by `Preconfer X`—more on handling this in the “Edge Case” section.
43-
3. For slots `N - HANDOFF_WINDOW_SLOTS` to `N + 32 - HANDOFF_WINDOW_SLOTS`, for every `L2_BLOCK_TIME_MS` interval (see [Preconfing Timestamps](## Preconfing Timestamps) section for more details on the interval) `Preconfer X` should produce valid L2 blocks. The exact process is up to the implementation, but the process expected by Taiko client is:
47+
3. For slots `N - HANDOFF_WINDOW_SLOTS` to `N + 32 - HANDOFF_WINDOW_SLOTS`, for every `L2_BLOCK_TIME_MS` interval (see [Preconfing Timestamps](## Preconfing Timestamps) section for more details on the interval) `Preconfer X` should produce valid L2 blocks, subject to the following conditions:
48+
- If the transaction count in the mempool (which excludes the anchor transaction) is strictly below `PRECONF_MIN_TXS`, the preconfer may skip producing a block for that interval.
49+
- However, if the preconfer has skipped `PRECONF_MAX_SKIPPED_L2_SLOTS` consecutive L2 blocks before the current interval, they must produce a block regardless of transaction count.
50+
51+
The exact process is up to the implementation, but the process expected by Taiko client is:
4452
1. Calculate the `baseFee` by following the rules [here](https://github.com/taikoxyz/taiko-mono/blob/main/packages/protocol/contracts/layer2/based/TaikoAnchor.sol#L340).
4553
2. Fetch L2 transactions from the mempool by calling `taikoAuth_txPoolContent` (or `taikoAuth_txPoolContentWithMinTip`) RPC (JWT required) to taiko-geth ([code](https://github.com/taikoxyz/taiko-mono/blob/e14cad6f0acb4eb8589a5789589907fe3e88699f/packages/taiko-client/driver/preconf_blocks/api.go#L80-L81)).
4654
- The `baseFee` calculated above is passed here to ensure the fetched transaction has enough base fee to be included.

0 commit comments

Comments
 (0)