-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
13 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
@@ -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; | ||
} | ||
|