Martin Holst Swende
8577b5b020
core: more tests for sidechain import, fixes #19105 ( #19113 )
...
* blockchain: more tests for sidechain import, fixes #19105
* core/blockchain: rework import of pruned canon blocks and canon-prepended sidechains
* core/blockchain: minor clarity change
* core/blockchain: remove unused method
6 years ago
Matthew Halpern
bf42535d31
core: remove redundant parentheses ( #19106 )
6 years ago
Péter Szilágyi
940e317094
core: fix pruner panic when importing low-diff-large-sidechain
6 years ago
Péter Szilágyi
d6225ab846
cmd/utils, eth: relinquish GC cache to read cache in archive mode
6 years ago
Martin Holst Swende
ec3432bccb
core: fix error in block iterator ( #18986 )
6 years ago
silence
66f0c464cc
core: only cache non-nil receipts from the database ( #18447 )
...
receipts may be null for very short time in some condition. For this case, we should not add the null value into cache. Because you will not get the right result if you keep requesting that receipt.
6 years ago
Péter Szilágyi
f25f776c9f
core, light: get rid of the dual mutexes, hard to reason with
6 years ago
gary rong
d5cad488be
core, eth: fix database version ( #18429 )
...
* core, eth: fix database version
* eth: polish error message
6 years ago
Paweł Bylica
de39513ced
core, internal, eth, miner, les: Take VM config from BlockChain ( #17955 )
...
Until this commit, when sending an RPC request that called `NewEVM`, a blank `vm.Config`
would be taken so as to set some options, based on the default configuration. If some extra
configuration switches were passed to the blockchain, those would be ignored.
This PR adds a function to get the config from the blockchain, and this is what is now used
for RPC calls.
Some subsequent changes need to be made, see https://github.com/ethereum/go-ethereum/pull/17955#pullrequestreview-182237244
for the details of the discussion.
6 years ago
Franklin
3dba6a6d27
remove unrelated code
6 years ago
Martin Holst Swende
bfed28a421
core: more detailed metrics for block processing ( #18119 )
6 years ago
mr_franklin
2a113f6d72
core: return error if repair block failed ( #18126 )
...
* core: return error if repair block failed
* make error a bit shorter
6 years ago
Martin Holst Swende
e0d091e090
core: better printout of receipts in bad block reports ( #18156 )
...
* core/blockchain: better printout of receipts in bad block reports
* fix splleing
6 years ago
Péter Szilágyi
333b5fb123
core: polish side chain importer a bit
6 years ago
Franklin
21dd59bd04
.
6 years ago
Martin Holst Swende
493903eede
core: better side-chain importing
6 years ago
Péter Szilágyi
accc0fab4f
core, eth/downloader: fix ancestor lookup for fast sync
6 years ago
Péter Szilágyi
434dd5bc00
cmd, core, eth, light, trie: add trie read caching layer
6 years ago
gary rong
1212c7b844
core: fix default trie cache limit ( #17860 )
6 years ago
Corey Lin
1ff152f3a4
rawdb: remove unused parameter for WritePreimages func ( #18059 )
...
* rawdb: remove unused parameter for WritePreimages func and modify a
spelling mistake
* rawdb: update the doc for function WritePreimages
6 years ago
Ryan Schneider
b69942befe
core, internal/ethapi: add and use LRU cache for receipts ( #17610 )
6 years ago
gary rong
ba0a8b7887
core, eth: fix dependency cycle ( #17720 )
6 years ago
gary rong
d6254f827b
all: protect self-mined block during reorg ( #17656 )
6 years ago
Péter Szilágyi
0f2ba07c41
common, core, light: add block age into info logs
6 years ago
Wenbiao Zheng
6a33954731
core, eth, trie: use common/prque ( #17508 )
6 years ago
gary rong
a1783d1697
miner: move agent logic to worker ( #17351 )
...
* miner: move agent logic to worker
* miner: polish
* core: persist block before reorg
6 years ago
Ha ĐANG
2cffd4ff3c
core: fix some small typos on comment code ( #17278 )
6 years ago
Raghav Sood
11a402f747
core: report progress on log chain exports ( #17066 )
...
* core/blockchain: export progress
* core: polish up chain export progress report a bit
6 years ago
gary rong
a4a2343cdc
ethdb, core: implement delete for db batch ( #17101 )
6 years ago
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).
6 years ago
Felföldi Zsolt
049f5b3572
core, eth, les: more efficient hash-based header chain retrieval ( #16946 )
7 years ago
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
7 years ago
Péter Szilágyi
2ab24a2a8f
core: concurrent background transaction sender ecrecover
7 years ago
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
7 years ago
Péter Szilágyi
6cf0ab38bd
core/rawdb: separate raw database access to own package ( #16666 )
7 years ago
Kyuntae Ethan Kim
63687f04e4
core: check transaction/receipt count match when reconstructing blocks ( #16272 )
7 years ago
Martin Holst Swende
f83237573f
core: make current*Block atomic, and accessor functions mutex-free ( #16171 )
...
* core: make current*Block atomic, and accessor functions mutex-free
* core: fix review concerns
* core: fix error in atomic assignment
* core/light: implement atomic getter/setter for headerchain
7 years ago
Péter Szilágyi
89f914c030
core: flush out trie cache more meaningfully on stop ( #16143 )
...
* core: flush out trie cache more meaningfully on stop
* core: upgrade legacy tests to chain maker
7 years ago
Anton Evangelatov
ae9f97221a
metrics: pull library and introduce ResettingTimer and InfluxDB reporter ( #15910 )
...
* go-metrics: fork library and introduce ResettingTimer and InfluxDB reporter.
* vendor: change nonsense/go-metrics to ethersphere/go-metrics
* go-metrics: add tests. move ResettingTimer logic from reporter to type.
* all, metrics: pull in metrics package in go-ethereum
* metrics/test: make sure metrics are enabled for tests
* metrics: apply gosimple rules
* metrics/exp, internal/debug: init expvar endpoint when starting pprof server
* internal/debug: tiny comment formatting fix
7 years ago
Felix Lange
b007412db1
core: soften up state memory force-commit log messages ( #16080 )
...
Talk about "state" instead of "trie timing", "trie memory" and remove
the overzealous warning when the limit is just reached. Since the time
limit is always reached on slow machines, move the message to info level
so users don't freak out about internal details.
7 years ago
Péter Szilágyi
69c1f2c2a7
core: force import known but rolled back blocks
7 years ago
Péter Szilágyi
55599ee95d
core, trie: intermediate mempool between trie and database ( #15857 )
...
This commit reduces database I/O by not writing every state trie to disk.
7 years ago
Martin Holst Swende
017b9f7eac
core, ethdb: reuse database batches ( #15989 )
...
* leveldb: Update leveldb to 211f780 (poolfix)
* core, ethdb: reuse database batches
7 years ago
Péter Szilágyi
566d5c0777
core, eth, les, light: get rid of redundant methods
7 years ago
Péter Szilágyi
84be009154
core: sorted reorg insertion order for proper head header updating
7 years ago
Péter Szilágyi
6f69cdd109
all: switch gas limits from big.Int to uint64
7 years ago
ferhat elmas
5866626b08
core, p2p/discv5: use time.NewTicker instead of time.Tick ( #15747 )
7 years ago
Péter Szilágyi
54ce3887d8
core: split same-td blocks on block height
7 years ago
Péter Szilágyi
629b5837e9
core: revert invalid block dedup code ( #15235 )
7 years ago
Péter Szilágyi
10b3f97c9d
core: only fire one chain head per batch ( #15123 )
...
* core: only fire one chain head per batch
* miner: announce chan events synchronously
7 years ago