This release comes with a modernized ES6
-class structured code base, some
significant local refactoring work regarding how Stack
and Memory
are organized within the VM and it finalizes a first round of module structuring
now having separate folders for bloom
, evm
and state
related code. The
release also removes some rarely used parts of the API (hookedVM
, VM.deps
).
All this is to a large extend preparatory work for a v4.0.0
release which will
follow in the next months with TypeScript
support and more system-wide
refactoring work leading to a more modular and expandable VM and providing the
ground for future eWASM
integration. If you are interested in the release
process and want to take part in the refactoring discussion see the associated
issue #455.
VM Refactoring/Breaking Changes
- New
Memory
class for evm memory manipulation, PR #442 - Refactored
Stack
manipulation in evm, PR #460 - Dropped
createHookedVm
(BREAKING), being made obsolete by the newStateManager
API, PR #451 - Dropped
VM.deps
attribute (please require dependencies yourself if you used this), PR #478 - Removed
fakeBlockchain
class and associated tests, PR #466 - The
petersburg
hardfork rules are now run as default (before:byzantium
), PR #485
Modularization
- Renamed
vm
module toevm
, moveprecompiles
toevm
module, PR #481 - Moved
stateManager
,storageReader
andcache
tostate
module, PR #443 - Replaced static VM
logTable
with dynamic inline version inEXP
opcode, PR #450
Code Modernization/ES6
- Converted
VM
toES6
class, PR #478 - Migrated
stateManager
andstorageReader
toES6
class syntax, PR #452
Bug Fixes
- Fixed a bug where
stateManager.setStateRoot()
didn't clear the_storageTries
cache, PR #445 - Fixed longer output than return length in
CALL
opcode, PR #454 - Use
BN.toArrayLike()
instead ofBN.toBuffer()
(browser compatibility), PR #458 - Fixed tx value overflow 256 bits, PR #471
Maintenance/Optimization
- Use
BN
reduction context inMODEXP
precompile, PR #463
Documentation
- Fixed API doc types for
Bloom
filter methods, PR #439
Testing
- New Karma browser testing for the API tests, PRs #461, PR #468
- Removed unused parts and tests within the test setup, PR #437
- Fixed a bug using
--json
trace flag in the tests, PR #438 - Complete switch to Petersburg on tests, fix coverage, PR #448
- Added test for
StateManager.dumpStorage()
, PR #462 - Fixed
ecmul_0-3_5616_28000_96
(by test setup adoption), PR #473