Commit Graph

23 Commits

Author SHA1 Message Date
jangko f2f204293e
first step into styleCheck fixes 2022-04-14 08:39:50 +07:00
jangko 521f29c0a0
remove unused calcGasLimit code
we have new calcGasLimit tested in sealing engine.
so we can safely remove the old unused calcGasLimit
2021-08-24 18:30:52 +07:00
jangko 7dbc44f88c
implement simple PoA sealing engine
the goal of this module is to pass hive/smoke/clique test
and also support for hive/ethereum/rpc test

fixes #801
2021-08-24 14:49:13 +07:00
jangko 18b26a0089
implement calcEIP1559GasLimit
CalcGasLimit1559 calculates the next block gas limit under 1559 rules.
this function is needed in upcoming sealing engine implementation
2021-08-18 20:23:38 +07:00
jangko db8988fe64
EIP-1559: Fee market change for ETH 1.0 chain
Transaction and BlockHeader already updated in nim-eth repo
to support EIP-1559

EIP-1559 header validation and gasLimit validation
already implemented in previous commit

This commit deals with block validation:
- Effective gasPrice per EIP-1559
- new miner reward based on priorityFee
2021-06-30 20:30:39 +07:00
jangko 7600046a11
EIP-1559: unify PoA and PoW gasLimit and baseFee validation
Turn out both EthHash and Clique are using the same gasLimit
validation.

They also share the same EIP-1559 baseFee validation.
2021-06-30 20:21:45 +07:00
jangko f2491e6307
fixes crappy custom genesis and chain config parser
instead of using stdlib/json, now we switch to json_serialization
the result is much tidier code and more robust when parsing
optional fields.

fixes #635
2021-05-13 16:04:08 +07:00
andri lim af02a3b1b2
reduce unused import warnings 2020-04-15 19:05:57 +07:00
andri lim 87bae2bb78
switch to new toFork 2020-04-12 18:02:59 +07:00
andri lim c4dcf5da30
reduce compiler warnings 2019-11-13 21:49:39 +07:00
andri lim a65ab2763e fixes generateHeaderFromParentHeader 2019-09-26 12:33:43 +03:00
andri lim b189e1604f fixes gasLimitBounds 2019-09-26 12:33:43 +03:00
andri lim 9cba2c9cc0 fix validateGasLimit 2019-09-26 12:33:43 +03:00
andri lim 3ad465d169 implement block validation and friends 2019-09-26 12:33:43 +03:00
andri lim 45059957d0 completing generateHeaderFromParentHeader implementation 2019-09-04 19:05:21 +02:00
andri lim 2c032ad1ab refactor utils 2019-02-27 13:30:18 +02:00
Yuriy Glukhov 481c6cf4ed Use nim-eth (#224) 2019-02-05 20:15:50 +01: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
zah 6f28d11866 Few steps towards having 64-bit block numbers (#57)
Some of the other clients don't bother to store block numbers as
256-bit integers (64 bits or even 32 bit are enough).

The changes here are based on helpers introduced in eth_common
that try to abstract away all conversion steps in the code between
VM words and block numbers in variables in fields. Unfortunately,
this turn out to be more work than anticipated and I've postponed
finishing the refactoring for now (Block numbers are still 256 bit).
2018-06-26 16:09:50 +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 d8a4e5cbfb Fixed compilation of test_vm_json. Still fails because of Op.Call :( 2018-05-31 10:58:59 +03: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