Giter VIP home page Giter VIP logo

ethrpc-rs's People

Contributors

bh2smith avatar nlordell avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

bh2smith

ethrpc-rs's Issues

Tag Release

There have been a few new methods introduced recently. Enough to warrant a new release!

getBlockByNumber returns more than accounted for.

I can see that you are trying to separate the Transaction type from the before it is actually mined, by excluding things like block_number

However this rpc endpoint to fetch hydrated block returns transactions containing block_numbers:

curl -X POST $NODE_URL --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0xffff1f", true],"id":1}' | jq '.result.transactions'

unfortunately this data is being lost in transmission.

I believe it should be Optional field (since its None when pending)

Hydrated Blocks Contain More than Parsed

While the docs specify that hydrated blocks return "Signed Transaction" types (excluding the hash) it turns out that this method actually returns the hash:

Request:

curl -X POST $NODE_URL --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x119f996", true],"id":1}' | jq

Response: http://jsonblob.com/1173956359015489536

We notice that the hash field is missing from SignedTransaction type here.

I suspect that the docs are outdated or incorrect. As far as I can tell, this is the only missing field. Will create a PR adding it.

Parse Error Signed Transaction (Geth Clients)

The transaction Responses return both fields "yParity" and "v" (which are equivalent).

Observe the difference in data for this request:

curl -X POST $NODE_URL --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0xe4e364", true],"id":1}' | jq '.result.transactions[0]'

when NODE_URL is ankr node vs quicknode or infura. Ankr returns a parsable response while the other two have "conflicting fields".

This is likely due to this:

  /// Y parity of the signature.
  #[serde(alias = "v")]
  pub y_parity: YParity,

Is there some way to intercept serde to remove the conflicting fields in the response before parsing? It seems that this will need to be handled here since there are multiple nodes returning this data.

Brought up also in #9

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.