Skip to content

Commit

Permalink
added batch root sending to executor fn
Browse files Browse the repository at this point in the history
  • Loading branch information
koloz193 committed Jul 11, 2024
1 parent 07e3d32 commit b4fb95a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,14 @@ contract ExecutorFacet is ZkSyncHyperchainBase, IExecutor {
_checkBatchData(_storedBatch, _executedBatchIdx, priorityOperationsHash);
s.priorityTree.processBatch(_priorityOpsData);

uint256 currentBatchNumber = _storedBatch.batchNumber;

// Save root hash of L2 -> L1 logs tree
s.l2LogsRootHashes[_storedBatch.batchNumber] = _storedBatch.l2LogsTreeRoot;

// Once the batch is executed, we include its message to the message root.
IMessageRoot messageRootContract = IBridgehub(s.bridgehub).messageRoot();
messageRootContract.addChainBatchRoot(s.chainId, currentBatchNumber, _storedBatch.l2LogsTreeRoot);
}

function executeBatchesSharedBridge(
Expand Down

0 comments on commit b4fb95a

Please sign in to comment.