diff --git a/params/config.go b/params/config.go index c39766359..d5d93b825 100644 --- a/params/config.go +++ b/params/config.go @@ -574,7 +574,7 @@ func (c *ChainConfig) IsTerminalPoWBlock(parentTotalDiff *big.Int, totalDiff *bi // IsShanghai returns whether time is either equal to the Shanghai fork time or greater. func (c *ChainConfig) IsShanghai(num *big.Int, time uint64, currentArbosVersion uint64) bool { if c.IsArbitrum() { - return currentArbosVersion >= 11 + return currentArbosVersion >= ArbosVersion_11 } return c.IsLondon(num) && isTimestampForked(c.ShanghaiTime, time) } @@ -582,7 +582,7 @@ func (c *ChainConfig) IsShanghai(num *big.Int, time uint64, currentArbosVersion // IsCancun returns whether num is either equal to the Cancun fork time or greater. func (c *ChainConfig) IsCancun(num *big.Int, time uint64, currentArbosVersion uint64) bool { if c.IsArbitrum() { - return currentArbosVersion >= 20 + return currentArbosVersion >= ArbosVersion_20 } return c.IsLondon(num) && isTimestampForked(c.CancunTime, time) } diff --git a/params/config_arbitrum.go b/params/config_arbitrum.go index d87da292d..91fed4a75 100644 --- a/params/config_arbitrum.go +++ b/params/config_arbitrum.go @@ -22,10 +22,27 @@ import ( "github.com/ethereum/go-ethereum/common" ) -const ArbosVersion_FixRedeemGas = uint64(11) -const ArbosVersion_Stylus = uint64(30) -const ArbosVersion_StylusFixes = uint64(31) -const ArbosVersion_StylusChargingFixes = uint64(32) +const ArbosVersion_2 = uint64(2) +const ArbosVersion_3 = uint64(3) +const ArbosVersion_4 = uint64(4) +const ArbosVersion_5 = uint64(5) +const ArbosVersion_6 = uint64(6) +const ArbosVersion_7 = uint64(7) +const ArbosVersion_8 = uint64(8) +const ArbosVersion_9 = uint64(9) +const ArbosVersion_10 = uint64(10) +const ArbosVersion_11 = uint64(11) +const ArbosVersion_20 = uint64(20) +const ArbosVersion_30 = uint64(30) +const ArbosVersion_31 = uint64(31) +const ArbosVersion_32 = uint64(32) + +const ArbosVersion_FixRedeemGas = ArbosVersion_11 +const ArbosVersion_Stylus = ArbosVersion_30 +const ArbosVersion_StylusFixes = ArbosVersion_31 +const ArbosVersion_StylusChargingFixes = ArbosVersion_32 +const MaxArbosVersionSupported = ArbosVersion_32 +const MaxDebugArbosVersionSupported = ArbosVersion_32 type ArbitrumChainParams struct { EnableArbOS bool diff --git a/params/config_test.go b/params/config_test.go index ee9161546..262e147f6 100644 --- a/params/config_test.go +++ b/params/config_test.go @@ -131,7 +131,7 @@ func TestConfigRules(t *testing.T) { t.Errorf("expected %v to not be shanghai", currentArbosVersion) } stamp = 500 - currentArbosVersion = 11 + currentArbosVersion = ArbosVersion_11 if r := c.Rules(big.NewInt(0), true, stamp, currentArbosVersion); !r.IsShanghai { t.Errorf("expected %v to be shanghai", currentArbosVersion) }