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

Fix: RPC calls (gasLimit, gasPrice) use the intial state of the block #2161

Merged
merged 2 commits into from
Jul 13, 2023

Conversation

gastonponti
Copy link
Contributor

Description

The RPC calls to the gasPriceMinimum and blockLimit (also ethCompatibility flag) before the gingerbreadFork (also the gasPrice for alternative currencies after the fork) require to read state from the block, but instead of reading the state from the beginning of the block, both were using the state of the end of the block
This means that the gasPrice/gasLimit of the block N that the client was sending, was actually the gasPrice/gasLimit of the block N+1

Tested

Run tests/e2e

Backwards compatibility

Yes

@github-actions
Copy link

github-actions bot commented Jul 13, 2023

5856 passed, 45 skipped

@codecov
Copy link

codecov bot commented Jul 13, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.11 🎉

Comparison is base (b1bba65) 55.19% compared to head (40bcf46) 55.31%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2161      +/-   ##
==========================================
+ Coverage   55.19%   55.31%   +0.11%     
==========================================
  Files         676      676              
  Lines      113888   113927      +39     
==========================================
+ Hits        62862    63016     +154     
+ Misses      47172    47070     -102     
+ Partials     3854     3841      -13     
Impacted Files Coverage Δ
eth/api_backend.go 0.00% <0.00%> (ø)
les/api_backend.go 0.00% <0.00%> (ø)

... and 36 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link

github-actions bot commented Jul 13, 2023

Coverage from tests in ./e2e_test/... for ./consensus/istanbul/... at commit bacdccf

coverage: 50.2% of statements across all listed packages
coverage:  60.2% of statements in consensus/istanbul
coverage:  43.1% of statements in consensus/istanbul/announce
coverage:  55.7% of statements in consensus/istanbul/backend
coverage:   0.0% of statements in consensus/istanbul/backend/backendtest
coverage:  24.3% of statements in consensus/istanbul/backend/internal/replica
coverage:  64.0% of statements in consensus/istanbul/core
coverage:  50.0% of statements in consensus/istanbul/db
coverage:   0.0% of statements in consensus/istanbul/proxy
coverage:  64.4% of statements in consensus/istanbul/uptime
coverage:  51.8% of statements in consensus/istanbul/validator
coverage:  79.2% of statements in consensus/istanbul/validator/random

@gastonponti gastonponti merged commit bacdccf into master Jul 13, 2023
27 checks passed
@gastonponti gastonponti deleted the gastonponti/fix-rpc-eth-comp-calls branch July 13, 2023 13:58
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.

None yet

2 participants