Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(contracts): fixed spelling #185

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions l1-contracts/contracts/zksync/Config.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions l1-contracts/contracts/zksync/facets/Executor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @author Matter Labs
* @custom:security-contact [email protected]
* @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.
*/
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/bootloader/bootloader.yul
Original file line number Diff line number Diff line change
Expand Up @@ -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}})
Expand Down
4 changes: 2 additions & 2 deletions system-contracts/contracts/Constants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions system-contracts/contracts/PubdataChunkPublisher.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {SystemLogKey} from "./Constants.sol";
/**
* @author Matter Labs
* @custom:security-contact [email protected]
* @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.
Expand All @@ -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 {
Expand All @@ -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;
}
Expand Down
Loading