-
Notifications
You must be signed in to change notification settings - Fork 186
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
Add EigenDA client using handshake based authentication #551
Conversation
4066683
to
79613a9
Compare
What is the intended relationship between this client and the client in the
Do we anticipate this remaining to be the case? If we are using the same module, then why should this code be contained in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just some small comments - otherwise looks really good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This kind of client implementation makes sense, and code lgtm. But I feel like it should belong on the integrator's codebase.
Is this client tailored for a specific integration or all integrations?
If it's tailored for a specific integration, it should belong in the integrator's codebase utilizing the generic disperser client.
If your judgement is that all integrations will use this client, we should update the existing client.
What do you think?
Thanks for all the feedback on this PR. I wasn't aware of the existing EigenDA client in the Since the existing client is being used for traffic generation and integration tests which depend on its lower level semantics, it doesn't seem viable to fold that client into this one. Conversely, it does seem possible to factor out aspects of this client which could be handled by the lower-level client, but would require some duplication of supporting code, e.g. separate config objects etc. This is the path I will take in pending follow ups to this PR. Based on @epociask's requests I think it does make sense to mock out the apiserver for the purpose of testing failure cases of this client, that work is also pending. For now though I've updated the branch with another draft of refactors that respond to the comments above. |
Ok I've updated this client to depend on the existing low level EigenDA client. The only thing I'd change about the low level client at this point is that the low level client reconnects with the server with every request. This seems like overkill, since GRPC connections are virtual and can abstract over whether there is a real TCP connection going at any point in time. |
In my latest push I've further updated this PR to add tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, one comment on validation
|
||
func (c *EigenDAClientConfig) Check() error { | ||
if c.StatusQueryRetryInterval == 0 { | ||
c.StatusQueryRetryInterval = 5 * time.Second |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to rename the method name to make it clear to the caller that this method modifies the content of the receiver (or return a new config instead of modifying the receiver in place).
Why are these changes needed?
To provide a client for accessing EigenDA with the following features:
DisperseBlob()
andGetBlobStatus()
).This client will unify logic across many integrations and make EigenDA integrations easier to maintain.
This change also unifies the
api/
package into the root module, which can be done because the original reason for separating api into its own module no longer applies; we have upgraded certain dependencies within the root module that were conflicting with Optimism's set of dependencies before.My testing strategy here has been based on testnet integration tests, since otherwise testing this client would require either mocking out the disperser, spinning up an entire inabox environment, or some middle ground between the two. For now, given time constraints, it is fine to verify that the client works against testnet.
Checks