Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

fix!: london hardfork check logic in json-rpc apis #1068

Merged
merged 5 commits into from Apr 30, 2022

Conversation

yihuang
Copy link
Contributor

@yihuang yihuang commented Apr 29, 2022

Description

Closes: #1067
Solution:

  • Add BaseFee grpc query handler in evm module which also checks the current london hardfork status.

the eth_getBlockByNumber rpc api is tested in cronos's related PR: https://github.com/crypto-org-chain/cronos/pull/446/files#diff-ece6d4f65047a3ec6f2294c4e4fc1eecf8a2b44928f478867399e69f194fc1beR128


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

Closes: evmos#1067
Solution:
- Add `BaseFee` grpc query handler in evm module which also checks the current london hardfork status.
@codecov
Copy link

codecov bot commented Apr 29, 2022

Codecov Report

Merging #1068 (c3b27c8) into main (fb13fd4) will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1068      +/-   ##
==========================================
+ Coverage   60.79%   60.87%   +0.07%     
==========================================
  Files          80       80              
  Lines        6670     6683      +13     
==========================================
+ Hits         4055     4068      +13     
  Misses       2404     2404              
  Partials      211      211              
Impacted Files Coverage Δ
app/ante/eth.go 82.42% <100.00%> (ø)
x/evm/keeper/grpc_query.go 69.24% <100.00%> (+0.93%) ⬆️
x/evm/keeper/keeper.go 78.70% <100.00%> (ø)
x/evm/keeper/state_transition.go 75.54% <100.00%> (ø)

@yihuang yihuang changed the title fix london hardfork check logic in json-rpc apis fix!: london hardfork check logic in json-rpc apis Apr 29, 2022
Copy link
Contributor

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

LGTM with minor comments.

Can you also add the new query to the spec and CLI? Should we remove the fee market gRPC base fee query?

rpc/ethereum/backend/backend.go Show resolved Hide resolved
x/evm/keeper/grpc_query.go Show resolved Hide resolved
x/evm/keeper/keeper.go Show resolved Hide resolved
x/evm/keeper/grpc_query_test.go Show resolved Hide resolved
@fedekunze fedekunze merged commit 556c2cc into evmos:main Apr 30, 2022
@yihuang yihuang deleted the legacy-block branch April 30, 2022 16:19
yihuang added a commit to yihuang/ethermint that referenced this pull request Apr 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

london hardfork check logic in json-rpc is not consistent with chain state
2 participants