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

Make "pending" block param act as "latest" #974

Merged
merged 4 commits into from Nov 30, 2022

Conversation

lazartravica
Copy link
Contributor

@lazartravica lazartravica commented Nov 28, 2022

Fixes EVM-231.

Description

Changed the behaviour of functions that do:

  • fetching blocks by Number/String/Hash
  • decoding JSON-RPC requests
  • fetching blocks by number

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

Manual tests

Ran various JSON-RPC queries with "pending" as the block parameter.

Documentation update

//TODO

 - fetching blocks by Number/String/Hash
 - decoding JSON-RPC requests
 - fetching blocks by number
jsonrpc/helper.go Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Nov 29, 2022

Codecov Report

Merging #974 (31b7a27) into develop (461300f) will increase coverage by 1.03%.
The diff coverage is 86.74%.

❗ Current head 31b7a27 differs from pull request most recent head 8a49a83. Consider uploading reports for the commit 8a49a83 to get more accurate results

@@             Coverage Diff             @@
##           develop     #974      +/-   ##
===========================================
+ Coverage    52.91%   53.94%   +1.03%     
===========================================
  Files          129      132       +3     
  Lines        17113    17541     +428     
===========================================
+ Hits          9055     9463     +408     
- Misses        7411     7432      +21     
+ Partials       647      646       -1     
Impacted Files Coverage Δ
jsonrpc/jsonrpc.go 25.53% <ø> (ø)
state/executor.go 3.63% <0.00%> (-0.34%) ⬇️
state/runtime/evm/instructions.go 15.80% <33.33%> (ø)
jsonrpc/debug_endpoint.go 78.35% <78.35%> (ø)
state/runtime/evm/state.go 73.60% <98.68%> (+8.78%) ⬆️
jsonrpc/codec.go 67.74% <100.00%> (-0.68%) ⬇️
jsonrpc/dispatcher.go 55.82% <100.00%> (+0.82%) ⬆️
jsonrpc/eth_endpoint.go 68.14% <100.00%> (-1.85%) ⬇️
jsonrpc/filter_manager.go 78.29% <100.00%> (+0.71%) ⬆️
jsonrpc/helper.go 100.00% <100.00%> (ø)
... and 5 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

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

LGTM aside from @Stefan-Ethernal's comment

@lazartravica lazartravica merged commit ec48ac4 into develop Nov 30, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 30, 2022
@lazartravica lazartravica deleted the EVM-231-pending-as-latest branch November 30, 2022 09:32
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.

None yet

5 participants