Skip to content

Commit

Permalink
Add eigenda verifier address
Browse files Browse the repository at this point in the history
  • Loading branch information
gianbelinche committed Oct 10, 2024
1 parent 3e1b3c2 commit 65bac4e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import {LogProcessingOutput} from "../../state-transition/chain-interfaces/IExec
import {LogProcessingOutput} from "../../state-transition/chain-interfaces/IExecutor.sol";

contract ExecutorProvingTest is ExecutorFacet {

constructor() ExecutorFacet(address(0)) {}

function getBatchProofPublicInput(
bytes32 _prevBatchCommitment,
bytes32 _currentBatchCommitment
Expand Down
2 changes: 2 additions & 0 deletions l1-contracts/contracts/dev-contracts/test/TestExecutor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import {ExecutorFacet} from "../../state-transition/chain-deps/facets/Executor.s
pragma solidity 0.8.24;

contract TestExecutor is ExecutorFacet {

constructor() ExecutorFacet(address(0)) {}
/// @dev Since we want to test the blob functionality we want mock the calls to the blobhash opcode.
function _getBlobVersionedHash(uint256 _index) internal view virtual override returns (bytes32 versionedHash) {
(bool success, bytes memory data) = s.blobVersionedHashRetriever.staticcall(abi.encode(_index));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ contract ExecutorFacet is ZkSyncHyperchainBase, IExecutor {
/// @inheritdoc IZkSyncHyperchainBase
string public constant override getName = "ExecutorFacet";

EigenDAVerifier immutable public eigenDAVerifier;

constructor(address _eigenDAVerifier) {
eigenDAVerifier = EigenDAVerifier(_eigenDAVerifier);
}

/// @dev Process one batch commit using the previous batch StoredBatchInfo
/// @dev returns new batch StoredBatchInfo
/// @notice Does not change storage
Expand Down Expand Up @@ -54,7 +60,7 @@ contract ExecutorFacet is ZkSyncHyperchainBase, IExecutor {
if (pricingMode == PubdataPricingMode.Validium) {
// In this scenario, pubdataCommitments has the data of the commitment and the pubdataSource, so the len should be higher or equal than 1
require(_newBatch.pubdataCommitments.length >= 1, "EF: v0l");
EigenDAVerifier.verifyBlob(_newBatch.pubdataCommitments[1:]);
eigenDAVerifier.verifyBlob(_newBatch.pubdataCommitments[1:]);
for (uint8 i = uint8(SystemLogKey.BLOB_ONE_HASH_KEY); i <= uint8(SystemLogKey.BLOB_SIX_HASH_KEY); i++) {
logOutput.blobHashes[i - uint8(SystemLogKey.BLOB_ONE_HASH_KEY)] = bytes32(0);
}
Expand Down

0 comments on commit 65bac4e

Please sign in to comment.