-
Notifications
You must be signed in to change notification settings - Fork 627
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: remove contradictory gas limit check #11958
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #11958 +/- ##
==========================================
- Coverage 71.62% 71.62% -0.01%
==========================================
Files 810 810
Lines 163751 163747 -4
Branches 163751 163747 -4
==========================================
- Hits 117288 117283 -5
- Misses 41387 41389 +2
+ Partials 5076 5075 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right that one of the checks is redundant.
I'm almost certain that the gas limit in prev_extra should be equal to the header gas limit. As a rule the chunk header contains info from the prev extra copied byte by byte.
I am not aware of any feature to adjust the gas limit. I know we have adjustments for gas price built in so perhaps there was a mismatch there? Can you do some digging and see if the gas limit can actually be changed and if the gas price adjustment is correctly verified?
My understanding is that
That's interesting...and leaves me confused as to why
I've been able to change the gas limit. Doing it here triggers the following check to fail.
When commenting out this check, nodes seem to run fine with gas limits that are adjusted repeatedly at runtime. I'm taking the hint you gave in #11863 and will try to see if there is a place where the gas limit can be changed at runtime without triggering this test to fail. |
LGTM due to #11863 (comment) but tagging @bowenwang1996 just in case. |
validate_chunk_with_chunk_extra_and_receipts_root
comparesprev_chunk_extra.gas_limit()
andchunk_header.gas_limit()
twice:GAS_LIMIT_ADJUSTMENT_FACTOR
.If I'm not missing anything here, one of these checks should be removed. Since there is a
GAS_LIMIT_ADJUSTMENT_FACTOR
, I assume gas limit changes should be possible, so this PR removes the first check. Or has anything changed that requires gas limits ofprev_chunk_extra
andchunk_header
to be equal now?