Merge note: currently cannot compile due to `quasiBoolean` (#63). This will be solved by https://github.com/status-im/nimbus/pull/65
----
* Implemented most of the stubbed out state handling instructions
The code compiles, but still fails at the moment due to incorrect
initialization of the VM. Don't merge yet. More commits will be
pushed in the coming days.
* Fixed crash
* trie put and del are void now
* getBlockTransactionData and getReceipts
* Working code for extcodesize0.json
* fix origin.json
* fix calldatasize1
* fix calldataloadSizeTooHighPartial
* fix calldataloadSizeTooHigh
* more efficient PushX implementation
* fix and, or, xor
* `usedBytes` was not named appropriately. it indicates the last
populated position in the data (the last valid index) for slicing
purposes (i.e. the position is passed to `toOpenArray`)
* Fixed the `==` operator for DBKeys
* Use one-byte key for the 'canonical head hash'
* Move and cleanup interpreter files - prepare for redesign of VM
* fix call comment aobut recursive dependencies
* memory: use a template again and avoid (?) a cstring-> string conversion
* Fix stack test regression
* Fix recursive dependency on logging_ops, test_vm_json compiles but regression :/
* Fix signextend regression
* Fix 3 signed test and sha3 test
* 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
* Start by renaming the fork by chronological order
* initial commit - groundwork: support different gasCosts depending on VMs
* Running VMTests with new gas config - only push32AndSuicide changed
* Introduce newNimbusVM that (temporarily) abstract over Frontier and Tangerine VM creation
* Fix Gas - push32AndSuicide repassing and expXY_success passing - fixes#34
* case sensitive imports (thank you auto-completion) fix Travis on Linux
* Add pre and post EIP-150 tests
* Nimify gas identifiers that supports multiple forks
* Stack underflow: Add failing test to catch #31
* ensurePop, use proc instead of template + add comment for future refactoring of popInternal
* Check stack underflows before popping values
* run json tests again
* Constants and accounts compile as standalone
* Mass replace ttmath by Stint
* Adapt utils_numeric proc
* Adapt memory.nim
* Deactivate "ValidationError" test that requires pow(2, 256) function
* Fix state_db toByteArrayBE
* Fix more getUint toInt conversion
* Remove absolute value ambiguous call
* Stub-ify proc and opcode that requires pow - https://github.com/status-im/nim-stint/issues/37
* Enable vm_tests, remove usage of from keyword as a variable name
* Fix Genesis types and use the new EthTime
* Add a new VMKind enum (py-evm vmclass runtime type)
* renaming block_obj to block_types
* chain.BlockHeader and utils.header.Header are the same thing (BlockHeader in py-evm)
* For now blockNumbers are UInt256
* EoD merge: vm_test compiles and does not throw computation error
* running full transactions is too early
Todo
Pass most VM opcode tests that we can (of those that don't depend
too much on porting the whole py-evm)
Simplify a bit the current py-evm-inspired internal loop arch