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

Introduce custom Ethereum client interface #55

Merged
merged 1 commit into from
Nov 10, 2020

Conversation

lukasz-zimnoch
Copy link
Member

@lukasz-zimnoch lukasz-zimnoch commented Nov 3, 2020

Refs: keep-network/keep-ecdsa#574

Introduced custom EthereumClient interface which wraps several go-ethereum interfaces and use it as backend in the client wrappers. The main motivation is to improve wrappers usability. For example, logging and rate-limiting clients can now be used by the block counter and mining waiter tools.

Introduced custom `EthereumClient` interface which
wraps several `go-ethereum` interfaces and use
it as backend in the client wrappers. The main motivation
is to improve wrappers usability. For example,
logging and rate limiting clients can now be used
by the block counter and mining waiter tools.
@pdyraga pdyraga merged commit a6cb29e into master Nov 10, 2020
@pdyraga pdyraga deleted the ethereum-client-wrapper branch November 10, 2020 08:42
@pdyraga
Copy link
Member

pdyraga commented Nov 10, 2020

To add some more color, this change was discussed here when we realized neither blockCounter nor miningWaiter calls are rate-limited:

The fact we are wrapping bind.ContractBackend and that this interface knows nothing about HeaderByNumber or functions used by blockCounter or miningWaiter is a problem here. I think it is fine to introduce our own ethutil.EthereumClient interface that would embed bind.ContractBackend bind.DeployBackend, ethereum.ChainReader, and use that interface when defining wrappers.

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