a75c0610b7
core/blockchain: simplify atomic store after writeBlockWithState ( #20798 )
...
Signed-off-by: meows <b5c6@protonmail.com >
2020-03-23 15:05:15 +01:00
613af7ceea
Merge pull request #20152 from karalabe/snapshot-5
...
Dynamic state snapshots
2020-03-23 12:57:31 +02:00
074efe6c8d
core: fix two snapshot iterator flaws, decollide snap storage prefix
...
* core/state/snapshot/iterator: fix two disk iterator flaws
* core/rawdb: change SnapshotStoragePrefix to avoid prefix collision with preimagePrefix
2020-03-23 12:34:27 +02:00
36e93d2dd8
Merge pull request #20779 from meowsbits/patch-3
...
core/rawdb: fix freezer table test error check
2020-03-18 16:30:58 +02:00
6283391c99
core/rawdb: improve table database ( #20703 )
...
This PR fixes issues in TableDatabase.
TableDatabase is a wrapper of underlying ethdb.Database with an additional prefix.
The prefix is applied to all entries it maintains. However when we try to retrieve entries
from it we don't handle the key properly. In theory the prefix should be truncated and
only user key is returned. But we don't do it in some cases, e.g. the iterator and batch
replayer created from it. So this PR is the fix to these issues.
2020-03-18 13:15:49 +01:00
20a092fb9f
core/rawdb: fix freezer table test error check
...
Fixes: Condition is always 'false' because 'err' is always 'nil'
2020-03-18 06:55:30 -05:00
fab0ee3bfa
core/state/snapshot: fix various iteration issues due to destruct set
2020-03-04 15:06:04 +02:00
bc5d742c66
core: more blockchain tests
2020-03-04 14:39:27 +02:00
eff7cfbb03
core/state/snapshot: handle deleted accounts in fast iterator
2020-03-04 14:38:55 +02:00
328de180a7
core/state: fix resurrection state clearing and access
2020-03-04 10:22:48 +02:00
dcb22a9f99
core/state: fix account root hash update point
2020-03-03 16:55:06 +02:00
a4cf279494
core/state: extend snapshotter to handle account resurrections
2020-03-03 15:52:00 +02:00
6e05ccd845
core/state/snapshot, tests: sync snap gen + snaps in consensus tests
2020-03-03 09:17:13 +02:00
556888c4a9
core/vm: fix method doc ( #20730 )
...
typo in func name in the comment
2020-03-02 19:20:27 +02:00
fe8347ea8a
squashme
2020-03-02 14:06:44 +01:00
361a6f08ac
core/tests: test for destroy+recreate contract with storage
2020-03-02 13:46:56 +01:00
92ec07d63b
core/state: fix an account resurrection issue
2020-02-27 15:03:10 +02:00
06d4470b41
core: fix broken tests due to API changes + linter
2020-02-25 12:51:16 +02:00
19099421dc
core/state/snapshot: faster account iteration, CLI integration
2020-02-25 12:51:15 +02:00
6ddb92a089
core/state/snapshot: full featured account iteration
2020-02-25 12:51:14 +02:00
e570835356
core/state/snapshot: implement iterator priority for fast direct data lookup
2020-02-25 12:51:14 +02:00
e567675473
core/state/snapshot: move iterator out into its own files
2020-02-25 12:51:13 +02:00
7e38996301
core/state/snapshot: implement snapshot layer iteration
2020-02-25 12:51:12 +02:00
22c494d399
core/state/snapshot: bloom, metrics and prefetcher fixes
2020-02-25 12:51:11 +02:00
3ad4335acc
core/state/snapshot: node behavioural difference on bloom content
2020-02-25 12:51:11 +02:00
fd39f722a3
core: journal the snapshot inside leveldb, not a flat file
2020-02-25 12:51:10 +02:00
d5d7c0c24b
core/state/snapshot: fix difflayer origin-initalization after flatten
2020-02-25 12:51:09 +02:00
351a5903b0
core/rawdb, core/state/snapshot: runtime snapshot generation
2020-02-25 12:51:08 +02:00
f300c0df01
core/state/snapshot: replace bigcache with fastcache
2020-02-25 12:51:08 +02:00
d754091a87
core/state/snapshot: unlink snapshots from blocks, quad->linear cleanup
2020-02-25 12:51:07 +02:00
cdf3f016df
snapshot: iteration and buffering optimizations
2020-02-25 12:51:06 +02:00
d7d81d7c12
core/state/snapshot: extract and split cap method, cover corners
2020-02-25 12:51:05 +02:00
e146fbe4e7
core/state: lazy sorting, snapshot invalidation
2020-02-25 12:51:05 +02:00
542df8898e
core: initial version of state snapshots
2020-02-25 12:51:04 +02:00
4be8840120
core/vm: use dedicated SLOAD gas constant for EIP-2200 ( #20646 )
2020-02-18 15:07:41 +01:00
855690523a
core: ensure state exists for prefetcher ( #20627 )
2020-02-14 10:54:02 +02:00
9938d954c8
eth: rework tx fetcher to use O(1) ops + manage network requests
2020-02-13 15:27:15 +02:00
049e17116e
core, eth: implement eth/65 transaction fetcher
2020-02-11 13:56:36 +02:00
058a4ac5f1
core/evm: less iteration in blockhash ( #20589 )
...
* core/vm/runtime: add test for blockhash
* core/evm: less iteration in blockhash
* core/vm/runtime: nitpickfix
Co-authored-by: Péter Szilágyi <peterke@gmail.com >
2020-02-04 12:32:31 +02:00
5a9c96454e
trie: separate hashes and committer, collapse on commit
...
* trie: make db insert use size instead of full data
* core/state: minor optimization in state onleaf allocation
* trie: implement dedicated committer and hasher
* trie: use dedicated committer/hasher
* trie: linter nitpicks
* core/state, trie: avoid unnecessary storage trie load+commit
* trie: review feedback, mainly docs + minor changes
* trie: start deprecating old hasher
* trie: fix misspell+lint
* trie: deprecate hasher.go, make proof framework use new hasher
* trie: rename pure_committer/hasher to committer/hasher
* trie, core/state: fix review concerns
* trie: more review concerns
* trie: make commit collapse into hashnode, don't touch dirtyness
* trie: goimports fixes
* trie: remove panics
2020-02-03 17:28:30 +02:00
24cab2d535
core/vm/runtime: fix typos in comment ( #20608 )
2020-01-30 11:21:10 +01:00
b88b4632c2
core: fix chain indexer unit test ( #20506 )
2020-01-20 10:38:08 +02:00
770316dc20
core, light: write chain data in atomic way ( #20287 )
...
* core: write chain data in atomic way
* core, light: address comments
* core, light: fix linter
* core, light: address comments
2020-01-17 12:49:32 +02:00
b2de0bd87b
core: set max tx size down to 2 slots (64KB)
2020-01-14 11:49:36 +01:00
8bd37a1d91
core: count tx size in slots, bump max size ot 4x32KB ( #20352 )
...
* tests for tx size
* alow multiple slots transactions
* tests for tx size limit (32 KB)
* change tx size tests to use addRemoteSync instead of validateTx (requested in pool request).
* core: minor tx slotting polishes, add slot tracking metric
Co-authored-by: Michael Riabzev <RiabzevMichael@gmail.com >
Co-authored-by: Péter Szilágyi <peterke@gmail.com >
2020-01-10 11:40:03 +02:00
fc392395fb
core/state: add more verbosity to panic
2020-01-10 10:12:32 +01:00
d90d1db609
eth/filters: remove use of event.TypeMux for pending logs ( #20312 )
2019-12-10 12:39:14 +01:00
f383eaa102
core: removed old invalid comment
2019-12-10 11:50:16 +01:00
bc01593afb
consensus/ethash, params: eip-2384: bump difficulty bomb ( #20347 )
...
* consensus/ethash, params: implement eip-2384: bump difficulty bomb
* params: EIP 2384 compat checks
* consensus, params: add Muir Glacier block number (mainnet,ropsten) + official name
* core/forkid: forkid tests for muir glacier
* params/config: address review concerns
* params, core/forkid: review nitpicks
* cmd/geth,eth,les: add override option for muir glacier
* params: nit fix
2019-12-06 11:36:40 +02:00
fc7e0fe6c7
core, miner: remove PostChainEvents ( #19396 )
...
This change:
- removes the PostChainEvents method on core.BlockChain.
- sorts 'removed log' events by block number.
- fire the NewChainHead event if we inject a canonical block into the chain
even if the entire insertion is not successful.
- guarantees correct event ordering in all cases.
2019-11-29 14:22:08 +01:00