Skip to content

Commit

Permalink
Merge pull request #285 from OffchainLabs/cancun-arbos-20
Browse files Browse the repository at this point in the history
Enable Cancun fork in ArbOS 20
  • Loading branch information
PlasmaPower authored Jan 28, 2024
2 parents 214d1c1 + 1acd9c6 commit f04bb30
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions core/vm/eips.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package vm

import (
"errors"
"fmt"
"sort"

Expand Down Expand Up @@ -284,6 +285,9 @@ func opBlobHash(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([

// opBlobBaseFee implements BLOBBASEFEE opcode
func opBlobBaseFee(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) {
if interpreter.evm.chainConfig.IsArbitrum() {
return nil, errors.New("BLOBBASEFEE is not supported on Arbitrum")
}
blobBaseFee, _ := uint256.FromBig(interpreter.evm.Context.BlobBaseFee)
scope.Stack.push(blobBaseFee)
return nil, nil
Expand Down
3 changes: 3 additions & 0 deletions params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,9 @@ 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 c.IsLondon(num) && isTimestampForked(c.CancunTime, time)
}

Expand Down
4 changes: 2 additions & 2 deletions params/config_arbitrum.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func ArbitrumDevTestParams() ArbitrumChainParams {
EnableArbOS: true,
AllowDebugPrecompiles: true,
DataAvailabilityCommittee: false,
InitialArbOSVersion: 11,
InitialArbOSVersion: 20,
InitialChainOwner: common.Address{},
}
}
Expand All @@ -120,7 +120,7 @@ func ArbitrumDevTestDASParams() ArbitrumChainParams {
EnableArbOS: true,
AllowDebugPrecompiles: true,
DataAvailabilityCommittee: true,
InitialArbOSVersion: 11,
InitialArbOSVersion: 20,
InitialChainOwner: common.Address{},
}
}
Expand Down

0 comments on commit f04bb30

Please sign in to comment.