Commit Graph

17 Commits

Author SHA1 Message Date
Jordan Hrycaj c8582583ef
merge vm_memory, vm_interpreter, and vm_utils_numeric => vm_internals
why:
  currently used for tests only
2021-03-31 18:15:27 +01:00
Jordan Hrycaj 5ce7ca6b32
provide vm_interpreter as import/export wrapper
details:
  moved original vm/interpreter.nim => vm/nvm_interpreter.nim
2021-03-31 16:47:08 +01:00
andri lim 85c36647d1 make tests green 2020-02-12 17:53:26 +02:00
Ștefan Talpalaru d84e4810d5
unittest2 (parallelism disabled)
This is https://github.com/status-im/nimbus/pull/332 with parallelism
disabled, while some threadpool deadlock is being debugged.
2019-10-31 06:17:01 +01:00
andri lim 321f13dc19
attempt to add simple cli to all_tests 2019-09-21 12:45:23 +07:00
Ștefan Talpalaru a67edd693a
assert() -> doAssert() 2019-03-13 22:36:54 +01:00
Yuriy Glukhov 481c6cf4ed Use nim-eth (#224) 2019-02-05 20:15:50 +01:00
Jacek Sieka db202dc35f
replace logging module with nim-chronicles (fixes #38)
This blindly changes logging to nim-chronicles - issues that ensue:

* keeps gas cost computation logs hidden behind flag
* unclear if logScope is practical - for example, since vm is split over
many files, topics get lost when using simple top-level per-module
topics
* when passing named object around, scope should incliude the name of
the object but this is caught neither by logScope nor by dynamicLogScope
2018-08-29 16:13:03 -06:00
Yuriy Glukhov b2acf3a5e3 GasMeter is an object now (#73) 2018-07-18 14:18:17 +02:00
zah 18b7bbb3b0 Implemented most of the stubbed-out state handling instructions (#59)
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
2018-07-05 14:41:01 +02:00
mratsim 05703fc86f logging: non-debug costless, avoid allocating constant string messages 2018-06-15 14:20:42 +02:00
Mamy Ratsimbazafy c26c751f9b
Reorganize VM/interpreter + cleanup (#52)
* 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
2018-06-15 11:11:25 +02:00
Yuriy Glukhov 51b572d8b8 Some renames 2018-05-28 13:22:28 +03:00
Mamy Ratsimbazafy cb49352b6a
Gas & Memory ops refactoring - uses native integer instead of uint256 fixes #35 and #39 (#40)
* Gas refactoring - uses int64

* Use primitive int in test_vm_json
2018-05-25 12:25:19 +02:00
Mamy Ratsimbazafy 2d34f1453c
Migrate from ttmath to stint (#24)
* 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
2018-05-07 14:41:54 +02:00
mratsim 5a3202f4d3 Update README badges and add dual-license header 2018-04-06 16:52:10 +02:00
mratsim 3852c84841 Refactor: remove .sh dependency for tests 2018-04-03 18:09:09 +02:00