-
Notifications
You must be signed in to change notification settings - Fork 52
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
sep/027: upgrade and re-initialize SystemConfig
across sepolia superchain
#418
base: main
Are you sure you want to change the base?
Conversation
SystemConfig
tasks/sep/026-holocene-system-config-upgrade-and-init-multi-chain/VALIDATION.md
Outdated
Show resolved
Hide resolved
SystemConfig
SystemConfig
50aeb48
to
2e881b4
Compare
tasks/sep/027-holocene-system-config-upgrade-and-init-multi-chain/NestedSignFromJson.s.sol
Outdated
Show resolved
Hide resolved
tasks/sep/027-holocene-system-config-upgrade-and-init-multi-chain/NestedSignFromJson.s.sol
Outdated
Show resolved
Hide resolved
tasks/sep/027-holocene-system-config-upgrade-and-init-multi-chain/OVERVIEW.md
Outdated
Show resolved
Hide resolved
existing task in flight for 025
…ave them, e.g. metal)
…kip only if not found in the TOML file
…s into child contract
…d rename to HoloceneSystemConfigUpgrade
SystemConfig
SystemConfig
across sepolia superchain
require(previousScalar >> 248 == 0, "scalar-101 previous scalar version != 0 or 1"); | ||
require(reencodedScalar >> 248 == 1, "scalar-102 reenconded scalar version != 1"); | ||
require(sysCfg.blobbasefeeScalar() == uint32(0), "scalar-103 blobbasefeeScalar !=0"); | ||
require(reencodedScalar << 8 == previousScalar << 8, "scalar-104 scalar mismatch"); |
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.
Two comments on this:
- It's not very clear, if we define a variable or at least put in the revert reason "
baseFeeScalar
" that would help a lot - The bit shift looks wrong, we probably want
<< 32
instead of<< 8
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 like this is not working indeed, i tried with the mask 0xfffff
and this seems to have a more reasonable value @geoknee:
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.
Fixed this here. In fact what I was trying to do was compare the scalars without the scalar version (first byte). 556d1d5
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.
lib/forge-std
Outdated
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.
- Make sure this is not causing issue during simulation + broadcast (cf: This issue we had on the previous upgrades: feat(
forge script
): script broadcast dry runs should log transaction info to the terminal foundry-rs/foundry#9648)
|
||
function params() external view returns (uint128 prevBaseFee, uint64 prevBoughtGas, uint64 prevBlockNum); // nosemgrep | ||
|
||
function __constructor__() external; |
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.
function __constructor__() external;
NIT: curious to know if this is required?
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.
tasks/sep/027-holocene-system-config-upgrade-and-init-multi-chain/VALIDATION.md
Outdated
Show resolved
Hide resolved
- **Key**: `0x0000000000000000000000000000000000000000000000000000000000000068` | ||
**Before**: `0x0000000000000000000000000000000000000000000000000000000003938700` | ||
**After**: `0xx00000000000000000000000000000000000d273000001db00000000003938700` | ||
**Meaning**: Updates the `basefeeScalar` and `blobbasefeeScalar` storage variables to `7600` and `86200` respectively. These share a slot with the `gasLimit` which remans at `60000000` |
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.
@geoknee there is an error here the state is updating with 862000
.
We should make sure this is desired and this is a simple typo here:
`86200` respectively.
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.
Yes you are right this is a typo. I decoded it again by hand and have corrected the doc.
- **Key**: `0x0000000000000000000000000000000000000000000000000000000000000068` | ||
**Before**: `0x0000000000000000000000000000000000000000000000000000000001c9c380` | ||
**After**: `0x0000000000000000000000000000000000000000000a6fe00000000001c9c380` | ||
**Meaning**: Updates the `basefeeScalar` and `blobbasefeeScalar` storage variables to `68400` and `0` respectively. These share a slot with the `gasLimit` which remans at `30000000` |
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.
@geoknee there is an error here the state is updating with 684000.
We should make sure this is desired and this is a simple typo here:
to `68400`
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.
Yes you are right this is a typo. I decoded it again by hand and have corrected the doc.
tasks/sep/027-holocene-system-config-upgrade-and-init-multi-chain/VALIDATION.md
Outdated
Show resolved
Hide resolved
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.
do not use << 8 to trim encoding version
…ain/VALIDATION.md Co-authored-by: Ethnical <[email protected]>
…ain/VALIDATION.md Co-authored-by: Ethnical <[email protected]>
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! rechecked the tasks validation + simulation make sense to me!
Closes #394
See also #454
TODO
020
to signify that it was incorrect and that this task supercedes it