Felix Lange
7f22b59f87
core/state: simplify proof methods ( #17965 )
...
This fixes the import cycle build error in core/vm tests.
There is no need to refer to core/vm for a type definition.
2018-10-23 21:51:41 +02:00
Martin Holst Swende
4c0883e20d
core/vm: adds refund as part of the json standard trace ( #17910 )
...
This adds the global accumulated refund counter to the standard
json output as a numeric json value. Previously this was not very
interesting since it was not used much, but with the new sstore
gas changes the value is a lot more interesting from a consensus
investigation perspective.
2018-10-23 16:28:18 +02:00
Wuxiang
d98c45f70f
core: fix a typo ( #17941 )
2018-10-19 16:33:27 +03:00
Simon Jentzsch
97fb08342d
EIP-1186 eth_getProof ( #17737 )
...
* first impl of eth_getProof
* fixed docu
* added comments and refactored based on comments from holiman
* created structs
* handle errors correctly
* change Value to *hexutil.Big in order to have the same output as parity
* use ProofList as return type
2018-10-18 21:41:22 +02:00
Smilenator
2868acd80b
core/types: fix comment for func SignatureValues ( #17921 )
2018-10-16 12:45:28 +02:00
Martin Holst Swende
a352de6a08
core/vm: add shortcuts for trivial exp cases ( #16851 )
2018-10-16 00:51:39 +02:00
Guillaume Ballet
97b2806686
core/asm: Use hexadecimal addresses in assembly dumps ( #17870 )
2018-10-09 10:27:07 +03:00
Wenbiao Zheng
31c4e3a118
core/types: Log.Index is the index in block, not receipt ( #17866 )
2018-10-08 13:15:19 +02:00
Péter Szilágyi
1d3d4a4d57
core/vm: reuse Keccak-256 hashes across opcode executions ( #17863 )
2018-10-08 13:14:29 +02:00
Martin Holst Swende
58e868b759
core/vm : fix failing testcase ( #17852 )
...
* core/vm : fix failing testcase
* core/vm: fix nitpick
2018-10-05 19:02:06 +02:00
Martin Holst Swende
092df3ab59
core/vm: SHA3 word cost for CREATE2 ( #17812 )
...
* core/vm: create2 address generation tests
* core/vm: per byte cost of CREATE2
* core/vm: fix linter issue in test
2018-10-05 10:32:35 +03:00
Martin Holst Swende
89a32451ae
core/vm: faster create/create2 ( #17806 )
...
* core/vm/runtim: benchmark create/create2
* core/vm: do less hashing in CREATE2
* core/vm: avoid storing jumpdest analysis for initcode
* core/vm: avoid unneccesary lookups, remove unused fields
* core/vm: go formatting tests
* core/vm: save jumpdest analysis locally
* core/vm: use common.Hash instead of nil, fix review comments
* core/vm: removed type destinations
* core/vm: correct check for empty hash
* eth: more elegant api_tracer
* core/vm: address review concerns
2018-10-04 18:15:37 +03:00
Felföldi Zsolt
9d06b2c5f3
core: use ChainHeadEvent subscription in the chain indexer ( #17826 )
2018-10-03 17:25:25 +03:00
Péter Szilágyi
14bef9a2db
core: fix unnecessary ancestor lookup after a fast sync ( #17825 )
2018-10-03 13:42:19 +03:00
Ryan Schneider
b69942befe
core, internal/ethapi: add and use LRU cache for receipts ( #17610 )
2018-09-29 22:53:31 +02:00
reinerRubin
86ec213076
core/types: make tx signature values optional in JSON ( #17742 )
2018-09-29 22:47:59 +02:00
thumb8432
ffca6dfe01
core/types: fix typos ( #17762 )
2018-09-29 22:11:56 +02:00
Liang ZOU
6663e5da10
all: fix various comment typos ( #17748 )
2018-09-25 12:26:35 +02:00
Péter Szilágyi
ee92bc537f
Merge pull request #17383 from holiman/eip1283
...
Eip1283
2018-09-21 14:16:18 +03:00
Wuxiang
81080bf8cb
core: fix a typo ( #17733 )
2018-09-21 13:45:42 +03:00
gary rong
ba0a8b7887
core, eth: fix dependency cycle ( #17720 )
2018-09-20 20:02:15 +03:00
gary rong
d6254f827b
all: protect self-mined block during reorg ( #17656 )
2018-09-20 15:09:30 +03:00
Péter Szilágyi
0f2ba07c41
common, core, light: add block age into info logs
2018-09-20 12:56:35 +03:00
Guillaume Ballet
da29332c5f
core/vm: add switches to select evm+ewasm interpreters ( #17687 )
...
Interpreter initialization is left to the PRs implementing them.
Options for external interpreters are passed after a colon in the
`--vm.ewasm` and `--vm.evm` switches.
2018-09-20 10:44:35 +03:00
Péter Szilágyi
faa69bea1c
core, eth: fix goimports for Go 1.11
2018-09-19 11:47:09 +03:00
Péter Szilágyi
5d921fa3a0
core, params: polish net gas metering PR a bit
2018-09-18 16:29:51 +03:00
Martin Holst Swende
caa2c23a38
core,state: finish implementing Eip 1283
2018-09-18 13:08:32 +03:00
Martin Holst Swende
58374e28d9
core, state: initial implementation of Eip-1283
2018-09-18 13:08:28 +03:00
Péter Szilágyi
cc21928e12
Merge pull request #17622 from karalabe/chain-maker-seal
...
consensus/clique, core: chain maker clique + error tests
2018-09-17 11:35:42 +03:00
Emil
86a03f97d3
all: simplify s[:] to s where s is a slice ( #17673 )
2018-09-14 22:07:13 +02:00
Liang ZOU
72c820c49e
core/vm: fix typo 'EVM EVM' ==> 'EVM' ( #17654 )
2018-09-13 12:48:15 +03:00
Péter Szilágyi
4bb25042eb
consensus/clique, core: chain maker clique + error tests
2018-09-11 16:40:00 +03:00
Paweł Bylica
ae992a5d73
core/vm: Hide read only flag from Interpreter interface ( #17461 )
...
Makes Interface interface a bit more stateless and abstract.
Obviously this change is dictated by EVMC design. The EVMC tries to keep the responsibility for EVM features totally inside the VMs, if feasible. This makes VM "stateless" because VM does not need to pass any information between executions, all information is included in parameters of the execute function.
2018-09-07 18:13:25 +02:00
Hyung-Kyu Hqueue Choi
cf33d8b83c
core: fix typo in comment ( #17586 )
2018-09-05 10:29:51 +02:00
Martin Holst Swende
32f28a9360
core/vm, tests: update tests, enable constantinople statetests, fix SAR opcode ( #17538 )
...
This commit does a few things at once:
- Updates the tests to contain the latest data from ethereum/tests repo.
- Enables Constantinople state tests. This is needed to be able to
fuzz-test the evm with constantinople rules.
- Fixes the error in opSAR that we've known about for some time. I was
kind of saving it to see if we hit upon it with the random test
generator, but it's difficult to both enable the tests and have the
bug there -- we don't want to forget about it, so maybe it's better
to just fix it.
2018-09-04 10:49:18 +02:00
Wenbiao Zheng
6a33954731
core, eth, trie: use common/prque ( #17508 )
2018-09-03 17:33:21 +02:00
Péter Szilágyi
e8f229b82e
cmd, core, eth, miner, params: configurable gas floor and ceil
2018-08-29 12:40:12 +03:00
Felföldi Zsolt
63352bf424
core: safe indexer operation when syncing starts before the checkpoint ( #17511 )
2018-08-28 10:31:34 +03:00
gary rong
b69476b372
all: make indexer configurable ( #17188 )
2018-08-28 10:08:16 +03:00
Sheldon
0bec85f2e2
core: fix typos in comment ( #17531 )
2018-08-28 10:04:33 +03:00
Wenbiao Zheng
d1aa605f1e
all: remove the duplicate 'the' in annotations ( #17509 )
2018-08-27 11:49:29 +03:00
gary rong
40a71f28cf
miner: fix state commit, track old work packages too ( #17490 )
...
* miner: commit state which is relative with sealing result
* consensus, core, miner, mobile: introduce sealHash interface
* miner: evict pending task with threshold
* miner: go fmt
2018-08-23 16:02:57 +03:00
gary rong
c3f7e3be3b
core/statedb: deep copy logs ( #17489 )
2018-08-23 15:59:58 +03:00
Péter Szilágyi
e0d0e64ce2
cmd, core, miner: add --txpool.locals and priority mining
2018-08-22 09:43:57 +03:00
Aditya
c929030e28
core/types: fix docs about protected Vs ( #17436 )
2018-08-20 15:14:50 +03:00
gary rong
54216811a0
miner: regenerate mining work every 3 seconds ( #17413 )
...
* miner: regenerate mining work every 3 seconds
* miner: polish
2018-08-16 14:14:33 +03:00
Felföldi Zsolt
2cdf6ee7e0
light: CHT and bloom trie indexers working in light mode ( #16534 )
...
This PR enables the indexers to work in light client mode by
downloading a part of these tries (the Merkle proofs of the last
values of the last known section) in order to be able to add new
values and recalculate subsequent hashes. It also adds CHT data to
NodeInfo.
2018-08-15 22:25:46 +02:00
gary rong
a1783d1697
miner: move agent logic to worker ( #17351 )
...
* miner: move agent logic to worker
* miner: polish
* core: persist block before reorg
2018-08-14 18:34:33 +03:00
gary rong
e0e0e53401
crypto: change formula for create2 ( #17393 )
2018-08-14 18:30:42 +03:00
Mymskmkt
fb368723ac
core: fix comment typo ( #17376 )
2018-08-13 11:40:52 +03:00
stormpang
6711f098d5
core/vm: fix comment typo ( #17319 )
...
antything --> anything
:P
2018-08-06 11:42:49 +03:00
Hyung-Kyu Hqueue Choi
0ab54de1a5
core/vm: update benchmarks for core/vm ( #17308 )
...
- Update benchmarks to use a pool of int pools.
Unless benchmarks are aborted with segmentation fault.
Signed-off-by: Hyung-Kyu Choi <hqueue@users.noreply.github.com>
2018-08-03 08:15:33 +03:00
Ha ĐANG
702b8a7aec
core/vm: fix typo in cryptographic hash function name ( #17285 )
2018-07-31 13:27:51 +03:00
Ha ĐANG
2cffd4ff3c
core: fix some small typos on comment code ( #17278 )
2018-07-30 14:10:48 +03:00
Oleg Kovalov
d42ce0f2c1
all: simplify switches ( #17267 )
...
* all: simplify switches
* silly mistake
2018-07-30 12:30:09 +03:00
Raghav Sood
11a402f747
core: report progress on log chain exports ( #17066 )
...
* core/blockchain: export progress
* core: polish up chain export progress report a bit
2018-07-26 14:26:24 +03:00
Guillaume Ballet
7abedf9bbb
core/vm: support for multiple interpreters ( #17093 )
...
- Define an Interpreter interface
- One contract can call contracts from other interpreter types.
- Pass the interpreter to the operands instead of the evm.
This is meant to prevent type assertions in operands.
2018-07-25 08:56:39 -04:00
Antoine Rondelet
27a278e6e3
core: fixed typo in addresssByHeartbeat ( #17243 )
2018-07-25 14:25:14 +03:00
hadv
bc0a43191e
core: fix typo in comment code
2018-07-25 18:04:38 +07:00
Osuke
10780e8a00
core: fix txpool guarantee comment ( #17214 )
...
* fixed-typo
* core: fix txpool guarantee comment
2018-07-24 18:44:41 +03:00
gary rong
2433349c80
core/vm, params: implement EXTCODEHASH opcode ( #17202 )
...
* core/vm, params: implement EXTCODEHASH opcode
* core, params: tiny fixes and polish
* core: add function description
2018-07-24 18:06:40 +03:00
gary rong
cab1cff11c
core, crypto, params: implement CREATE2 evm instrction ( #17196 )
...
* core, crypto, params: implement CREATE2 evm instrction
* core/vm: add opcode to string mapping
* core: remove past fork checking
* core, crypto: use option2 to generate new address
2018-07-24 17:22:03 +03:00
Wenbiao Zheng
d0082bb7ec
core: fix comment typo ( #17236 )
2018-07-24 13:17:12 +03:00
Sheldon
9e24491c65
core/bloombits, light: fix typos ( #17235 )
2018-07-24 11:24:27 +03:00
gary rong
dcdd57df62
core, ethdb: two tiny fixes ( #17183 )
...
* ethdb: fix memory database
* core: fix bloombits checking
* core: minor polish
2018-07-18 13:41:36 +03:00
Smilenator
30bdf817a0
core/types: polish TxDifference code and docs a bit ( #17130 )
...
* core: fix func TxDifference
fix a typo in func comment;
change named return to unnamed as there's explicit return in the body
* fix another typo in TxDifference
2018-07-09 11:48:54 +03:00
Guillaume Ballet
4e5d1f1c39
core/vm: reuse bigint pools across transactions ( #17070 )
...
* core/vm: A pool for int pools
* core/vm: fix rebase issue
* core/vm: push leftover stack items after execution, not before
2018-07-03 13:06:42 +03:00
gary rong
a4a2343cdc
ethdb, core: implement delete for db batch ( #17101 )
2018-07-02 11:16:30 +03:00
Guillaume Ballet
598f786aab
core/vm: clear linter warnings ( #17057 )
...
* core/vm: clear linter warnings
* core/vm: review input
* core/vm.go: revert lint in noop as per request
2018-06-26 15:56:25 +03:00
Péter Szilágyi
d926bf2c7e
trie: cache collapsed tries node, not rlp blobs ( #16876 )
...
The current trie memory database/cache that we do pruning on stores
trie nodes as binary rlp encoded blobs, and also stores the node
relationships/references for GC purposes. However, most of the trie
nodes (everything apart from a value node) is in essence just a
collection of references.
This PR switches out the RLP encoded trie blobs with the
collapsed-but-not-serialized trie nodes. This permits most of the
references to be recovered from within the node data structure,
avoiding the need to track them a second time (expensive memory wise).
2018-06-21 11:28:05 +02:00
Wenbiao Zheng
9b1536b26a
core: remove dead code, limit test code scope ( #17006 )
...
* core: move test util var/func to test file
* core: remove useless func
2018-06-19 14:41:13 +03:00
Caesar Chad
ec192f18b4
core/asm: correct comments typo ( #16974 )
...
* core/asm/compiler: correct comments typo
core/asm/compiler: correct comments typo
* Correct comments typo
2018-06-14 16:24:35 +03:00
Wenbiao Zheng
52b1d09457
core: reduce nesting in transaction pool code ( #16980 )
2018-06-14 13:46:43 +03:00
Martin Holst Swende
947e0afeb3
core/vm: optimize MSTORE and SLOAD ( #16939 )
...
* vm/test: add tests+benchmarks for mstore
* core/vm: less alloc and copying for mstore
* core/vm: less allocs in sload
* vm: check for errors more correctly
2018-06-14 12:23:37 +03:00
Caesar Chad
f04c0e341e
core/asm: correct comments typo ( #16975 )
...
core/asm/lexer: correct comments typo
2018-06-14 11:32:19 +03:00
John C. Vernaleo
8c4a7fa8d3
core: change comment to match code more closely ( #16963 )
2018-06-13 10:14:15 +03:00
Felföldi Zsolt
049f5b3572
core, eth, les: more efficient hash-based header chain retrieval ( #16946 )
2018-06-12 16:52:54 +03:00
Wenbiao Zheng
aab7ab04b0
core/rawdb: wrap db key creations ( #16914 )
...
* core/rawdb: use wrappered helper to assemble key
* core/rawdb: wrappered helper to assemble key
* core/rawdb: rewrite the wrapper, pass common.Hash
2018-06-11 16:06:26 +03:00
Martin Holst Swende
eac16f9824
core: improve getBadBlocks to return full block rlp ( #16902 )
...
* core: improve getBadBlocks to return full block rlp
* core, eth, ethapi: changes to getBadBlocks formatting
* ethapi: address review concerns
2018-06-11 11:03:40 +03:00
ledgerwatch
feb6620c34
core: relax type requirement for bc in ApplyTransaction ( #16901 )
2018-06-07 10:34:24 +02:00
Péter Szilágyi
01a7e267dc
Merge pull request #16882 from karalabe/streaming-ecrecover
...
core: concurrent background transaction sender ecrecover
2018-06-05 17:13:43 +03:00
kiel barry
cbfb40b0aa
params: fix golint warnings ( #16853 )
...
params: fix golint warnings
2018-06-05 12:31:34 +02:00
Péter Szilágyi
2ab24a2a8f
core: concurrent background transaction sender ecrecover
2018-06-05 11:03:55 +03:00
hadv
e3a993d774
core: fix typo in comment code
2018-06-05 09:56:45 +07:00
Péter Szilágyi
143c4341d8
core, eth, trie: streaming GC for the trie cache ( #16810 )
...
* core, eth, trie: streaming GC for the trie cache
* trie: track memcache statistics
2018-06-04 10:47:43 +03:00
Péter Szilágyi
342ec83d67
core: fix transaction event asynchronicity
2018-05-30 10:14:00 +03:00
Wenbiao Zheng
38c7eb0f26
trie: rename TrieSync to Sync and improve hexToKeybytes ( #16804 )
...
This removes a golint warning: type name will be used as trie.TrieSync by
other packages, and that stutters; consider calling this Sync.
In hexToKeybytes len(hex) is even and (even+1)/2 == even/2, remove the +1.
2018-05-29 17:48:43 +02:00
Péter Szilágyi
d51faee240
Merge pull request #16831 from abeln/patch-1
...
core/vm: fix typo in comment
2018-05-29 15:44:30 +03:00
kimmylin
426f62f1a8
core: improve test for TransactionPriceNonceSort ( #16413 )
2018-05-29 14:21:04 +02:00
Abel Nieto
d258eee211
core/vm: fix typo in comment
2018-05-29 13:22:00 +02:00
kiel barry
84f8c0cc1f
common: improve documentation comments ( #16701 )
...
This commit adds many comments and removes unused code.
It also removes the EmptyHash function, which had some uses
but was silly.
2018-05-29 12:42:21 +02:00
Ryan Schneider
55b579e02c
core: use a wrapped map to remove contention in `TxPool.Get`. ( #16670 )
...
* core: use a wrapped `map` and `sync.RWMutex` for `TxPool.all` to remove contention in `TxPool.Get`.
* core: Remove redundant `txLookup.Find` and improve comments on txLookup methods.
2018-05-23 15:55:42 +03:00
Abel Nieto
be22ee8dda
core/vm: fix typo in instructions.go ( #16788 )
2018-05-23 15:02:10 +03:00
gary rong
fbf57d53e2
core/types: convert status type from uint to uint64 ( #16784 )
2018-05-23 11:10:24 +03:00
Péter Szilágyi
ab6bdbd9b0
Merge pull request #16758 from hadv/fix/typos
...
Fix some typos in comment code and output log
2018-05-19 19:40:55 +03:00
hadv
f2fdb75dd9
core, consensus: fix some typos in comment code and output log
2018-05-19 15:44:36 +07:00
Péter Szilágyi
49719e21bc
core, eth: minor txpool event cleanups
2018-05-18 12:08:24 +03:00
rjl493456442
a2e43d28d0
all: collate new transaction events together
2018-05-18 11:46:44 +03:00
gary rong
7beccb29be
all: get rid of error when creating memory database ( #16716 )
...
* all: get rid of error when create mdb
* core: clean up variables definition
* all: inline mdb definition
2018-05-09 15:24:25 +03:00
Péter Szilágyi
6cf0ab38bd
core/rawdb: separate raw database access to own package ( #16666 )
2018-05-07 14:35:06 +03:00