Dustin Brody
7dfd2a3849
update deltabalance to mix of setBalance and increaseBalance
2018-09-18 06:25:28 -07:00
coffeepots
4f03c9cf2a
Merge pull request #139 from status-im/callOpCodeWork
...
Flesh out call op
2018-09-18 14:09:00 +01:00
coffeepots
b49637cdbf
Helper procs for updating opcode executor based on fork
2018-09-18 13:10:30 +01:00
coffeepots
d435e434ec
Copy opCodeExec to child computation
2018-09-18 13:03:22 +01:00
Zahary Karadjov
d71ce6fb24
Make use of the new transactional API offered by the Trie DB
2018-09-18 02:56:10 +03:00
coffeepots
d484420f5b
Remove fork distinguished procs, handle in applyCreateMessage
2018-09-17 19:35:07 +01:00
coffeepots
c300044474
Add EIP170_CODE_SIZE_LIMIT
2018-09-17 19:34:29 +01:00
coffeepots
949d4c11f8
Full names for `$`(fork)
2018-09-17 18:38:10 +01:00
Dustin Brody
beb1befc6e
13 additional GeneralStateTests working; remove commented auto-ported Py-EVM validations which are implicit in UInt256; address comments to last commit (toSeq, hoising vmState.readOnlyStateDB, deltaBalance -> increaseBalance)
2018-09-17 13:41:32 +00:00
Zahary Karadjov
409d875beb
Some helpers for tracing and debugging Trie issues (the code is no-op by default)
2018-09-16 00:20:20 +03:00
coffeepots
cdfcda41b4
Remove init 0 after child computation
2018-09-14 18:04:09 +01:00
coffeepots
63f9acd8ce
Add create and apply message procs
2018-09-14 18:03:26 +01:00
coffeepots
c7a014bb10
Add gas cost for create
2018-09-14 17:59:21 +01:00
coffeepots
af76d209a6
Add opcode executor proc to computation
2018-09-14 16:47:40 +01:00
coffeepots
7cd7a73a1f
Add opCodeExec to allow computation to execute code
2018-09-14 16:42:15 +01:00
coffeepots
213aebde7d
Update some comments, adding TODO item for getStateDb
2018-09-14 16:16:55 +01:00
coffeepots
6183761251
Refactor for generateChildComputation
2018-09-14 16:16:55 +01:00
coffeepots
2b6342764c
Add fork to string proc
2018-09-14 16:16:55 +01:00
coffeepots
d465fcd038
Appy child computation in call op code
2018-09-14 16:16:55 +01:00
coffeepots
2a38c0194d
Expose isCreate for export
2018-09-14 16:16:55 +01:00
coffeepots
69f07c587a
Add generateChildComputation, addChildComputation and applyChildComputation
2018-09-14 16:16:55 +01:00
coffeepots
d24108a79b
Convert code from byte range to seq
2018-09-14 16:16:55 +01:00
coffeepots
b4fd38e062
Call now gets and checks balance against funds, also now fetches code
2018-09-14 16:16:55 +01:00
Dustin Brody
7ba90fda54
48 new working GeneralStateTests, via fixing some overflows/underflows, creating a rudimentary balance commit/revert scheme, and implementing account deletion for the selfdestruct instruction ( #146 )
2018-09-14 13:43:40 +00:00
Yuriy Glukhov
62260c786d
Caching DB backend
2018-09-12 17:53:15 +03:00
Dustin Brody
fd07d6fed1
A simple/basic GeneralStateTest runner which gets 400+ of them correct
2018-09-10 19:42:45 +03:00
Yuriy Glukhov
3a1ec035b3
Various fixes towards state reconstruction
2018-09-07 14:00:37 +03:00
coffeepots
09d35d4bfd
Fix merge conflict
2018-09-06 13:59:22 +01:00
coffeepots
7e02eedea0
Use toOpenArray in generateAddress
2018-09-06 13:57:42 +01:00
coffeepots
085880758b
Always update account nonce even if there's an contract address collision
2018-09-06 13:57:42 +01:00
coffeepots
ca6eb0cb38
Don't touch nonce until after address in-use check
2018-09-06 13:57:42 +01:00
coffeepots
555687ba97
Comment reference to issue regarding address collisions
2018-09-06 13:57:42 +01:00
coffeepots
9f1027102c
Make generateAddress a func
2018-09-06 13:57:42 +01:00
coffeepots
7a5a43f50f
Add generateAddress utility
2018-09-06 13:57:42 +01:00
coffeepots
0e2068c99e
Create Op now generates contract addresses & checks for collisions
2018-09-06 13:57:42 +01:00
coffeepots
350bf7e672
Add hasCodeOrNonce
2018-09-06 13:57:42 +01:00
coffeepots
69befaf4fd
Use toOpenArray in generateAddress
2018-09-06 13:48:55 +01:00
Yuriy Glukhov
0a247a58f3
New nim compat
2018-09-06 13:16:13 +03:00
coffeepots
485781e6ad
Always update account nonce even if there's an contract address collision
2018-09-06 10:58:35 +01:00
Dustin Brody
9e1be6438e
Extract transaction senders from GeneralStateTest fixtures
2018-09-06 11:20:43 +03:00
coffeepots
2b87d2b7f5
Merge branch 'createOpContractAddr' of https://github.com/status-im/nimbus into createOpContractAddr
2018-09-04 17:15:58 +01:00
coffeepots
bd9f732b4e
Don't touch nonce until after address in-use check
2018-09-04 17:15:46 +01:00
coffeepots
12834fba12
Merge branch 'master' into createOpContractAddr
2018-09-04 16:37:43 +01:00
coffeepots
f3fb306a33
Comment reference to issue regarding address collisions
2018-09-04 16:35:20 +01:00
Dustin Brody
4262ea8670
fix (1) overflow/signed confusion when reading large-valued storage entries; (2) adjust test fixture validity for GeneralStateTests; (3) remove incorrect usage of state trie for code (not codehash) storage; add ability to display state; (4) avoid double-hashing keys for already-hashed SecureHexaryTrie for storage; (5) add intentionally local workaround for empty code in GeneralStateTest fixtures lacking 0x prefix; (6) fix nonce parsing, which is always hex string in test fixtures
2018-09-04 17:55:30 +03:00
coffeepots
c3c84782a5
Make generateAddress a func
2018-09-04 12:27:07 +01:00
coffeepots
a28ef962b3
Add generateAddress utility
2018-09-04 12:23:47 +01:00
coffeepots
a7c1168b3a
Create Op now generates contract addresses & checks for collisions
2018-09-03 19:30:27 +01:00
coffeepots
7ed2403c5c
Add hasCodeOrNonce
2018-09-03 19:24:55 +01:00
Yuriy Glukhov
b055504f8e
Added --experimental:forLoopMacros to nims
2018-09-03 15:20:40 +03:00
coffeepots
bda219f8fe
Make tests green (AccountNonce)
2018-09-02 03:26:22 +01:00
coffeepots
4d0adfd514
Update RPC types to use AccountNonce
2018-09-01 16:03:06 +03:00
coffeepots
e10df33864
Update return value to use AccountNonce
2018-09-01 16:03:06 +03:00
coffeepots
1427d59f27
Change setNonce, getNonce to use AccountNonce, which is uint64 from UInt256
2018-09-01 16:03:06 +03:00
coffeepots
0229d16fed
Change hashing function to use AccountNonce
2018-09-01 16:03:06 +03:00
coffeepots
dbc35fb198
Account.nonce is now AccountNonce which is uint64 from UInt256
2018-09-01 16:03:06 +03:00
Jacek Sieka
1d49b65d55
Merge pull request #117 from status-im/logging-to-chronicles
...
replace logging module with nim-chronicles (fixes #38 )
2018-08-31 13:15:08 -06:00
coffeepots
77df371cd1
Update toSignature to use range instead of UInt256
2018-08-31 17:18:19 +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
coffeepots
055b169e86
Merge branch 'master' of https://github.com/status-im/nimbus
2018-08-29 18:13:10 +01:00
coffeepots
2f6f9b765c
Use getSender from transactions, Re-add getAccountDb, fix accountDbFromTag
2018-08-29 18:12:39 +01:00
coffeepots
372ea24c41
Merge pull request #125 from status-im/getSenderReturn
...
Alternative form of getSender that raises and returns address
2018-08-29 18:07:04 +01:00
coffeepots
e59d019a03
Merge branch 'master' into chain-db-interface
2018-08-29 17:23:25 +01:00
coffeepots
bdb1904fd5
Alternative form of getSender that raises and returns address
2018-08-29 16:52:12 +01:00
coffeepots
ffa5aafab4
Get block RPCs now return Option[BlockObject]
2018-08-29 16:01:43 +03:00
coffeepots
396f31f643
Updated to use option types
2018-08-29 16:01:43 +03:00
coffeepots
f3df5156d9
Update to option types instead of refs
2018-08-29 16:01:43 +03:00
coffeepots
18d62d8c79
toSignature is now a proc
2018-08-29 16:01:43 +03:00
coffeepots
74a4ab6efc
Update len to template
2018-08-29 16:01:43 +03:00
coffeepots
ae03675b07
Use toCanonicalAddress in getSender
2018-08-29 16:01:43 +03:00
coffeepots
4e007e7d6c
Update transaction hash to not include tx signature
2018-08-29 16:01:43 +03:00
coffeepots
6a55c59cc5
Simplify populating transaction object by moving fetching inside proc
2018-08-29 16:01:43 +03:00
coffeepots
bdb48b9438
Update account gas in transaction blocks
2018-08-29 16:01:43 +03:00
coffeepots
f8a3581af5
Add sender address derivation for several RPCs
2018-08-29 16:01:43 +03:00
coffeepots
55fee296d8
Update estimateGas return type, copy header logs bloom for block header
2018-08-29 16:01:43 +03:00
coffeepots
53bd7774db
Add sender to getReceipt, calculate transaction hash once
2018-08-29 16:01:43 +03:00
coffeepots
d901c20bb2
Add toSignature(Transaction) and getSender(Transaction) local procs
2018-08-29 16:01:43 +03:00
coffeepots
3f1e140d59
Add hex data string checking to web3_sha3
2018-08-29 16:01:43 +03:00
coffeepots
6223a9a638
Add eth_newFilter stub now types are fixed
2018-08-29 16:01:43 +03:00
coffeepots
dedb63a7f7
eth_sign (sans retrieval of account private key)
2018-08-29 16:01:43 +03:00
coffeepots
f51fca2cae
Add cumulativeGas to receipts, update FilterLog type, getWork type
2018-08-29 16:01:43 +03:00
coffeepots
f151911ddf
Updates to use GasInt and Filter Logs
2018-08-29 16:01:43 +03:00
coffeepots
33b7dd931b
Add Whisper RPC prototypes
2018-08-29 16:01:43 +03:00
coffeepots
3f3c4249ba
Add Whisper types
2018-08-29 16:01:43 +03:00
coffeepots
3f2f8f83b4
Add WhisperIdentityStr
2018-08-29 16:01:43 +03:00
coffeepots
fec18e4ec2
Add WhisperIdentity string, clean up len func
2018-08-29 16:01:43 +03:00
Yuriy Glukhov
e3be8ca30a
Separate Chain from ChainDB
2018-08-29 11:49:01 +03:00
coffeepots
6b68d6ddb2
Fixed wrong equality
2018-08-24 18:34:54 +01:00
coffeepots
3b82c9bd44
Remove and 0xff
2018-08-24 17:03:44 +01:00
coffeepots
c3f73860a4
Remove defunct comment
2018-08-24 16:52:48 +01:00
coffeepots
7542b42d32
Remove BaseTransaction object, add transaction.getSender()
2018-08-24 16:46:48 +01:00
coffeepots
47f81df3d4
Comment on hex string conversion from array types.
2018-08-21 14:31:45 +01:00
coffeepots
9d506993a1
Add some error checking for missing body hash
2018-08-21 13:33:38 +01:00
coffeepots
6ac68b1c12
eth_getUncleByBlockNumberAndIndex
2018-08-21 13:33:37 +01:00
coffeepots
cd85ed2281
eth_getUncleByBlockHashAndIndex, populate uncle hashes, not full uncles
2018-08-21 13:33:37 +01:00
coffeepots
5516a0dcfa
Update block object to include hashes in uncles, not full block header
2018-08-21 13:33:37 +01:00
coffeepots
09861bf2e2
eth_getTransactionReceipt
2018-08-21 13:33:37 +01:00
coffeepots
d56cf9d2e4
Update receipt types
2018-08-21 13:33:37 +01:00
coffeepots
b516acfef0
Add receipt object
2018-08-21 13:33:37 +01:00
coffeepots
79b0032583
eth_getTransactionByBlockNumberAndIndex
2018-08-21 13:33:37 +01:00