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

ethclient/gethclient: RPC client wrapper for geth-specific API #22977

Merged
merged 10 commits into from
Jun 30, 2021

Conversation

MariusVanDerWijden
Copy link
Member

@MariusVanDerWijden MariusVanDerWijden commented Jun 1, 2021

This PR adds the gethclient package which implements geth specific rpc calls

Huge shoutout to @fxfactorial and @p4u for their work that I used here.

TODO:

  • Docs
  • implement additional geth specific RPC calls

closes #22299
closes #21143

This commit adds the package gethclient which is similar to the ethclient
and implements some geth specific functionality.
Big shoutout to @fxfactorial and @p4u for implementing the functionality
in ethclient which I now ported to gethclient.
@fjl
Copy link
Contributor

fjl commented Jun 1, 2021

The gethclient package should be moved to the ethclient directory, i.e. import path "github.com/ethereum/go-ethereum/ethclient/gethclient". The reason being that we have enough top-level directories already, don't want to add more unless there is a very good reason for it.

ethclient/ethclient.go Outdated Show resolved Hide resolved
@fjl fjl changed the title gethclient: Implement geth specific functionality ethclient/gethclient: RPC client wrapper for geth-specific API Jun 1, 2021
@fjl
Copy link
Contributor

fjl commented Jun 2, 2021

In general, we should avoid exposing hexutil-typed fields in Go API surface. To do this, we would have to use gencodec to create marshaling wrappers for all structs with such fields.

@MariusVanDerWijden
Copy link
Member Author

@fjl I removed the hexutil types in the api surface here: 6ac1181
Instead of using gencodec I wrote some internal types + functionality to convert them. That seemed a bit easier for me. It's a bit less maintainable though I think. What do you think, should I leave it like this or use gencodec?

@MariusVanDerWijden MariusVanDerWijden marked this pull request as ready for review June 24, 2021 13:01
@Jolly23
Copy link
Contributor

Jolly23 commented Jun 26, 2021

nice job!

@fjl fjl merged commit acdf923 into ethereum:master Jun 30, 2021
@fjl fjl added this to the 1.10.5 milestone Jun 30, 2021
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Aug 12, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Aug 19, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Aug 21, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Aug 22, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Aug 23, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Aug 24, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Aug 25, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Aug 25, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Aug 26, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Aug 26, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Aug 26, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 2, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 6, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 9, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 9, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 9, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 12, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 12, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 19, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 19, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 19, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 21, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 22, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 22, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 23, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 23, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 26, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 26, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 27, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Oct 9, 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.

Watching pendingTransactions with go-ethereum as a library JSON_RPC eth_pendingTransactions Filtering
8 participants