Commit Graph

22 Commits

Author SHA1 Message Date
Jordan Hrycaj 827b8c9c81
reset explicit import paths for local modules
why:
  it was convenient to have relocatable source modules when writing the
  vm interface wrappers. this patch moves it back to the standard.

also:
  there are no deep links into the vm folder anymore which leaves some
  room for manoeuvring inside
2021-04-01 12:53:22 +01:00
Jordan Hrycaj 9e365734e6
renamed nvm_ prefixed modules to its original names
why:
  the nvm_ prefix was used inside the vm folder to hide them temporarily
  from the outside world while writing export wrappers. now all
  functionality is accessed via vm_*, rather than vm/* imports.

todo:
  at a later stage the import headers of the vm modules need to get fixed
  to meet style guide standards (as jacek kindly pointed out.)
2021-03-31 17:19:54 +01:00
Jordan Hrycaj eee24de450
provide vm_message as import/export wrapper
details:
  moved original vm/message.nim => vm/nvm_message.nim
2021-03-31 16:47:02 +01:00
Jordan Hrycaj ed59f602d5
isolate vm_types as import/export wrapper
details:
  moved original vm_types.nim => vm/nvm_types.nim
2021-03-31 09:48:50 +01:00
Jordan Hrycaj a3db0f41d8
remove relative paths ./ and ../ from import section
why:
  relative paths make sources inherently non-relocatable

details:
  import base is set to the nimbus directoy, so importing ./stack
  from file interpreter.nim becomes vm/stack etc.

caveat:
   a file named nimbus/strformat.nim would clash with strformat (but
   not with std/strformat)
2021-03-30 17:20:43 +01:00
andri lim af02a3b1b2
reduce unused import warnings 2020-04-15 19:05:57 +07:00
andri lim bab359cabf move origin and gasPrice from Message to vmState 2020-01-20 18:36:58 +02:00
andri lim 8f7597e23b [skip ci] add evmc CallKind to EVM Message 2020-01-19 19:17:37 +02:00
andri lim 40ddbca1ee [skip ci] simplify EVM message creation 2020-01-19 19:17:37 +02:00
andri lim 1883472104
fix evm msg contract creation, GST +3 2019-04-18 12:42:37 +07:00
Yuriy Glukhov 481c6cf4ed Use nim-eth (#224) 2019-02-05 20:15:50 +01:00
Ștefan Talpalaru 03ec65487d
logging changes
- port some "echo" logging to "chronicles"
- change the logging level of messages that should not appear by default
  to TRACE instead of DEBUG
- remove the "nimbusTrace" define
- suppress logging for messages below the ERROR level in "nimble test"
2018-12-07 00:45:52 +01:00
coffeepots 492d2ae676 Debug message for new messages 2018-11-08 15:48:32 +00:00
coffeepots 2a38c0194d Expose isCreate for export 2018-09-14 16:16:55 +01:00
Yuriy Glukhov 3a1ec035b3 Various fixes towards state reconstruction 2018-09-07 14:00:37 +03: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
Dustin Brody f91bb16bdd Initial EVMC message type API matching: reorder overlapping fields to match EMVC; rename to to destination; replace isStatic with more general flags (with only one non-zero value); remove superfluous-seeming shouldTransferValue; keep internalFoo fields, which aren't in PyEVM either, so weren't per se part of PyEVM matching 2018-08-14 15:03:18 +03:00
coffeepots e33bc85bfa Remove validateCanonicalAddress 2018-07-19 19:04:01 +01:00
Mamy Ratsimbazafy 4dd75aee84
Delete utilities: address, padding, bytes (#68)
* Delete utilities: address, padding, bytes

* Remove bigEndianToInt

* Fix C compiler error: member reference base type 'char' is not a structure or union

* fix todo comment
2018-07-06 17:08:31 +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
Yuriy Glukhov 8bdf09683b Hash256/EthAddrres refactoring 2018-05-30 19:11:15 +03:00
Yuriy Glukhov 51b572d8b8 Some renames 2018-05-28 13:22:28 +03:00