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 returns 503 errors (for failover purpose) #828

Merged
merged 8 commits into from
Oct 30, 2024

Conversation

samlaf
Copy link
Contributor

@samlaf samlaf commented Oct 22, 2024

Why are these changes needed?

Related to batcher failover project. See https://linear.app/eigenlabs/issue/EBE-60/design-fallback-mechanism-for-both-op-and-arb and ethereum-optimism/specs#434 for more details.

Basically we want eigenda-proxy to return 503 to batcher to signify "eigenda is down, failover and start submitting blobs to ethereum instead".

This PR makes the eigenda-client return 503s. eigenda-proxy will then use these, retry 3 times, and if it is still returning 503s, then return a 503 to the batcher.

The 2 sources of 503 errors that we have identified are:

  1. disperseBlob call failed (disperser is down) - TODO: this is not implemented yet b/c disperser client still doesn't return errors with error codes. I can either update this PR or make a followup one to do that.
  2. blob stuck in PROCESSING or DISPERSING status and call times out before reaching CONFIRMED state (landing onchain) - this is implemented

TODO

  • implement 503s in disperserClient: 3a7b16e
  • Add documentation for how to set the different TIMEOUTS (see this discussion): efd6d28

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 :(

api/clients/eigenda_client.go Outdated Show resolved Hide resolved
api/errors.go Outdated Show resolved Hide resolved
disperser/disperser.go Outdated Show resolved Hide resolved
api/clients/eigenda_client.go Outdated Show resolved Hide resolved
api/clients/eigenda_client.go Outdated Show resolved Hide resolved
api/clients/eigenda_client.go Outdated Show resolved Hide resolved
api/clients/eigenda_client.go Outdated Show resolved Hide resolved
api/clients/eigenda_client.go Outdated Show resolved Hide resolved
api/clients/eigenda_client.go Outdated Show resolved Hide resolved
disperser/disperser.go Outdated Show resolved Hide resolved
disperser/disperser.go Show resolved Hide resolved
docs: better documentation for BlobStatus in disperser.proto and disperser.go

feat: eigenda-client returns 503 errors for batcher failover

Update disperser/disperser.go

Co-authored-by: Ethen <ethen@eigenlabs.org>

Update api/clients/eigenda_client.go

Co-authored-by: Ethen <ethen@eigenlabs.org>

fix(lint): ErrorAPIGeneric.Error() had an infinite recursive call

proto: make protoc

refactor: use http status codes instead of our own enum in api errors.go

docs: remove deprecated notice on eigendaClient.GetCodec()

docs: make more precise DISPERSING blob status comment

In both disperser.proto and disperser.go

feat(503): return 503 for insufficient signatures (was returning 500 before)

docs: make more precise comments for why we return 503 on blobstatus_failed

docs: better comment explaining timeout while in confirmed blob status

chore: update comments and asserts to reflect that disperseBlob only ever returns PROCESSING status

style: clearer docstring for blobStatus_DISPERSING in disperser.proto

refactor(eigenda-client): return grpc errors + one special ErrorFailover error (#843)
@samlaf samlaf force-pushed the samlaf/feat--eigenda-client-503-errors branch from 8eeb3e0 to b5efda8 Compare October 29, 2024 15:48
@samlaf samlaf requested a review from bxue-l2 October 30, 2024 02:01
@samlaf samlaf merged commit 96c02de into master Oct 30, 2024
9 checks passed
@samlaf samlaf deleted the samlaf/feat--eigenda-client-503-errors branch October 30, 2024 17:58
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