-
Notifications
You must be signed in to change notification settings - Fork 49
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
#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
import {NestedMultisigBuilder} from "@base-contracts/script/universal/NestedMultisigBuilder.sol"; | ||
import {SystemConfigUpgrade} from "script/verification/SystemConfigUpgrade.s.sol"; | ||
|
||
contract SystemConfigUpgradeEcotoneScalars is SystemConfigUpgrade { |
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.
Same comment about adding explanatory code comments
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.
uint256 reencodedScalar = | ||
(uint256(0x01) << 248) | (uint256(sysCfg.blobbasefeeScalar()) << 32) | sysCfg.basefeeScalar(); |
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.
Is this only needed temporarily since we are upgrading the SystemConfig to a version that no longer needs encoding?
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.
The sysCfg.blobbasefeeScalar()
and sysCfg.basefeeScalar()
getters read from dedicated storage slots. When we did the upgrade incorrectly previously, these storage slots were not updated causing the getters to return 0
. Now, we are checking they return values consistent with what you get if you call sysCfg.scalar()
and decode them by hand.
Essentially we implicitly construct the expected values for the two new getters by reencoding what we get after the upgrade and checking it matches the previous scalar
value.
I could try redesigning this so it is more explicit, and decode the expected values from the previous.scalar and compare the new getter's results with those?
if ( | ||
uint8(previous.scalar >> 248) == 1 // most significant bit | ||
) { |
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.
Why is this behind an if
block? A code comment for what this method is testing would be helpful for people not familiar with this encoding
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.
Tidied that up here 5253651 PTAL hopefully it is clear now.
tasks/sep/020-holocene-system-config-upgrade-multi-chain/README.md
Outdated
Show resolved
Hide resolved
|
||
contract NestedSignFromJson is OriginalNestedSignFromJson, CouncilFoundationNestedSign { | ||
string constant l1ChainName = "sepolia"; | ||
string constant release = "v1.8.0-rc.4"; |
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.
The gov proposal has passed so we don't need to use the RC anymore and should be using the finalized release, which is what we want for mainnet also
string constant release = "v1.8.0-rc.4"; | |
string constant release = "v1.8.0"; |
tasks/sep/027-holocene-system-config-upgrade-and-init-multi-chain/OVERVIEW.md
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,30 @@ | |||
# Holocene Hardfork Upgrade - `SystemConfig` | |||
|
|||
Status: DRAFT, NOT READY TO SIGN |
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.
what do we need for this to become ready to sign?
Status: DRAFT, NOT READY TO SIGN | |
Status: DRAFT, NOT READY TO SIGN |
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 updated it now, there are no blockers other than review of this PR.
This upgrades the `SystemConfig` in the | ||
[v1.8.0-rc.4](https://github.com/ethereum-optimism/optimism/tree/v1.8.0-rc.4) release. |
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.
we should just use 1.8.0 now that it's passed
This upgrades the `SystemConfig` in the | |
[v1.8.0-rc.4](https://github.com/ethereum-optimism/optimism/tree/v1.8.0-rc.4) release. | |
This upgrades the `SystemConfig` in the | |
[v1.8.0](https://github.com/ethereum-optimism/optimism/tree/v1.8.0) release. |
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 agree that passing governance process is a prompt for us finalizing the release. We have some options on the ordering of next steps however:
- We can (should) make the final tag now in any case.
- We can update the superchain registry TOML files with the finalized tag, either
a. by adding a new release tostandard-versions-mainnet.toml
and keeping the existingv1.8.0-rc.4
entry. We would then want to go back and remove the latter when all tasks referencing it have been executed.
b. by modifying the existing release but waiting to do that until all tasks including this one are executed
c. by modifying the existing release and modifying any existing tasks that reference it.
Curious what you think makes the most sense? I'd prefer if we can settle on a flow which is as clear and consistent as possible given we will go through this on each and every hard fork / upgrade. I'm inclined towards option b.
|
||
## Pre-deployments | ||
|
||
- `SystemConfig` - `0x33b83E4C305c908B2Fc181dDa36e230213058d7d` |
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.
Any messages you can link to so I can verify this address?
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.
This is actually the same address from the previous (incorrect) upgrade
superchain-ops/tasks/sep/020-holocene-system-config-upgrade-multi-chain/README.md
Line 21 in 6b75741
- `SystemConfig` - `0x33b83E4C305c908B2Fc181dDa36e230213058d7d` |
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.
See also ethereum-optimism/optimism#13009
tasks/sep/027-holocene-system-config-upgrade-and-init-multi-chain/README.md
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,85 @@ | |||
# Validation |
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 have not yet validated this file or run the simulation
…ain/README.md Co-authored-by: Matt Solomon <matt@mattsolomon.dev>
TODO
020
to signify that it was incorrect and that this task supercedes itCloses #394