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: docs/zkEVM/architecture/protocol/malfunction-resistance/sequencer-resistance.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,23 +21,24 @@ In order to ensure finality in the case of Trusted Sequencer's malfunction, the
21
21
22
22
Any user can publish a batch to be forced by directly calling `forceBatch` function:
23
23
24
-
```
25
-
function forceBatch(
26
-
bytes memory transactions ,
27
-
uint256 maticAmount
24
+
```bash
25
+
functionsequenceForceBatches(
26
+
ForcedBatchData[] memory batches
28
27
) public ifNotEmergencyState isForceBatchAllowed
29
28
```
29
+
in Etrog it is:
30
30
31
-
where,
32
-
33
-
-`transactions` is the byte array containing the concatenated batch transactions (same as the normal batch transactions format)
34
-
-`maticAmount` is the maximum amount of MATIC tokens the user is willing to pay as a forced batch publication fee. The fee for publishing a forced batch is the same as the fee for sequencing, and it is therefore set in the `batchFee` storage variable. Since the fee is paid when a forced batch is published, it will not be paid again when the batch is sequenced.
31
+
```bash
32
+
functionsequenceForceBatches(
33
+
BatchData[] calldata batches
34
+
) external virtual isSenderAllowedToForceBatches
35
+
```
35
36
36
37
In order to successfully publish forced batch to the `forcedBatches` mapping, the following conditions must be met, otherwise the transaction will revert;
37
38
38
39
- The contract must not be in emergency state,
39
40
- The force batches must be allowed,
40
-
- The `maticAmount` argument must be higher than the MATIC fee per batch,
41
+
- The `maticAmount` argument must be higher than the MATIC fee per batch. It is the maximum amount of MATIC tokens the user is willing to pay as a forced batch publication fee. The fee for publishing a forced batch is the same as the fee for sequencing, and it is therefore set in the `batchFee` storage variable. Since the fee is paid when a forced batch is published, it will not be paid again when the batch is sequenced.
41
42
- The length of the transactions byte array must be less than the value of `MAX_TRANSACTIONS_BYTE_LENGTH` constant (which is set at 120000).
42
43
43
44
The forced batch is entered in `forcedBatches` mapping keyed by its force batch index.
0 commit comments