Skip to content

Commit

Permalink
[evm] defer Cancun enabling (#4308)
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinxie authored Jun 20, 2024
1 parent 5a6871d commit 1e42b55
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
6 changes: 0 additions & 6 deletions action/protocol/execution/evm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,12 +441,6 @@ func getChainConfig(g genesis.Blockchain, height uint64, id uint32, getBlockTime
}
sumatraTimestamp := (uint64)(sumatraTime.Unix())
chainConfig.ShanghaiTime = &sumatraTimestamp
upernavikTime, err := getBlockTime(g.UpernavikBlockHeight)
if err != nil {
return nil, err
}
upernavikTimestamp := (uint64)(upernavikTime.Unix())
chainConfig.CancunTime = &upernavikTimestamp
return &chainConfig, nil
}

Expand Down
8 changes: 4 additions & 4 deletions action/protocol/execution/evm/evm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,10 @@ func TestConstantinople(t *testing.T) {
require.Equal(isSumatra, chainRules.IsMerge)
require.Equal(isSumatra, chainRules.IsShanghai)

// Upernavik = enable Cancun
isUpernavik := g.IsUpernavik(e.height)
require.Equal(isUpernavik, chainRules.IsCancun)
//Prague not yet enabled
// Cancun and Prague not yet enabled
require.False(chainRules.IsCancun)
require.False(evmChainConfig.IsCancun(big.NewInt(int64(e.height)), evm.Context.Time))
require.False(chainRules.IsPrague)
require.False(evmChainConfig.IsPrague(big.NewInt(int64(e.height)), evm.Context.Time))

// test basefee
Expand Down
2 changes: 2 additions & 0 deletions action/protocol/execution/protocol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,8 @@ func TestShanghaiEVM(t *testing.T) {

func TestCancunEVM(t *testing.T) {
t.Run("eip1153-transientstorage", func(t *testing.T) {
// TODO: re-enable this test when enable Cancun
t.Skip()
NewSmartContractTest(t, "testdata-cancun/transientstorage.json")
})
}
Expand Down

0 comments on commit 1e42b55

Please sign in to comment.