-
Notifications
You must be signed in to change notification settings - Fork 26
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
Integration of Sonic's per-block base-fee adjustment #297
Merged
HerbertJordan
merged 3 commits into
develop
from
herbert/per_block_gas_pricing_integration
Nov 15, 2024
Merged
Integration of Sonic's per-block base-fee adjustment #297
HerbertJordan
merged 3 commits into
develop
from
herbert/per_block_gas_pricing_integration
Nov 15, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HerbertJordan
changed the title
Herbert/per block gas pricing integration
Integration of Sonic's per-block base-fee adjustment
Nov 11, 2024
HerbertJordan
force-pushed
the
herbert/per_block_gas_pricing_algorithm
branch
2 times, most recently
from
November 13, 2024 08:16
dcde650
to
67e6008
Compare
Base automatically changed from
herbert/per_block_gas_pricing_algorithm
to
develop
November 13, 2024 08:31
HerbertJordan
force-pushed
the
herbert/per_block_gas_pricing_integration
branch
4 times, most recently
from
November 15, 2024 11:57
3bb52ec
to
277268e
Compare
HerbertJordan
force-pushed
the
herbert/per_block_gas_pricing_integration
branch
from
November 15, 2024 12:01
277268e
to
52e3300
Compare
HerbertJordan
requested review from
jmpike,
thaarok and
jenikd
as code owners
November 15, 2024 12:09
LuisPH3
approved these changes
Nov 15, 2024
thaarok
approved these changes
Nov 15, 2024
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.
Seems ok to me 👍
jenikd
reviewed
Nov 15, 2024
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.
Looks good, thanks for these changes. Having correct value for GasLimit is great.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR integrates Sonic's base-fee adjustment algorithm into the Sonic client. After this PR, base-fees are updated with each block and no longer determined at the epoch boundary.
To integrate this feature, two additional values need to be stored in blocks:
Both values are required for the computation of base-fee prices. Since fields can not be arbitrarily added to blocks, a pre-existing, previously unused 32-byte "extra-data" fields was used. The two new values are stored in big endian format in the first 12 bytes of this value.
Besides these changes, this PR also fixes the handling of the
GasLimit
field in blocks, which previously was filled withmath.MaxUint64
but presented to RPC clients as the 6-byte value0xffffffffffff
presumably in order to avoid parsing or overflow errors for client code using signed 64-bit integers. With this change, an actual value -- therules.Blocks.MaxBlockGas
of the network configuration rules -- is used as the Gas limit per block.