Commit Graph

212 Commits

Author SHA1 Message Date
Zahary Karadjov 48fdf6a644 build nimbus with nimble build 2018-06-20 14:12:29 +03:00
Yuriy Glukhov 5bd35e5c82
Merge pull request #54 from markspanbroek/fix-nimble-warning
Fix nimble warning
2018-06-20 11:07:48 +03:00
Yuriy Glukhov 5040ad0d1c
Merge pull request #53 from markspanbroek/fix-example
Fix import in example
2018-06-20 11:07:24 +03:00
Mark Spanbroek d1d7e2342e Fix nimble warning
Nimble warns about .nim files that are outside of the 'nimbus' directory
when they are not mentioned in the skipDirs.
2018-06-19 21:17:20 +02:00
Mark Spanbroek cb36a0c18d Fix import in example 2018-06-19 21:15:43 +02:00
Zahary Karadjov eacf13ed97 ethp2p was renamed to eth_p2p 2018-06-16 22:14:31 +03: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
Mamy Ratsimbazafy 05275f9773
Activate logging, sha3, arith tests (#51)
* Activate the tests

* Use 3 params in memExpansion gas costs, fix 31 log tests and 8 sha3 tests

* Activate Control Flow tests as well
2018-06-13 19:33:47 +02:00
mratsim 8d76cab46a Was confused about ∧ in the Yellow paper. Fix #50 - pass 2 new tests. Only 1 arithmetic failure left. 2018-06-13 16:05:52 +02:00
Mamy Ratsimbazafy 90c3ca4a96
Gas refactoring - decouple opcode logic and gas (#49)
* Decoupling op logic and gas - introduce gasometer, rework opcode declaration

* Remove gas constants for gas opcode computation

* Remove gas constants for precompiled contracts

* make vm_types compile

* Make opcode, call and computation compile

* Distinguish between dynamic and complex gas costs, fix arithmetic

* Fix context and sha3

* update memory and storage ops

* Log opcode uses memory expansion code

* update/stub system_ops with gas costs

* Make test compile. Deactivate stub test_vm

* all tests compiles, opcode fails due to https://github.com/nim-lang/Nim/issues/8007 (const object variant in tables reset at runtime)

* Create an enum without holes - workaround: https://github.com/nim-lang/Nim/issues/8007

* Use arrays instead of tables for GasCosts, remove some unused imports - passing all basic tests!

* Make test_vm_json compile

* Fix test_vm_json - workaround https://github.com/nim-lang/Nim/issues/8015

* fix memory expansion cost bug

* Remove leftover special handling from before GckMemExpansion

* cleanup outdated comment, better align =

* Fix sha3 gas cost not taking memory expansion into account

* Improve gas error reporting of test_vm_json

* Fix gas computation regression due to mem expansion

* mass replace for memExpansion->RequestedMemSize was too eager

* fix log gas cost (no tests :/)

* missed a static FeeSchedule

* static as expression is fickle
2018-06-12 17:33:47 +02:00
Mamy Ratsimbazafy 8528f1b704
Dirty fix #46 (test_vm_json segfaults from #45), incidentally fix #32 (#47) 2018-06-06 20:40:44 +02:00
Yuriy Glukhov 040c09d5a9
Merge pull request #45 from status-im/hash-types-refactoring
Hash256/EthAddrres refactoring
2018-05-31 11:36:16 +03: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
alexm-status 6473610574
Update README.md 2018-05-28 10:45:03 -07:00
alexm-status 78609c2279
Update Nimbus - An Ethereum 2.0 Sharding Client_xt.md 2018-05-28 10:44:12 -07:00
alexm-status 4bdbcb9d80
Update Nimbus - An Ethereum 2.0 Sharding Client_xt.md 2018-05-28 10:35:53 -07:00
Yuriy Glukhov 8d3f38bdbd
Merge pull request #44 from status-im/renames
Some renames
2018-05-28 14:37:19 +03:00
Yuriy Glukhov 51b572d8b8 Some renames 2018-05-28 13:22:28 +03:00
alexm-status 8cfebe1691
Update Nimbus - An Ethereum 2.0 Sharding Client_xt.md 2018-05-27 12:14:16 -07:00
alexm-status c96dd3f0e7
Update README.md 2018-05-27 12:13:55 -07:00
alexm-status e445cf6bc9
Merge pull request #42 from status-im/aem_play_Nimbus
Update README.md
2018-05-27 12:11:44 -07:00
alexm-status 31b7533eb0
Update README.md 2018-05-27 11:07:58 -07: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
alexm-status c77b7cd035
Update Nimbus - An Ethereum 2.0 Sharding Client_xt.md 2018-05-24 20:16:59 -07:00
alexm-status 0dd9d97c30
Update Nimbus - An Ethereum 2.0 Sharding Client_xt.md 2018-05-24 20:03:00 -07:00
alexm-status be46ffbec9
Update README.md 2018-05-24 19:39:14 -07:00
alexm-status 65f9e597be
Created a doc folder and moved the rationale there 2018-05-24 19:33:36 -07:00
alexm-status b6991d9d55
Update Nimbus - An Ethereum 2.0 Sharding Client_xt.md 2018-05-24 16:39:48 -07:00
alexm-status 502941a388
Update Nimbus - An Ethereum 2.0 Sharding Client_xt.md 2018-05-24 10:42:18 -07:00
Mamy Ratsimbazafy 0b6fbbad67
1st gas refactoring - handle different gas costs in Ethereum forks (#37)
* Start by renaming the fork by chronological order

* initial commit - groundwork: support different gasCosts depending on VMs

* Running VMTests with new gas config - only push32AndSuicide changed

* Introduce newNimbusVM that (temporarily) abstract over Frontier and Tangerine VM creation

* Fix Gas - push32AndSuicide repassing and expXY_success passing - fixes #34

* case sensitive imports (thank you auto-completion) fix Travis on Linux

* Add pre and post EIP-150 tests

* Nimify gas identifiers that supports multiple forks
2018-05-24 12:01:59 +02:00
alexm-status 762b0b24d2
Update Nimbus - An Ethereum 2.0 Sharding Client_xt.md 2018-05-22 17:26:10 -07:00
alexm-status 386d8e8327
Update Nimbus - An Ethereum 2.0 Sharding Client_xt.md 2018-05-21 18:52:33 -07:00
alexm-status 12de60dd23
Update Nimbus - An Ethereum 2.0 Sharding Client_xt.md 2018-05-21 18:44:25 -07:00
alexm-status ed9f1ed672
Added a TOC 2018-05-21 18:42:28 -07:00
alexm-status 0fefdc5c4c
Update Nimbus - An Ethereum 2.0 Sharding Client_xt.md 2018-05-21 10:29:40 -07:00
alexm-status 62977c498f
Update Nimbus - An Ethereum 2.0 Sharding Client_xt.md 2018-05-21 10:24:01 -07:00
alexm-status a8b1d02ec4
Update Nimbus - An Ethereum 2.0 Sharding Client_xt.md 2018-05-21 10:18:06 -07:00
alexm-status f46ee5ac90
Improved syntax and formatting 2018-05-21 09:50:56 -07:00
mratsim 165b1872a6 Update the smart contract decompiler example 2018-05-18 12:57:55 +02:00
Mamy Ratsimbazafy 507bdda25a
Catch stack underflow (#33)
* Stack underflow: Add failing test to catch #31

* ensurePop, use proc instead of template + add comment for future refactoring of popInternal

* Check stack underflows before popping values

* run json tests again
2018-05-17 20:59:17 +02:00
Mamy Ratsimbazafy 74a558f187
Fix arithmetic implementation issues (#30)
* Change modular arithmetic ops and signextend implementation

* Don't use signed int, introduce EVM "pseudoSigned" conversion pass 4 sdiv/smod tests

* Print computation error in tests
2018-05-17 10:08:28 +02:00
alexm-status 65d477abcb
Update README.md 2018-05-16 22:04:19 -07:00
alexm-status f8938f9a05
Update README.md 2018-05-16 22:03:36 -07:00
alexm-status 07333bf208
Update README.md 2018-05-16 21:55:09 -07:00
alexm-status c254c14b68
Nimbus - An Ethereum 2.0 Sharding Client 2018-05-16 21:52:54 -07:00
alexm-status 7b818ea8b1
Update README.md 2018-05-16 21:51:17 -07:00
Mamy Ratsimbazafy 43797485e5
Fix exp gas cost pass 40 new tests (#29) 2018-05-16 10:41:34 +02:00
Mamy Ratsimbazafy 0f56bdec26
Re-enable exp and byteOp - pass several dozens more tests (#28)
* Rebase with master

* Run the new tests
2018-05-15 11:23:45 +02:00