From 3ee04910e072c7dba0c25e5b39e0ed53cbc8c545 Mon Sep 17 00:00:00 2001 From: koloz Date: Wed, 24 Jan 2024 15:40:13 -0500 Subject: [PATCH] chore(docstrings): added doc string comments where missing --- .../contracts/zksync/interfaces/IExecutor.sol | 11 +++++++++++ system-contracts/contracts/L1Messenger.sol | 2 ++ .../contracts/interfaces/IPubdataChunkPublisher.sol | 5 +++++ 3 files changed, 18 insertions(+) diff --git a/l1-contracts/contracts/zksync/interfaces/IExecutor.sol b/l1-contracts/contracts/zksync/interfaces/IExecutor.sol index 2ef23795c..3b9f29923 100644 --- a/l1-contracts/contracts/zksync/interfaces/IExecutor.sol +++ b/l1-contracts/contracts/zksync/interfaces/IExecutor.sol @@ -155,18 +155,29 @@ interface IExecutor is IBase { function revertBatches(uint256 _newLastBatch) external; /// @notice Event emitted when a batch is committed + /// @param batchNumber Number of the batch committed + /// @param batchHash Hash of the L2 batch + /// @param commitment Verified input for the zkSync circuit /// @dev It has the name "BlockCommit" and not "BatchCommit" due to backward compatibility considerations event BlockCommit(uint256 indexed batchNumber, bytes32 indexed batchHash, bytes32 indexed commitment); /// @notice Event emitted when batches are verified + /// @param previousLastVerifiedBatch Batch number of the previous last verified batch + /// @param currentLastVerifiedBatch Batch number of the current last verified batch /// @dev It has the name "BlocksVerification" and not "BatchesVerification" due to backward compatibility considerations event BlocksVerification(uint256 indexed previousLastVerifiedBatch, uint256 indexed currentLastVerifiedBatch); /// @notice Event emitted when a batch is executed + /// @param batchNumber Number of the batch committed + /// @param batchHash Hash of the L2 batch + /// @param commitment Verified input for the zkSync circuit /// @dev It has the name "BlockExecution" and not "BatchExecution" due to backward compatibility considerations event BlockExecution(uint256 indexed batchNumber, bytes32 indexed batchHash, bytes32 indexed commitment); /// @notice Event emitted when batches are reverted + /// @param totalBatchesCommitted Total number of committed batches + /// @param totalBatchesVerified Total number of verified batches + /// @param totalBatchesExecuted Total number of executed batches /// @dev It has the name "BlocksRevert" and not "BatchesRevert" due to backward compatibility considerations event BlocksRevert(uint256 totalBatchesCommitted, uint256 totalBatchesVerified, uint256 totalBatchesExecuted); } diff --git a/system-contracts/contracts/L1Messenger.sol b/system-contracts/contracts/L1Messenger.sol index 6cda8880a..aafe11c97 100644 --- a/system-contracts/contracts/L1Messenger.sol +++ b/system-contracts/contracts/L1Messenger.sol @@ -109,6 +109,7 @@ contract L1Messenger is IL1Messenger, ISystemContract { } /// @notice Public functionality to send messages to L1. + /// @param _message The preimage of the message intended to be sent to L1. function sendToL1(bytes calldata _message) external override returns (bytes32 hash) { uint256 gasBeforeMessageHashing = gasleft(); hash = EfficientCall.keccak(_message); @@ -156,6 +157,7 @@ contract L1Messenger is IL1Messenger, ISystemContract { } /// @dev Can be called only by KnownCodesStorage system contract. + /// @param _bytecodeHash Hash of bytecode being published to L1. function requestBytecodeL1Publication( bytes32 _bytecodeHash ) external override onlyCallFrom(address(KNOWN_CODE_STORAGE_CONTRACT)) { diff --git a/system-contracts/contracts/interfaces/IPubdataChunkPublisher.sol b/system-contracts/contracts/interfaces/IPubdataChunkPublisher.sol index 32c6bf255..83c1893fd 100644 --- a/system-contracts/contracts/interfaces/IPubdataChunkPublisher.sol +++ b/system-contracts/contracts/interfaces/IPubdataChunkPublisher.sol @@ -1,6 +1,11 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.20; +/** + * @author Matter Labs + * @custom:security-contact security@matterlabs.dev + * @notice Interface for contract responsible chunking pubdata into the appropriate size for EIP-4844 blobs. + */ interface IPubdataChunkPublisher { /// @notice Chunks pubdata into pieces that can fit into blobs. /// @param _pubdata The total l2 to l1 pubdata that will be sent via L1 blobs.