Skip to content

Commit

Permalink
restrict number of committed batches to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
koloz193 committed Jan 14, 2024
1 parent 453d5fd commit 67ca508
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions l1-contracts/contracts/zksync/facets/Executor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ contract ExecutorFacet is Base, IExecutor {
StoredBatchInfo memory _lastCommittedBatchData,
CommitBatchInfo[] calldata _newBatchesData
) external nonReentrant onlyValidator {
// With the new changes for 4844, namely the restriction on number of blobs per block, we only allow for a single batch to be committed at a time.
require(_newBatchesData.length == 1, "e4");
// Check that we commit batches after last committed batch
require(s.storedBatchHashes[s.totalBatchesCommitted] == _hashStoredBatchInfo(_lastCommittedBatchData), "i"); // incorrect previous batch data
require(_newBatchesData.length > 0, "No batches to commit");
Expand Down

0 comments on commit 67ca508

Please sign in to comment.