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

rpc: add BlockByHash to supported methods #4923

Merged
merged 5 commits into from
Jun 1, 2020
Merged

Conversation

fedekunze
Copy link
Contributor

@fedekunze fedekunze commented May 30, 2020

Description

Please add a description of the changes that this PR introduces and the files that
are the most critical to review.

Problem

Ethermint currently has to maintain a map height-> block hash on the store (see here) as it needs to expose the eth_getBlockByHash JSON-RPC query for Web3 compatibility. This query is currently not supported by the tendermint RPC client.

@auto-comment
Copy link

auto-comment bot commented May 30, 2020

👋 Thanks for creating a PR!

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Wrote tests
  • Updated CHANGELOG_PENDING.md
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Updated relevant documentation (docs/) and code comments
  • Re-reviewed Files changed in the Github PR explorer
  • Applied Appropriate Labels

Thank you for your contribution to Tendermint! 🚀

Sorry, something went wrong.

@fedekunze fedekunze self-assigned this May 30, 2020
@fedekunze fedekunze marked this pull request as ready for review May 30, 2020 23:45
@fedekunze fedekunze requested review from melekes and tessr as code owners May 30, 2020 23:45
@fedekunze fedekunze added the C:rpc Component: JSON RPC, gRPC label May 30, 2020
@codecov-commenter
Copy link

codecov-commenter commented May 31, 2020

Codecov Report

Merging #4923 into master will decrease coverage by 0.16%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #4923      +/-   ##
==========================================
- Coverage   62.86%   62.69%   -0.17%     
==========================================
  Files         198      198              
  Lines       20013    20041      +28     
==========================================
- Hits        12581    12565      -16     
- Misses       6406     6447      +41     
- Partials     1026     1029       +3     
Impacted Files Coverage Δ
lite/proxy/proxy.go 0.00% <0.00%> (ø)
lite/proxy/wrapper.go 0.00% <0.00%> (ø)
lite2/rpc/client.go 0.00% <0.00%> (ø)
crypto/tmhash/hash.go 62.50% <0.00%> (-10.23%) ⬇️
consensus/ticker.go 91.66% <0.00%> (-4.17%) ⬇️
libs/clist/clist.go 66.66% <0.00%> (-1.52%) ⬇️
blockchain/v2/reactor.go 35.35% <0.00%> (-1.28%) ⬇️
consensus/reactor.go 71.82% <0.00%> (-0.94%) ⬇️
blockchain/v0/pool.go 78.66% <0.00%> (-0.64%) ⬇️
consensus/state.go 73.36% <0.00%> (-0.10%) ⬇️
... and 3 more

Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

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

👍

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
@melekes melekes added the R:minor Release: Minor label Jun 1, 2020
@melekes melekes merged commit da924fc into master Jun 1, 2020
@melekes melekes deleted the fedekunze/block_by_hash branch June 1, 2020 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:rpc Component: JSON RPC, gRPC R:minor Release: Minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants