Commit d7032bc1 authored by Matthew Slipper's avatar Matthew Slipper Committed by GitHub

Merge pull request #4695 from ethereum-optimism/feat/finalize-config

finalize goerli config
parents 74486246 74268b69
......@@ -205,6 +205,7 @@ func main() {
&config.L1CrossDomainMessengerProxy,
config.L1ChainID,
config.FinalSystemOwner,
config.ProxyAdminOwner,
&derive.L1BlockInfo{
Number: block.NumberU64(),
Time: block.Time(),
......
......@@ -93,6 +93,7 @@ func PostCheckMigratedDB(
l1XDM *common.Address,
l1ChainID uint64,
finalSystemOwner common.Address,
proxyAdminOwner common.Address,
info *derive.L1BlockInfo,
) error {
log.Info("Validating database migration")
......@@ -123,7 +124,7 @@ func PostCheckMigratedDB(
return fmt.Errorf("cannot open StateDB: %w", err)
}
if err := PostCheckPredeployStorage(db, finalSystemOwner); err != nil {
if err := PostCheckPredeployStorage(db, finalSystemOwner, proxyAdminOwner); err != nil {
return err
}
log.Info("checked predeploy storage")
......@@ -276,7 +277,7 @@ func PostCheckPredeploys(db *state.StateDB) error {
// PostCheckPredeployStorage will ensure that the predeploys had their storage
// wiped correctly.
func PostCheckPredeployStorage(db vm.StateDB, finalSystemOwner common.Address) error {
func PostCheckPredeployStorage(db vm.StateDB, finalSystemOwner common.Address, proxyAdminOwner common.Address) error {
for name, addr := range predeploys.Predeploys {
if addr == nil {
return fmt.Errorf("nil address in predeploys mapping for %s", name)
......@@ -315,8 +316,8 @@ func PostCheckPredeployStorage(db vm.StateDB, finalSystemOwner common.Address) e
// They are set to the final system owner in the config.
if (*addr == predeploys.L2CrossDomainMessengerAddr && key == L2XDMOwnerSlot) || (*addr == predeploys.ProxyAdminAddr && key == ProxyAdminOwnerSlot) {
actualOwner := common.BytesToAddress(slots[key].Bytes())
if actualOwner != finalSystemOwner {
return fmt.Errorf("expected owner for %s to be %s but got %s", name, finalSystemOwner, actualOwner)
if actualOwner != proxyAdminOwner {
return fmt.Errorf("expected owner for %s to be %s but got %s", name, proxyAdminOwner, actualOwner)
}
log.Debug("validated special case owner slot", "value", actualOwner, "name", name)
continue
......
......@@ -4,7 +4,7 @@
"finalSystemOwner": "0xBc1233d0C3e6B5d53Ab455cF65A6623F6dCd7e4f",
"controller": "0xBc1233d0C3e6B5d53Ab455cF65A6623F6dCd7e4f",
"l1StartingBlockTag": "FILL_IN_DAY_OF",
"l1StartingBlockTag": "0x6ffc1bf3754c01f6bb9fe057c1578b87a8571ce2e9be5ca14bace6eccfd336c7",
"l1ChainID": 5,
"l2ChainID": 420,
......@@ -19,8 +19,8 @@
"batchSenderAddress": "0x7431310e026B69BFC676C0013E12A1A11411EEc9",
"l2OutputOracleSubmissionInterval": 12,
"l2OutputOracleStartingBlockNumber": "FILL_IN_DAY_OF",
"l2OutputOracleStartingTimestamp": "FILL_IN_DAY_OF",
"l2OutputOracleStartingBlockNumber": 4061224,
"l2OutputOracleStartingTimestamp": 1673550516,
"l2OutputOracleProposer": "0x02b1786A85Ec3f71fBbBa46507780dB7cF9014f6",
"l2OutputOracleChallenger": "0xBc1233d0C3e6B5d53Ab455cF65A6623F6dCd7e4f",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment