Skip to content

Commit

Permalink
Merge pull request ethereum#437 from etclabscore/tests/generate-mystique
Browse files Browse the repository at this point in the history
Tests/generate mystique
  • Loading branch information
meowsbits authored Jan 10, 2022
2 parents 51f3e97 + 09fb6f9 commit 2005145
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 10 deletions.
61 changes: 61 additions & 0 deletions tests/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,67 @@ var Forks = map[string]ctypes.ChainConfigurator{
EIP2718FBlock: big.NewInt(0),
EIP2930FBlock: big.NewInt(0),

DisposalBlock: big.NewInt(0),
ECIP1017FBlock: big.NewInt(5000000), // FIXME(meows) maybe
ECIP1017EraRounds: big.NewInt(5000000),
ECIP1010PauseBlock: nil,
ECIP1010Length: nil,
},
"ETC_Mystique": &coregeth.CoreGethChainConfig{
NetworkID: 1,
Ethash: new(ctypes.EthashConfig),
ChainID: big.NewInt(61),
EIP2FBlock: big.NewInt(0),
EIP7FBlock: big.NewInt(0),
EIP150Block: big.NewInt(0),
EIP155Block: big.NewInt(0),
EIP160FBlock: big.NewInt(0),
EIP161FBlock: big.NewInt(0),
EIP170FBlock: big.NewInt(0),
EIP100FBlock: big.NewInt(0),
EIP140FBlock: big.NewInt(0),
EIP198FBlock: big.NewInt(0),
EIP211FBlock: big.NewInt(0),
EIP212FBlock: big.NewInt(0),
EIP213FBlock: big.NewInt(0),
EIP214FBlock: big.NewInt(0),
EIP658FBlock: big.NewInt(0),
EIP145FBlock: big.NewInt(0),
EIP1014FBlock: big.NewInt(0),
EIP1052FBlock: big.NewInt(0),
EIP1283FBlock: big.NewInt(0),
PetersburgBlock: big.NewInt(0),
// Istanbul eq, aka Phoenix
// ECIP-1088
EIP152FBlock: big.NewInt(0),
EIP1108FBlock: big.NewInt(0),
EIP1344FBlock: big.NewInt(0),
EIP1884FBlock: big.NewInt(0),
EIP2028FBlock: big.NewInt(0),
EIP2200FBlock: big.NewInt(0), // RePetersburg (=~ re-1283)

// Berlin
EIP2565FBlock: big.NewInt(0),
EIP2929FBlock: big.NewInt(0),
EIP2718FBlock: big.NewInt(0),
EIP2930FBlock: big.NewInt(0),

// London
/*
https://github.com/ethereumclassic/ECIPs/blob/master/_specs/ecip-1104.md
3529 (Alternative refund reduction) #22733 Include
3541 (Reject new contracts starting with the 0xEF byte) #22809 Include
1559 (Fee market change) #22837 #22896 Omit
3198 (BASEFEE opcode) #22837 Omit
3228 (bomb delay) #22840 and #22870 Omit
*/
EIP3529FBlock: big.NewInt(0),
EIP3541FBlock: big.NewInt(0),
EIP1559FBlock: nil,
EIP3198FBlock: nil,
EIP3554FBlock: nil,

DisposalBlock: big.NewInt(0),
ECIP1017FBlock: big.NewInt(5000000), // FIXME(meows) maybe
ECIP1017EraRounds: big.NewInt(5000000),
Expand Down
1 change: 1 addition & 0 deletions tests/state_mgen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func TestGenStateAll(t *testing.T) {
tm.generateFromReference("ConstantinopleFix", "ETC_Agharta")
tm.generateFromReference("Berlin", "ETC_Magneto")
tm.generateFromReference("Istanbul", "ETC_Phoenix")
tm.generateFromReference("London", "ETC_Mystique")

for _, dir := range []string{
stateTestDir,
Expand Down
26 changes: 17 additions & 9 deletions tests/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"bufio"
"bytes"
"fmt"
"os"
"reflect"
"strings"
"testing"
Expand Down Expand Up @@ -65,22 +66,29 @@ func TestState(t *testing.T) {
if *testEVM != "" || *testEWASM != "" {
// Berlin tests are not expected to pass for external EVMs, yet.
//
st.skipFork("^Berlin$")
st.skipFork("Magneto")
st.skipFork("London")
st.skipFork("^Berlin$") // ETH
st.skipFork("Magneto") // ETC
st.skipFork("London") // ETH
st.skipFork("Mystique") // ETC
}
// The multigeth data type (like the Ethereum Foundation data type) doesn't support
// the ETC_Mystique fork/feature configuration, which omits EIP1559 and the associated BASEFEE
// opcode stuff. This configuration cannot be represented in their struct.
if os.Getenv(CG_CHAINCONFIG_FEATURE_EQ_MULTIGETHV0_KEY) != "" {
st.skipFork("ETC_Mystique")
}

// Un-skip this when https://github.com/ethereum/tests/issues/908 is closed
st.skipLoad(`^stQuadraticComplexityTest/QuadraticComplexitySolidity_CallDataCopy`)

// Broken tests:
// Expected failures:
//st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/Byzantium/0`, "bug in test")
//st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/Byzantium/3`, "bug in test")
//st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/Constantinople/0`, "bug in test")
//st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/Constantinople/3`, "bug in test")
//st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/ConstantinopleFix/0`, "bug in test")
//st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/ConstantinopleFix/3`, "bug in test")
// st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/Byzantium/0`, "bug in test")
// st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/Byzantium/3`, "bug in test")
// st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/Constantinople/0`, "bug in test")
// st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/Constantinople/3`, "bug in test")
// st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/ConstantinopleFix/0`, "bug in test")
// st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/ConstantinopleFix/3`, "bug in test")

// For Istanbul, older tests were moved into LegacyTests
for _, dir := range []string{
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata
Submodule testdata updated 4920 files

0 comments on commit 2005145

Please sign in to comment.