Commit Graph

64 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 7b5d00307c
provide vm_precompiles as import/export wrapper
details:
  moved original vm/precompiles.nim => vm/nvm_precompiles.nim
2021-03-31 16:47:15 +01:00
Jordan Hrycaj 689458a346
provide vm_gas_costs as import/export wrapper
details:
  moved original vm/interpreter/vm_gas_costs.nim => vm/interpreter/nvm_gas_costs.nim
2021-03-31 16:03:51 +01:00
Jordan Hrycaj 3a3e4d5707
provide vm_forks as import/export wrapper
details:
  moved original vm/interpreter/vm_forks.nim => vm/interpreter/nvm_forks.nim
2021-03-31 16:03:34 +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
jangko f906d177f4
add comments about disabled EIPs 2021-01-11 15:33:30 +07:00
jangko 3db535aa39
EIP2929 implementation 2021-01-11 14:56:42 +07:00
jangko ab314c1e04
temporary disable EIP2046 and EIP2565 2021-01-11 14:53:51 +07:00
jangko 397119468a
simplify bncurve getPoint 2020-12-02 16:17:52 +07:00
jangko fec9d26873
more eip2537 cleanup 2020-12-02 15:15:58 +07:00
jangko 3f79588a74
EIP2537 part 3 2020-11-29 08:01:17 +07:00
jangko 0799b4534c
EIP2537 part 2 2020-11-28 23:13:10 +07:00
jangko c1b7ae5b02
EIP2537 part 1 2020-11-27 21:42:17 +07:00
jangko 971e00e580
precompile contracts test rework 2020-11-25 20:42:15 +07:00
jangko 5bb6418bcb
implement EIP2565 2020-11-24 16:19:02 +07:00
jangko 845671bf0a
fix compilation error following breaking changes in nim-eth 2020-07-20 13:50:05 +07:00
andri lim af02a3b1b2
reduce unused import warnings 2020-04-15 19:05:57 +07:00
Jacek Sieka 1d472cf090
Eth keys (#482)
* bump nim-eth, fix deprecated calls
2020-04-05 15:12:48 +02:00
andri lim 15c9fa54ec fixes modexp gasFee bug 2020-02-18 20:11:36 +02:00
andri lim deb09f40f0 less explicit 'copyMem' 2020-02-12 17:53:26 +02:00
andri lim 8564e9532b change 'rawOutput' to 'output' 2020-02-12 17:53:26 +02:00
andri lim 0b99b76cd1 change 'BaseComputation' to 'Computation' 2020-01-20 18:36:58 +02:00
kdeme 9964a55772 Replace getCurrentException 2019-12-05 13:02:21 +01:00
andri lim 4fbc9727d8 revert accidentally changed GasQuadDivisor 2019-11-12 15:51:48 +00:00
andri lim cda3e2811f implement EIP 1108 2019-11-12 15:51:48 +00:00
andri lim b3cbf620d6 implement EIP-152 2019-11-12 15:51:48 +00:00
Ștefan Talpalaru 70bcce2132
a couple of Nim 1.0.2-related fixes 2019-10-28 22:21:20 +07:00
kdeme 1a3a29c419 Make EVMError Catchable and only catch CatchableError in the execPrecompiles 2019-07-19 15:18:25 +03:00
kdeme f6d784c8b0 Rework the getSignature of ecrecover 2019-07-19 15:18:25 +03:00
kdeme 26bc048fea Fix possible IndexError in ecrecover 2019-07-19 15:18:25 +03:00
andri lim 077fbe6b73 modexp cleanup 2019-05-13 10:26:28 +03:00
andri lim b7a1431c33 fix modexp gasFee 2019-05-13 10:26:28 +03:00
andri lim cd7143e9af fix modexp 2019-05-13 10:26:28 +03:00
andri lim f809a864b1 fix calcMemSize bug 2019-05-13 10:26:28 +03:00
andri lim cee0a38278
add some comment 2019-04-26 07:31:18 +07:00
andri lim fd7c447f18
fix modexp output, GST +53 2019-04-26 07:31:16 +07:00
andri lim 03ea1c5a85
fix ecRecover precompiles, GST +1 2019-04-26 07:31:15 +07:00
andri lim c57295da0b
fix precompiles error handling, GST +262 2019-04-26 07:31:13 +07:00
andri lim 07ac4620d9
remove 'var' modifier from 'computation: var BaseComputation' 2019-04-04 10:20:00 +07:00
andri lim 26b40f41e3
fix precompiles selection, GST +5 2019-04-02 13:11:00 +07:00
andri lim 7198ce2d05
fix ecrecover bad V, GST +1 2019-03-18 19:28:42 +07:00
andri lim b1da3576ad
fix block 1149150 problem 2019-03-11 18:50:13 +07:00
andri lim de809b0060
fix block 1017395 problem 2019-03-11 12:03:57 +07:00
andri lim 71e7ee2dae fixes ECRecover precompiles 2019-02-20 15:16:07 +02:00
andri lim 5701c8bacb fixes precompile contract: identity gascost 2019-02-15 17:20:51 +02:00
Yuriy Glukhov 481c6cf4ed Use nim-eth (#224) 2019-02-05 20:15:50 +01:00
Ștefan Talpalaru f91e69f7c7
more VM tracing
The existing vmState tracing is plugged into chronicles, at the TRACE
level, to facilitate state test debugging.

Some useful chronicles defines are added to "tests/nim.cfg" to simplify
the compile-and-run command for individual tests.
2018-12-12 11:47:10 +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