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

Enable creating InstrumentedClient from existing #117

Merged
merged 2 commits into from
Apr 29, 2024

Conversation

taco-paco
Copy link
Contributor

@taco-paco taco-paco commented Feb 16, 2024

Motivation

Make some methods accessible for third-party use to avoid creating duplicate instances. Make new constructor method for Instrumented client for 3-party integration

Solution

Open questions

Copy link
Collaborator

@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.

Thanks for this. Added some comments.
Curious in general what you're building and/or looking to do with these methods?
Are you part of an AVS team?

chainio/clients/eth/instrumented_client.go Show resolved Hide resolved
@@ -104,7 +104,7 @@ func BuildAll(

}

func (config *BuildAllConfig) buildElClients(
func (config *BuildAllConfig) BuildElClients(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do you need this method exposed? Personally find it a bit weird given that the BuildAllConfig takes in AVS contract addresses. I'd prefer we expose a BuildElClients that takes in a core eigenlayer contract address, such as the delegation manager address.

Also if you're already putting together the BuildAllConfig, might as well just build everything, even if you just need the EL clients.

Copy link
Contributor Author

@taco-paco taco-paco Feb 28, 2024

Choose a reason for hiding this comment

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

Its connected to InstrumentedClient. The reason to expose this is because BuildAll build clients using eth.NewClient which in our case just creates duplicate clients. I would like to be able to pass wrapped eth.Client(InstrumentedClient) to achieve results of BuildAll but with my own client instances

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see, makes sense to expose these I guess for people to use them, although I'd still prefer we clear the TODO on top of Clients struct, and make a different BuildALL for people who want instrumented client and another for people who don't want metrics. Perhaps easiest is only to expose the building blocks like this, but my main concern was just that the config struct is then a bit confusing. I'm fine with merging these changes for now if it helps, but if you end up creating other useful high-level constructors, please create new PRs with those. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure) Will resolve conflicts in a few days.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@samlaf samlaf merged commit 06f8559 into Layr-Labs:master Apr 29, 2024
2 of 3 checks passed
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.

2 participants