nimbus-eth1/tests
Mamy Ratsimbazafy 90c3ca4a96
Gas refactoring - decouple opcode logic and gas (#49)
* Decoupling op logic and gas - introduce gasometer, rework opcode declaration

* Remove gas constants for gas opcode computation

* Remove gas constants for precompiled contracts

* make vm_types compile

* Make opcode, call and computation compile

* Distinguish between dynamic and complex gas costs, fix arithmetic

* Fix context and sha3

* update memory and storage ops

* Log opcode uses memory expansion code

* update/stub system_ops with gas costs

* Make test compile. Deactivate stub test_vm

* all tests compiles, opcode fails due to https://github.com/nim-lang/Nim/issues/8007 (const object variant in tables reset at runtime)

* Create an enum without holes - workaround: https://github.com/nim-lang/Nim/issues/8007

* Use arrays instead of tables for GasCosts, remove some unused imports - passing all basic tests!

* Make test_vm_json compile

* Fix test_vm_json - workaround https://github.com/nim-lang/Nim/issues/8015

* fix memory expansion cost bug

* Remove leftover special handling from before GckMemExpansion

* cleanup outdated comment, better align =

* Fix sha3 gas cost not taking memory expansion into account

* Improve gas error reporting of test_vm_json

* Fix gas computation regression due to mem expansion

* mass replace for memExpansion->RequestedMemSize was too eager

* fix log gas cost (no tests :/)

* missed a static FeeSchedule

* static as expression is fickle
2018-06-12 17:33:47 +02:00
..
fixtures/VMTests WIP tests based on fixtures 2018-02-13 19:18:08 +02:00
README.md update test readme 2018-04-03 18:14:47 +02:00
all_tests.nim Gas refactoring - decouple opcode logic and gas (#49) 2018-06-12 17:33:47 +02:00
fixtures.nim Hash256/EthAddrres refactoring 2018-05-30 19:11:15 +03:00
test_code_stream.nim Some renames 2018-05-28 13:22:28 +03:00
test_gas_meter.nim Some renames 2018-05-28 13:22:28 +03:00
test_helpers.nim Hash256/EthAddrres refactoring 2018-05-30 19:11:15 +03:00
test_memory.nim Hash256/EthAddrres refactoring 2018-05-30 19:11:15 +03:00
test_opcode.nim Gas refactoring - decouple opcode logic and gas (#49) 2018-06-12 17:33:47 +02:00
test_stack.nim Hash256/EthAddrres refactoring 2018-05-30 19:11:15 +03:00
test_vm.nim Gas refactoring - decouple opcode logic and gas (#49) 2018-06-12 17:33:47 +02:00
test_vm_json.nim Gas refactoring - decouple opcode logic and gas (#49) 2018-06-12 17:33:47 +02:00

README.md

tests

TODO: more vm tests and fixtures!