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

feat: Deprecate usage of @eigenda/utils in-favor of @eigenda/contracts #46

Open
wants to merge 28 commits into
base: eigenda-v2.1.3
Choose a base branch
from

Conversation

ethenotethan
Copy link
Collaborator

@ethenotethan ethenotethan commented Feb 11, 2025

Summary: Deprecate @eigenda/utils library to use @eigenda/contracts instead. This is a major refactor and gets rid of a lot of custom code in-favor of the new EigenDACertVerifier contract.

Changes:

  • Remove local deployment scripts
  • Scrap blob verifier contracts and make verification optional within the sequencer inbox.
  • Replace rollupManager usage with eigenDACertVerifier
  • Regenerate storage and function signature mappings

Copy link

@samlaf samlaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quick skim review

scripts/config.ts.example Show resolved Hide resolved
Comment on lines +110 to +113
const eigenDACertVerifier = IEigenDACertVerifier__factory.connect(
eigenDACertVerifierAddress,
signer
)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why arent you deploying a new certverifier instead? think we want each rollup to manage its own certverifier goingh forward

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was hoping the actual EigenDACertVerifier deployment would be a separate script managed in the eigenda monorepo so we wouldn't have manage dual implementations across smart contract dev frameworks (i.e, hardhat, foundry)

cc - @0x0aa0

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so what's the overall flow for deploying these contracts for a nitro chain? I won't lie I don't really understand whats happening in this PR

// gap used to ensure forward compatiblity with newly introduced storage variables
// from upstream offchainlabs/nitro-contracts. Any newly introduced storage vars
// made in subsequent releases should result in decrementing the gap counter
uint256[38] internal __gap;
IRollupManager public eigenDARollupManager;
IEigenDACertVerifier public eigenDACertVerifier;
uint256 internal constant MAX_EIGENDA_CERTIFICATE_DRIFT = 100;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to standardize on this name across integration. lets add it to spec?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added link in spec https://www.notion.so/EigenDA-V2-Integration-Spec-12d13c11c3e0800e8968f31ef2c6a2b3?d=19c13c11c3e080789d99001c88cd090f&pvs=4#18813c11c3e080668187c5de4355cbeb
Now I'm not even sure we need this thing in op stack... can you check my comment there?

src/bridge/SequencerInbox.sol Outdated Show resolved Hide resolved
Comment on lines +484 to +485
// (B) integrity: A cert must be correct regarding its (quorums, thresholds) & successfully
// correlate to an EigenDA batch merkle root persisted on the service manager
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bxue-l2 separates these as integrity and something else

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bxue-l2 please enlighten me on the nomenclature 🙏🏻

Copy link

@bxue-l2 bxue-l2 Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is my system of words. Signature/quorum checking is something I call validity check, which described if this is a valid eigenda blob. If a cert is invalid, then you got an empty byte. If a cert is valid, then you can proceed to the next phase of integrity checks.

Integrity is another word I used for eigenda blob processing. It includes, removing empty byte, taking fft, check lengths, etc. https://en.wikipedia.org/wiki/Data_integrity

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's interesting. I feel like I would have swapped those 2 words:

  • integrity: has to do with being honest, so an invalid cert would be one that has a wrong signature or something (eigenda validators tried to lied)
  • validity: kind of applies to whatever, so we could just say that the blob is valid wrt the cert

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guessing these are autogenerated? theres a .gitattributes file that they can be added to to not appear in PR reviews

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm I think we may want them explicitly captured

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean they are still committed and part of the PR, just that the github UI will collapse them to indicate that they prob don't need to be reviewed (should be guarded by CI anyways)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would argue they would need to be reviewed

@ethenotethan ethenotethan requested a review from samlaf February 13, 2025 06:34
0x0aa0

This comment was marked as outdated.

Comment on lines 9 to 32
| eigenDARollupManager | contract IRollupManager | 9 | 0 | 20 | src/bridge/SequencerInbox.sol:SequencerInbox |
| isSequencer | mapping(address => bool) | 10 | 0 | 32 | src/bridge/SequencerInbox.sol:SequencerInbox |
| delayBlocks | uint64 | 11 | 0 | 8 | src/bridge/SequencerInbox.sol:SequencerInbox |
| futureBlocks | uint64 | 11 | 8 | 8 | src/bridge/SequencerInbox.sol:SequencerInbox |
| delaySeconds | uint64 | 11 | 16 | 8 | src/bridge/SequencerInbox.sol:SequencerInbox |
| futureSeconds | uint64 | 11 | 24 | 8 | src/bridge/SequencerInbox.sol:SequencerInbox |
| batchPosterManager | address | 12 | 0 | 20 | src/bridge/SequencerInbox.sol:SequencerInbox |
|-----------------------------+----------------------------------------------------------+------+--------+-------+----------------------------------------------|
| isSequencer | mapping(address => bool) | 9 | 0 | 32 | src/bridge/SequencerInbox.sol:SequencerInbox |
|-----------------------------+----------------------------------------------------------+------+--------+-------+----------------------------------------------|
| delayBlocks | uint64 | 10 | 0 | 8 | src/bridge/SequencerInbox.sol:SequencerInbox |
|-----------------------------+----------------------------------------------------------+------+--------+-------+----------------------------------------------|
| futureBlocks | uint64 | 10 | 8 | 8 | src/bridge/SequencerInbox.sol:SequencerInbox |
|-----------------------------+----------------------------------------------------------+------+--------+-------+----------------------------------------------|
| delaySeconds | uint64 | 10 | 16 | 8 | src/bridge/SequencerInbox.sol:SequencerInbox |
|-----------------------------+----------------------------------------------------------+------+--------+-------+----------------------------------------------|
| futureSeconds | uint64 | 10 | 24 | 8 | src/bridge/SequencerInbox.sol:SequencerInbox |
|-----------------------------+----------------------------------------------------------+------+--------+-------+----------------------------------------------|
| batchPosterManager | address | 11 | 0 | 20 | src/bridge/SequencerInbox.sol:SequencerInbox |
|-----------------------------+----------------------------------------------------------+------+--------+-------+----------------------------------------------|
| __gap | uint256[38] | 12 | 0 | 1216 | src/bridge/SequencerInbox.sol:SequencerInbox |
|-----------------------------+----------------------------------------------------------+------+--------+-------+----------------------------------------------|
| eigenDACertVerifier | contract IEigenDACertVerifier | 50 | 0 | 20 | src/bridge/SequencerInbox.sol:SequencerInbox |
╰-----------------------------+----------------------------------------------------------+------+--------+-------+----------------------------------------------╯
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like storage layout shifted here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@0x0aa0 iiuc that shouldn't matter since we won't be supporting an upgrade to this change

@ethenotethan ethenotethan requested a review from 0x0aa0 February 14, 2025 16:41
@ethenotethan ethenotethan changed the base branch from eigenda-v2.1.0 to eigenda-v2.1.3 February 18, 2025 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants