Felix Lange
c8e9a91672
build: upgrade to golangci-lint 1.24.0 ( #20901 )
...
* accounts/scwallet: remove unnecessary uses of fmt.Sprintf
* cmd/puppeth: remove unnecessary uses of fmt.Sprintf
* p2p/discv5: remove unnecessary use of fmt.Sprintf
* whisper/mailserver: remove unnecessary uses of fmt.Sprintf
* core: goimports -w tx_pool_test.go
* eth/downloader: goimports -w downloader_test.go
* build: upgrade to golangci-lint 1.24.0
5 years ago
Martin Holst Swende
8dc8941551
core/vm: use a callcontext struct ( #20761 )
...
* core/vm: use a callcontext struct
* core/vm: fix tests
* core/vm/runtime: benchmark
* core/vm: make intpool push inlineable, unexpose callcontext
5 years ago
ucwong
f98cabad7c
core: add missing Timer.Stop call in TestLogReorgs ( #20870 )
5 years ago
Wenbiao Zheng
03fe9de2cb
eth: add debug_accountRange API ( #19645 )
...
This new API allows reading accounts and their content by address range.
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Felix Lange <fjl@twurst.com>
5 years ago
Martin Holst Swende
76eed9e50d
snapshotter/tests: verify snapdb post-state against trie ( #20812 )
...
* core/state/snapshot: basic trie-to-hash implementation
* tests: validate snapshot after test
* core/state/snapshot: fix review concerns
5 years ago
Martin Holst Swende
55a73f556a
core: bump txpool tx max size to 128KB
5 years ago
Felix Lange
d6c5f2417c
eth: improve shutdown synchronization ( #20695 )
...
* eth: improve shutdown synchronization
Most goroutines started by eth.Ethereum didn't have any shutdown sync at
all, which lead to weird error messages when quitting the client.
This change improves the clean shutdown path by stopping all internal
components in dependency order and waiting for them to actually be
stopped before shutdown is considered done. In particular, we now stop
everything related to peers before stopping 'resident' parts such as
core.BlockChain.
* eth: rewrite sync controller
* eth: remove sync start debug message
* eth: notify chainSyncer about new peers after handshake
* eth: move downloader.Cancel call into chainSyncer
* eth: make post-sync block broadcast synchronous
* eth: add comments
* core: change blockchain stop message
* eth: change closeBloomHandler channel type
5 years ago
meowsbits
a75c0610b7
core/blockchain: simplify atomic store after writeBlockWithState ( #20798 )
...
Signed-off-by: meows <b5c6@protonmail.com>
5 years ago
Martin Holst Swende
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
5 years ago
gary rong
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.
5 years ago
meowsbits
20a092fb9f
core/rawdb: fix freezer table test error check
...
Fixes: Condition is always 'false' because 'err' is always 'nil'
5 years ago
Péter Szilágyi
fab0ee3bfa
core/state/snapshot: fix various iteration issues due to destruct set
5 years ago
Martin Holst Swende
bc5d742c66
core: more blockchain tests
5 years ago
Martin Holst Swende
eff7cfbb03
core/state/snapshot: handle deleted accounts in fast iterator
5 years ago
Péter Szilágyi
328de180a7
core/state: fix resurrection state clearing and access
5 years ago
Péter Szilágyi
dcb22a9f99
core/state: fix account root hash update point
5 years ago
Péter Szilágyi
a4cf279494
core/state: extend snapshotter to handle account resurrections
5 years ago
Péter Szilágyi
6e05ccd845
core/state/snapshot, tests: sync snap gen + snaps in consensus tests
5 years ago
Ali Atiia
556888c4a9
core/vm: fix method doc ( #20730 )
...
typo in func name in the comment
5 years ago
Martin Holst Swende
fe8347ea8a
squashme
5 years ago
Martin Holst Swende
361a6f08ac
core/tests: test for destroy+recreate contract with storage
5 years ago
Péter Szilágyi
92ec07d63b
core/state: fix an account resurrection issue
5 years ago
Péter Szilágyi
06d4470b41
core: fix broken tests due to API changes + linter
5 years ago
Martin Holst Swende
19099421dc
core/state/snapshot: faster account iteration, CLI integration
5 years ago
Péter Szilágyi
6ddb92a089
core/state/snapshot: full featured account iteration
5 years ago
Martin Holst Swende
e570835356
core/state/snapshot: implement iterator priority for fast direct data lookup
5 years ago
Péter Szilágyi
e567675473
core/state/snapshot: move iterator out into its own files
5 years ago
Martin Holst Swende
7e38996301
core/state/snapshot: implement snapshot layer iteration
5 years ago
Péter Szilágyi
22c494d399
core/state/snapshot: bloom, metrics and prefetcher fixes
5 years ago
Martin Holst Swende
3ad4335acc
core/state/snapshot: node behavioural difference on bloom content
5 years ago
Péter Szilágyi
fd39f722a3
core: journal the snapshot inside leveldb, not a flat file
5 years ago
Martin Holst Swende
d5d7c0c24b
core/state/snapshot: fix difflayer origin-initalization after flatten
5 years ago
Péter Szilágyi
351a5903b0
core/rawdb, core/state/snapshot: runtime snapshot generation
5 years ago
Martin Holst Swende
f300c0df01
core/state/snapshot: replace bigcache with fastcache
5 years ago
Péter Szilágyi
d754091a87
core/state/snapshot: unlink snapshots from blocks, quad->linear cleanup
5 years ago
Martin Holst Swende
cdf3f016df
snapshot: iteration and buffering optimizations
5 years ago
Péter Szilágyi
d7d81d7c12
core/state/snapshot: extract and split cap method, cover corners
5 years ago
Martin Holst Swende
e146fbe4e7
core/state: lazy sorting, snapshot invalidation
5 years ago
Péter Szilágyi
542df8898e
core: initial version of state snapshots
5 years ago
Gregory Markou
4be8840120
core/vm: use dedicated SLOAD gas constant for EIP-2200 ( #20646 )
5 years ago
Martin Holst Swende
855690523a
core: ensure state exists for prefetcher ( #20627 )
5 years ago
Péter Szilágyi
9938d954c8
eth: rework tx fetcher to use O(1) ops + manage network requests
5 years ago
rjl493456442
049e17116e
core, eth: implement eth/65 transaction fetcher
5 years ago
Martin Holst Swende
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>
5 years ago
Martin Holst Swende
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
5 years ago
Guillaume Ballet
24cab2d535
core/vm/runtime: fix typos in comment ( #20608 )
5 years ago
gary rong
b88b4632c2
core: fix chain indexer unit test ( #20506 )
5 years ago
gary rong
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
5 years ago
Martin Holst Swende
b2de0bd87b
core: set max tx size down to 2 slots (64KB)
5 years ago
MichaelRiabzev-StarkWare
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>
5 years ago