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

Hardcode pre gingerbread block gas limits for existing chains #2 #2229

Merged
merged 4 commits into from
Feb 2, 2024

Conversation

piersy
Copy link
Contributor

@piersy piersy commented Jan 23, 2024

Note that this duplicates #2216 because we force reverted master after #2216 was merged.

Description

Ensures that for mainnet, alfajores and baklava, nodes will return the correct block gas limit up to the gingerbread fork even if they are not archive nodes when running in eth compatibility mode (I.E. --disablerpcethcompatibility is not set). More detail can be found here:

Other changes

A small re-factor of GetBlockByNumber and GetBlockByHash to reduce the depth of nesting.

Tested

CI is passing

Related issues

  • Fixes #[issue number here]

Backwards compatibility

This change is not backwards compatible with the previous implementations on mainnet, alfajores or baklava which would have returned a zero gas limit for a block if there was no state for that block.

Copy link

github-actions bot commented Jan 23, 2024

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

coverage: 50.6% of statements across all listed packages
coverage:  63.4% of statements in consensus/istanbul
coverage:  42.7% of statements in consensus/istanbul/announce
coverage:  55.8% 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.2% 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.2% 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

Copy link

github-actions bot commented Jan 23, 2024

5891 passed, 45 skipped

Copy link

codecov bot commented Jan 23, 2024

Codecov Report

Attention: 53 lines in your changes are missing coverage. Please review.

Comparison is base (8f49d7e) 55.06% compared to head (790f80e) 55.05%.

Files Patch % Lines
internal/ethapi/api.go 0.00% 44 Missing ⚠️
params/gas_limts.go 0.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2229      +/-   ##
==========================================
- Coverage   55.06%   55.05%   -0.01%     
==========================================
  Files         683      684       +1     
  Lines      114577   114596      +19     
==========================================
  Hits        63095    63095              
- Misses      47578    47606      +28     
+ Partials     3904     3895       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@piersy piersy force-pushed the piersy/hardcode_gas_limits branch 2 times, most recently from fdbd2a0 to 9fb2e7d Compare February 1, 2024 17:25
@piersy piersy merged commit 0a9662f into master Feb 2, 2024
26 of 27 checks passed
@piersy piersy deleted the piersy/hardcode_gas_limits branch February 2, 2024 09:01
piersy added a commit that referenced this pull request Mar 4, 2024
This fixes a typo in the hardcoded historical gas limits

Relates to #2229 #2214
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.

2 participants