diff --git a/op-chain-ops/genesis/layer_two.go b/op-chain-ops/genesis/layer_two.go index fc50f9711dd9b2b2656b85931bcd8d248fc7e320..783ea736131551409ca487da01bb3ce0c1a1ef32 100644 --- a/op-chain-ops/genesis/layer_two.go +++ b/op-chain-ops/genesis/layer_two.go @@ -75,9 +75,5 @@ func BuildL2Genesis(db *state.MemoryStateDB, config *DeployConfig, l1Block *type return nil, err } - if err := MigrateDepositHashes(db); err != nil { - return nil, err - } - return db.Genesis(), nil } diff --git a/op-chain-ops/genesis/setters.go b/op-chain-ops/genesis/setters.go index f38e6988947570a216fda02ae37532011f863e4e..3d912a8d92216e446905572d264917423c7860d3 100644 --- a/op-chain-ops/genesis/setters.go +++ b/op-chain-ops/genesis/setters.go @@ -115,36 +115,6 @@ func SetImplementations(db vm.StateDB, storage state.StorageConfig, immutable im return nil } -// Get the storage layout of the LegacyMessagePasser -// Iterate over the storage layout to know which storage slots to ignore -// Iterate over each storage slot, compute the migration -func MigrateDepositHashes(db vm.StateDB) error { - layout, err := bindings.GetStorageLayout("LegacyMessagePasser") - if err != nil { - return err - } - - // Build a list of storage slots to ignore. The values in the - // mapping are guaranteed to not be in this list because they are - // hashes. - ignore := make(map[common.Hash]bool) - for _, entry := range layout.Storage { - encoded, err := state.EncodeUintValue(entry.Slot, 0) - if err != nil { - return err - } - ignore[encoded] = true - } - - return db.ForEachStorage(predeploys.LegacyMessagePasserAddr, func(key, value common.Hash) bool { - if _, ok := ignore[key]; ok { - return true - } - // TODO(tynes): Do the value migration here - return true - }) -} - // SetPrecompileBalances will set a single wei at each precompile address. // This is an optimization to make calling them cheaper. This should only // be used for devnets.