Skip to content

Commit

Permalink
Enable running new Istanbul tests, add list of failing tests (#599)
Browse files Browse the repository at this point in the history
* evm, state-loader: add Istanbul schedule

* Makefile: use Istanbul tests and LegacyTests

* tests/{failing,slow}.{llvm,ocaml}: add failing/slow Istanbul tests

A test is `slow` if it either takes longer that 120s or passes in 120s but takes >10G RAM.
A test is `failing` if it exits with code non-0 in less than 120s.
  • Loading branch information
ehildenb authored Dec 4, 2019
1 parent 4d66123 commit 58cab80
Show file tree
Hide file tree
Showing 7 changed files with 2,866 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,8 @@ test-all-vm: $(all_vm_tests:=.run)
test-rest-vm: $(rest_vm_tests:=.run)
test-vm: $(passing_vm_tests:=.run)

all_bchain_tests = $(wildcard tests/ethereum-tests/LegacyTests/Constantinople/BlockchainTests/GeneralStateTests/*/*.json)
all_bchain_tests = $(wildcard tests/ethereum-tests/BlockchainTests/GeneralStateTests/*/*.json) \
$(wildcard tests/ethereum-tests/LegacyTests/Constantinople/BlockchainTests/GeneralStateTests/*/*.json)
quick_bchain_tests = $(filter-out $(slow_conformance_tests), $(all_bchain_tests))
passing_bchain_tests = $(filter-out $(failing_conformance_tests), $(quick_bchain_tests))
rest_bchain_tests = $(filter-out $(passing_bchain_tests), $(all_bchain_tests))
Expand Down
11 changes: 11 additions & 0 deletions evm.md
Original file line number Diff line number Diff line change
Expand Up @@ -1690,6 +1690,7 @@ Precompiled Contracts
rule #precompiledAccounts(BYZANTIUM) => #precompiledAccounts(SPURIOUS_DRAGON) SetItem(5) SetItem(6) SetItem(7) SetItem(8)
rule #precompiledAccounts(CONSTANTINOPLE) => #precompiledAccounts(BYZANTIUM)
rule #precompiledAccounts(PETERSBURG) => #precompiledAccounts(CONSTANTINOPLE)
rule #precompiledAccounts(ISTANBUL) => #precompiledAccounts(PETERSBURG)
```

- `ECREC` performs ECDSA public key recovery.
Expand Down Expand Up @@ -2431,6 +2432,16 @@ A `ScheduleConst` is a constant determined by the fee schedule.
requires notBool ( SCHEDFLAG ==K Ghasdirtysstore )
```

### Istanbul Schedule

```k
syntax Schedule ::= "ISTANBUL" [klabel(ISTANBUL_EVM), symbol]
// -------------------------------------------------------------
rule SCHEDCONST < ISTANBUL > => SCHEDCONST < PETERSBURG >
rule SCHEDFLAG << ISTANBUL >> => SCHEDFLAG << PETERSBURG >>
```

EVM Program Representations
===========================

Expand Down
1 change: 1 addition & 0 deletions state-loader.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ The `"network"` key allows setting the fee schedule inside the test.
rule #asScheduleString("Byzantium") => BYZANTIUM
rule #asScheduleString("Constantinople") => CONSTANTINOPLE
rule #asScheduleString("ConstantinopleFix") => PETERSBURG
rule #asScheduleString("Istanbul") => ISTANBUL
```

The `"rlp"` key loads the block information.
Expand Down
1,419 changes: 1,419 additions & 0 deletions tests/failing.llvm

Large diffs are not rendered by default.

1,415 changes: 1,415 additions & 0 deletions tests/failing.ocaml

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions tests/slow.llvm
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
tests/ethereum-tests/BlockchainTests/GeneralStateTests/stQuadraticComplexityTest/QuadraticComplexitySolidity_CallDataCopy.json
tests/ethereum-tests/BlockchainTests/GeneralStateTests/stQuadraticComplexityTest/Return50000_2.json
tests/ethereum-tests/BlockchainTests/GeneralStateTests/stQuadraticComplexityTest/Return50000.json
tests/ethereum-tests/BlockchainTests/GeneralStateTests/stStaticCall/static_Call50000.json
tests/ethereum-tests/BlockchainTests/GeneralStateTests/stStaticCall/static_Call50000_rip160.json
tests/ethereum-tests/BlockchainTests/GeneralStateTests/stTimeConsuming/static_Call50000_sha256.json
tests/ethereum-tests/LegacyTests/Constantinople/BlockchainTests/GeneralStateTests/stAttackTest/ContractCreationSpam_d0g0v0.json
tests/ethereum-tests/LegacyTests/Constantinople/BlockchainTests/GeneralStateTests/stCodeSizeLimit/codesizeOOGInvalidSize_d0g0v0.json
tests/ethereum-tests/LegacyTests/Constantinople/BlockchainTests/GeneralStateTests/stCodeSizeLimit/codesizeValid_d0g0v0.json
Expand Down
12 changes: 12 additions & 0 deletions tests/slow.ocaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
tests/ethereum-tests/BlockchainTests/GeneralStateTests/stQuadraticComplexityTest/Call50000.json
tests/ethereum-tests/BlockchainTests/GeneralStateTests/stQuadraticComplexityTest/Callcode50000.json
tests/ethereum-tests/BlockchainTests/GeneralStateTests/stQuadraticComplexityTest/QuadraticComplexitySolidity_CallDataCopy.json
tests/ethereum-tests/BlockchainTests/GeneralStateTests/stQuadraticComplexityTest/Return50000_2.json
tests/ethereum-tests/BlockchainTests/GeneralStateTests/stQuadraticComplexityTest/Return50000.json
tests/ethereum-tests/BlockchainTests/GeneralStateTests/stStaticCall/static_Call50000_ecrec.json
tests/ethereum-tests/BlockchainTests/GeneralStateTests/stStaticCall/static_Call50000_identity2.json
tests/ethereum-tests/BlockchainTests/GeneralStateTests/stStaticCall/static_Call50000_identity.json
tests/ethereum-tests/BlockchainTests/GeneralStateTests/stStaticCall/static_Call50000.json
tests/ethereum-tests/BlockchainTests/GeneralStateTests/stStaticCall/static_Call50000_rip160.json
tests/ethereum-tests/BlockchainTests/GeneralStateTests/stStaticCall/static_Return50000_2.json
tests/ethereum-tests/BlockchainTests/GeneralStateTests/stTimeConsuming/static_Call50000_sha256.json
tests/ethereum-tests/LegacyTests/Constantinople/BlockchainTests/GeneralStateTests/stCreateTest/CREATE_ContractRETURNBigOffset_d0g0v0.json
tests/ethereum-tests/LegacyTests/Constantinople/BlockchainTests/GeneralStateTests/stQuadraticComplexityTest/Call50000bytesContract50_1_d0g0v0.json
tests/ethereum-tests/LegacyTests/Constantinople/BlockchainTests/GeneralStateTests/stQuadraticComplexityTest/Call50000bytesContract50_1_d0g1v0.json
Expand Down

0 comments on commit 58cab80

Please sign in to comment.