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!: eigenda client confirmation depth #821

Merged
merged 12 commits into from
Oct 28, 2024

Conversation

samlaf
Copy link
Contributor

@samlaf samlaf commented Oct 19, 2024

Closes EBE-107.

Why are these changes needed?

Starting to upstream some of the eigenda-proxy features to eigenda-client.
This PR is needed for Layr-Labs/eigenda-proxy#187

Did not add a unit test, as I'm not a big fan of mock-based tests, which is the only pattern we have currently to test the eigenda-client. Added an e2e test on holesky instead, but this does not seem to be checked by any of our ci workflows... PR incoming (#820 ).

BREAKING CHANGES:

  • eth-rpc-url and eigenda-service-manager address are now mandatory configs to instantiate the eigenda-client

Checks

  • I've made sure the lint is passing in this PR.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • I've checked the new test coverage and the coverage percentage didn't drop.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@samlaf samlaf requested review from bxue-l2 and epociask October 23, 2024 14:13
@samlaf samlaf force-pushed the samlaf/feat--eigenda-client-confirmation-depth branch from fbb1851 to 99d213c Compare October 24, 2024 13:56
api/clients/config.go Show resolved Hide resolved
api/clients/config_test.go Outdated Show resolved Hide resolved
api/clients/eigenda_client.go Outdated Show resolved Hide resolved
api/clients/config_test.go Show resolved Hide resolved
if err != nil {
return nil, fmt.Errorf("failed to dial ETH RPC node: %w", err)
}
edasmCaller, err = edasm.NewContractEigenDAServiceManagerCaller(common.HexToAddress(config.SvcManagerAddr), ethClient)

Choose a reason for hiding this comment

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

Does this PR make cert verification mandatory?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, but I still made the eth-rpc and service-manager address mandatory, because I realized we should probably be checking the confirmed status of the batch onchain when the disperser tells us (defensive programming).

Realized that it didn't make sense to require them only when confirmationDepth > 0, because why also not verify that the batch has landed onchain when confirmationDepth = 0 (meaning its included only in the currentBlock)? See

batchConfirmed, err := m.batchIdConfirmedAtDepth(ctx, batchId, m.Config.WaitForConfirmationDepth)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@epociask is that OK with you or do you see a problem with this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Talked offline. We are fine with this. Added a breaking change comment to the PR description.

@samlaf samlaf force-pushed the samlaf/feat--eigenda-client-confirmation-depth branch from 35e2cca to 50afc56 Compare October 27, 2024 17:53
Copy link

@epociask epociask left a comment

Choose a reason for hiding this comment

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

LGTM

@samlaf samlaf changed the title feat: eigenda client confirmation depth feat!: eigenda client confirmation depth Oct 28, 2024
@samlaf samlaf merged commit 5fe3e91 into master Oct 28, 2024
9 checks passed
@samlaf samlaf deleted the samlaf/feat--eigenda-client-confirmation-depth branch October 28, 2024 20:17
ian-shim pushed a commit to ian-shim/eigenda that referenced this pull request Oct 29, 2024
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.

3 participants