From e9479f2fb2109f8bc87b72812eaa5d8f7832e0e8 Mon Sep 17 00:00:00 2001 From: koloz Date: Wed, 24 Jan 2024 13:21:36 -0500 Subject: [PATCH] chore(contracts): fixed spelling --- l1-contracts/contracts/zksync/Config.sol | 4 ++-- l1-contracts/contracts/zksync/facets/Executor.sol | 6 +++--- l1-contracts/contracts/zksync/utils/BlobVersionedHash.yul | 2 +- system-contracts/bootloader/bootloader.yul | 2 +- system-contracts/contracts/Constants.sol | 4 ++-- system-contracts/contracts/PubdataChunkPublisher.sol | 8 ++++---- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/l1-contracts/contracts/zksync/Config.sol b/l1-contracts/contracts/zksync/Config.sol index 1ed3e9fb6..2be8499a7 100644 --- a/l1-contracts/contracts/zksync/Config.sol +++ b/l1-contracts/contracts/zksync/Config.sol @@ -81,10 +81,10 @@ uint256 constant REQUIRED_L2_GAS_PRICE_PER_PUBDATA = $(REQUIRED_L2_GAS_PRICE_PER /// to obtain the L2 block timestamp. Applying this mask is equivalent to calculating modulo 2**128 uint256 constant PACKED_L2_BLOCK_TIMESTAMP_MASK = 0xffffffffffffffffffffffffffffffff; -/// @dev Address of the point evaluation precompile used for 4844 blob verification. +/// @dev Address of the point evaluation precompile used for EIP-4844 blob verification. address constant POINT_EVALUATION_PRECOMPILE_ADDR = address(0x0A); -/// @dev Address of the contracts that functions like HASH_OPCODE_BYTE from EIP 4844 +/// @dev Address of the contracts that functions like HASH_OPCODE_BYTE from EIP-4844 address constant BLOB_VERSIONED_HASH_GETTER_ADDR = $(BLOB_VERSIONED_HASH_GETTER_ADDR); /// @dev The overhead for a transaction slot in L2 gas. diff --git a/l1-contracts/contracts/zksync/facets/Executor.sol b/l1-contracts/contracts/zksync/facets/Executor.sol index 7593c31c6..26f9fdebf 100644 --- a/l1-contracts/contracts/zksync/facets/Executor.sol +++ b/l1-contracts/contracts/zksync/facets/Executor.sol @@ -185,7 +185,7 @@ 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. + // With the new changes for EIP-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 @@ -552,12 +552,12 @@ contract ExecutorFacet is Base, IExecutor { versionedHashIndex += 1; } - // This check is required because we want to ensure that there arent any extra blobs trying to be published. + // This check is required because we want to ensure that there aren't any extra blobs trying to be published. // Calling the BLOBHASH opcode with an index > # blobs - 1 yields bytes32(0) bytes32 versionedHash = _getBlobVersionedHash(versionedHashIndex); require(versionedHash == bytes32(0), "lh"); - // We verify that for each set of blobHah/blobCommitment are either both empty + // We verify that for each set of blobHash/blobCommitment are either both empty // or there are values for both. for (uint256 i = 0; i < MAX_NUMBER_OF_BLOBS; i++) { require( diff --git a/l1-contracts/contracts/zksync/utils/BlobVersionedHash.yul b/l1-contracts/contracts/zksync/utils/BlobVersionedHash.yul index 162a2f4d5..ea75d1339 100644 --- a/l1-contracts/contracts/zksync/utils/BlobVersionedHash.yul +++ b/l1-contracts/contracts/zksync/utils/BlobVersionedHash.yul @@ -1,7 +1,7 @@ /** * @author Matter Labs * @custom:security-contact security@matterlabs.dev - * @notice The contract used to interact with 4844 blob versioned hashes before official solidity support. + * @notice The contract used to interact with EIP-4844 blob versioned hashes before official solidity support. * @dev It only should receive 1 uint256 as calldata representing the index of the blob versioned hash to return. * @dev If index >= len(versioned_hashes) then bytes32(0) is returned. */ diff --git a/system-contracts/bootloader/bootloader.yul b/system-contracts/bootloader/bootloader.yul index b2b728dd5..952345a90 100644 --- a/system-contracts/bootloader/bootloader.yul +++ b/system-contracts/bootloader/bootloader.yul @@ -687,7 +687,7 @@ object "Bootloader" { /// additional transformations, which the standard `extcodehash` does for EVM-compatibility /// @param addr The address of the account to get the code hash of. /// @param assertSuccess Whether to revert the bootloader if the call to the AccountCodeStorage fails. If `false`, only - /// `nearCallPanic` will be issued in case of failure, which is helpful for cases, when the reason for failer is user providing not + /// `nearCallPanic` will be issued in case of failure, which is helpful for cases, when the reason for failure is user providing not /// enough gas. function getRawCodeHash(addr, assertSuccess) -> ret { mstore(0, {{RIGHT_PADDED_GET_RAW_CODE_HASH_SELECTOR}}) diff --git a/system-contracts/contracts/Constants.sol b/system-contracts/contracts/Constants.sol index 9bd386ac6..8e3c229b2 100644 --- a/system-contracts/contracts/Constants.sol +++ b/system-contracts/contracts/Constants.sol @@ -135,8 +135,8 @@ uint256 constant STATE_DIFF_ENUM_INDEX_OFFSET = 84; uint256 constant STATE_DIFF_FINAL_VALUE_OFFSET = 124; /// @dev Total number of bytes in a blob. Blob = 4096 field elements * 31 bytes per field element -/// @dev 4844 defines it as 131_072 but we use 4096 * 31 within our circuits to always fit within a field element -/// @dev Our circuits will prove that a 4844 blob and our internal blob are the same. +/// @dev EIP-4844 defines it as 131_072 but we use 4096 * 31 within our circuits to always fit within a field element +/// @dev Our circuits will prove that a EIP-4844 blob and our internal blob are the same. uint256 constant BLOB_SIZE_BYTES = 126_976; /// @dev Max number of blobs currently supported diff --git a/system-contracts/contracts/PubdataChunkPublisher.sol b/system-contracts/contracts/PubdataChunkPublisher.sol index c75ff6615..63795f7aa 100644 --- a/system-contracts/contracts/PubdataChunkPublisher.sol +++ b/system-contracts/contracts/PubdataChunkPublisher.sol @@ -11,7 +11,7 @@ import {SystemLogKey} from "./Constants.sol"; /** * @author Matter Labs * @custom:security-contact security@matterlabs.dev - * @notice Smart contract for chunking pubdata into the appropriate size for 4844 blobs. + * @notice Smart contract for chunking pubdata into the appropriate size for EIP-4844 blobs. */ contract PubdataChunkPublisher is IPubdataChunkPublisher, ISystemContract { /// @notice Chunks pubdata into pieces that can fit into blobs. @@ -24,7 +24,7 @@ contract PubdataChunkPublisher is IPubdataChunkPublisher, ISystemContract { bytes32[] memory blobHashes = new bytes32[](MAX_NUMBER_OF_BLOBS); // We allocate to the full size of MAX_NUMBER_OF_BLOBS * BLOB_SIZE_BYTES because we need to pad - // the data on the right with 0s if it doesnt take up the full blob + // the data on the right with 0s if it doesn't take up the full blob bytes memory totalBlobs = new bytes(BLOB_SIZE_BYTES * MAX_NUMBER_OF_BLOBS); assembly { @@ -36,8 +36,8 @@ contract PubdataChunkPublisher is IPubdataChunkPublisher, ISystemContract { for (uint256 i = 0; i < MAX_NUMBER_OF_BLOBS; i++) { uint256 start = BLOB_SIZE_BYTES * i; - // We break if the pubdata isnt enough to cover 2 blobs. On L1 it is expected that the hash - // will be bytes32(0) if a blob isnt going to be used. + // We break if the pubdata isn't enough to cover 2 blobs. On L1 it is expected that the hash + // will be bytes32(0) if a blob isn't going to be used. if (start >= _pubdata.length) { break; }