-
Notifications
You must be signed in to change notification settings - Fork 262
chore(all): use upstream protocol params #1563
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
base: master
Are you sure you want to change the base?
Conversation
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.
lgtm, adding the config test was a great idea
const ( | ||
GasLimitBoundDivisor uint64 = 1024 // The bound divisor of the gas limit, used in update calculations. | ||
MaxGasLimit uint64 = 0x7fffffffffffffff // Maximum the gas limit (2^63-1). | ||
MaximumExtraDataSize uint64 = 64 // Maximum size extra data may be after Genesis. |
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.
I think this is the only params changed from upstream right? Let's keep those changed constants here so we know what's changed.
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.
I moved MaximumExtraDataSize
to plugin/evm/header/extra.go
as an unexported constant, given it's the only place where it's used. I think it's fine as it is? The other params are the same as upstream
const ( | ||
GasLimitBoundDivisor uint64 = 1024 // The bound divisor of the gas limit, used in update calculations. | ||
MaxGasLimit uint64 = 0x7fffffffffffffff // Maximum the gas limit (2^63-1). | ||
MaximumExtraDataSize uint64 = 64 // Maximum size extra data may be after Genesis. |
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.
I moved MaximumExtraDataSize
to plugin/evm/header/extra.go
as an unexported constant, given it's the only place where it's used. I think it's fine as it is? The other params are the same as upstream
Why this should be merged
Move protocol params code from subnet-evm to libevm since it's the same.
Initially proposed in #1552
How this works
MaximumExtraDataSize
which is modified in coreth) and delete params/protocol_params.go and params/extras/protcol_params.go.TestUpstreamParamsValues
is a change detector test to detect a geth params change in a future upgrade to make sure we take it into account.How this was tested
Existing CI passing
Need to be documented?
No
Need to update RELEASES.md?
No