Skip to content

Commit

Permalink
experiment: Use @eigenda/contracts package - remove blob verifier utils
Browse files Browse the repository at this point in the history
  • Loading branch information
ethenotethan committed Feb 2, 2025
1 parent 1378232 commit da3983f
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 82 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"private": false,
"devDependencies": {
"@arbitrum/sdk": "^3.4.1",
"@eigenda/contracts": "^0.0.3",
"@eigenda/contracts": "^0.1.0",
"@ethersproject/providers": "^5.7.2",
"@nomicfoundation/hardhat-verify": "^2.0.9",
"@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@^0.3.0-beta.13",
Expand Down
39 changes: 0 additions & 39 deletions src/bridge/EigenDABlobVerifierL1.sol

This file was deleted.

17 changes: 0 additions & 17 deletions src/bridge/EigenDABlobVerifierL2.sol

This file was deleted.

14 changes: 0 additions & 14 deletions src/bridge/IRollupManager.sol

This file was deleted.

12 changes: 6 additions & 6 deletions src/bridge/SequencerInbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox
// from upstream offchainlabs/nitro-contracts. Any newly introduced storage vars
// made in subsequent releases should result in decrementing the gap counter
uint256[36] internal __gap;
IRollupManager public eigenDARollupManager;
IRollupManager public eigenDACertVerifier;

constructor(
uint256 _maxDataSize,
Expand Down Expand Up @@ -471,7 +471,7 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox
delayProofImpl(afterDelayedMessagesRead, delayProof);

// Verify that the blob was actually included before continuing
eigenDARollupManager.verifyBlob(cert.blobHeader, cert.blobVerificationProof);
eigenDACertVerifier.verifyBlob(cert.blobHeader, cert.blobVerificationProof);
// Form the EigenDA data hash and get the time bounds
(bytes32 dataHash, IBridge.TimeBounds memory timeBounds) =
formEigenDADataHash(cert, afterDelayedMessagesRead);
Expand Down Expand Up @@ -500,7 +500,7 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox
if (isDelayProofRequired(afterDelayedMessagesRead)) revert DelayProofRequired();

// Verify that the blob was actually included before continuing
eigenDARollupManager.verifyBlob(cert.blobHeader, cert.blobVerificationProof);
eigenDACertVerifier.verifyBlob(cert.blobHeader, cert.blobVerificationProof);
// Form the EigenDA data hash and get the time bounds
(bytes32 dataHash, IBridge.TimeBounds memory timeBounds) =
formEigenDADataHash(cert, afterDelayedMessagesRead);
Expand Down Expand Up @@ -966,10 +966,10 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox
emit OwnerFunctionCalled(5);
}

function setEigenDARollupManager(
address newRollupManager
function setEigenDACertVerifier(
address newCertVerifier
) external onlyRollupOwner {
eigenDARollupManager = IRollupManager(newRollupManager);
eigenDARollupManager = IRollupManager(newCertVerifier);
emit OwnerFunctionCalled(6);
}

Expand Down
2 changes: 1 addition & 1 deletion src/mocks/SequencerInboxStub.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
pragma solidity ^0.8.0;

import "../bridge/SequencerInbox.sol";
import "../bridge/EigenDABlobVerifierL2.sol";
import "@eigenda/contracts/EigenDABlobVerifier.sol";

import "../bridge/IEthBridge.sol";
import {INITIALIZATION_MSG_TYPE} from "../libraries/MessageTypes.sol";
Expand Down
21 changes: 17 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@
dependencies:
"@jridgewell/trace-mapping" "0.3.9"

"@eigenda/contracts@^0.0.3":
version "0.0.3"
resolved "https://registry.yarnpkg.com/@eigenda/contracts/-/contracts-0.0.3.tgz#2ebb5fcf73660f5b86da4747558146f674711b6e"
integrity sha512-lP+FxwKsvshCH++ZbI4sG9whAkAS9PbPskw25kcWhdJRukyMlTkW/g7hXItHHGHTNMQOZ6AX6MRdHC3hHFCNfA==
"@eigenda/contracts@^0.1.0":
version "0.1.0-rc-1"
resolved "https://registry.yarnpkg.com/@eigenda/contracts/-/contracts-0.1.0-rc-1.tgz#700e2d860913dde67cc2cdd0d9adbd3bff47aee2"
integrity sha512-4Y/zldWpmelWw7oKOvn84o3JhUmsFjH3MYWyJlGPLO5cEcFvJoQwCNZnUOO6sHaGhNmuThcjrGe63YxzwldQiw==
dependencies:
"@openzeppelin/contracts" "4.7.0"
"@openzeppelin/contracts-upgradeable" "4.7.0"

"@eslint-community/eslint-utils@^4.2.0":
version "4.4.1"
Expand Down Expand Up @@ -895,11 +898,21 @@
"@openzeppelin/contracts" "4.7.3"
"@openzeppelin/contracts-upgradeable" "4.7.3"

"@openzeppelin/[email protected]":
version "4.7.0"
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.7.0.tgz#6437261286879d353f6de7bf3ac8216bef8a486d"
integrity sha512-wO3PyoAaAV/rA77cK8H4c3SbO98QylTjfiFxyvURUZKTFLV180rnAvna1x7/Nxvt0Gqv+jt1sXKC7ygxsq8iCw==

"@openzeppelin/[email protected]":
version "4.7.3"
resolved "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.7.3.tgz"
integrity sha512-+wuegAMaLcZnLCJIvrVUDzA9z/Wp93f0Dla/4jJvIhijRrPabjQbZe6fWiECLaJyfn5ci9fqf9vTw3xpQOad2A==

"@openzeppelin/[email protected]":
version "4.7.0"
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.7.0.tgz#3092d70ea60e3d1835466266b1d68ad47035a2d5"
integrity sha512-52Qb+A1DdOss8QvJrijYYPSf32GUg2pGaG/yCxtaA3cu4jduouTdg4XZSMLW9op54m1jH7J8hoajhHKOPsoJFw==

"@openzeppelin/[email protected]":
version "4.7.3"
resolved "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.7.3.tgz"
Expand Down

0 comments on commit da3983f

Please sign in to comment.