From a93401004e6abf1e7c27879e449a7d39f19e174d Mon Sep 17 00:00:00 2001 From: Zach Showalter Date: Tue, 3 Sep 2024 11:11:58 -0400 Subject: [PATCH] modify arbosstate.go to allow for upgrade to arbOS version 35 (#216) * modify arbosstate.go to allow for upgrade to arbOS version 35 * Fix lint * Modify the chain config during the ArbOS upgrade --------- Co-authored-by: sveitser --- arbos/arbosState/arbosstate.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/arbos/arbosState/arbosstate.go b/arbos/arbosState/arbosstate.go index 9ff3dd3aa5..b1c47ffdf4 100644 --- a/arbos/arbosState/arbosstate.go +++ b/arbos/arbosState/arbosstate.go @@ -74,8 +74,8 @@ func OpenArbosState(stateDB vm.StateDB, burner burn.Burner) (*ArbosState, error) } return &ArbosState{ arbosVersion, - 31, - 31, + 35, + 35, backingStorage.OpenStorageBackedUint64(uint64(upgradeVersionOffset)), backingStorage.OpenStorageBackedUint64(uint64(upgradeTimestampOffset)), backingStorage.OpenStorageBackedAddress(uint64(networkFeeAccountOffset)), @@ -324,6 +324,16 @@ func (state *ArbosState) UpgradeArbosVersion( ensure(params.UpgradeToVersion(2)) ensure(params.Save()) + case 32, 33, 34: + // these versions are left to Orbit chains for custom upgrades. + + case 35: + // Espresso marketplace compatible ArbOS version. + chainConfig.ArbitrumChainParams.EnableEspresso = true + + case 36, 37, 38, 39: + // these versions are left to Orbit chains for custom upgrades. + default: return fmt.Errorf( "the chain is upgrading to unsupported ArbOS version %v, %w",