Arpit Temani
b27dca6bbf
merge v1.10.7
2021-08-19 15:56:13 +05:30
Sina Mahmoodi
c38fab912b
core: get header from block cache ( #23299 )
2021-08-03 17:29:47 +02:00
baptiste-b-pegasys
523866c2cc
all: change blacklist terms
2021-07-29 11:17:40 +03:00
Arpit Temani
12f4f63581
Update blockchain.go
2021-05-25 16:01:25 +05:30
Jaynti Kanani
638e829b04
update: merge v1.10.3
2021-05-25 14:20:38 +04:00
Péter Szilágyi
fc1c1cbea9
Merge pull request #22739 from holiman/remove_code
...
core: remove old conversion to shuffle leveldb blocks into ancients
2021-05-03 15:37:46 +03:00
Péter Szilágyi
8681a2536c
Merge pull request #22777 from karalabe/snapshots-abort-resume-on-sync
...
core, eth: abort snapshot generation on snap sync and resume later
2021-04-30 17:04:05 +03:00
Péter Szilágyi
745757ac6b
core, eth: abort snapshot generation on snap sync and resume later
2021-04-30 17:03:10 +03:00
aaronbuchwald
b778e37daa
core: fix typo in comment ( #22773 )
2021-04-30 12:50:02 +02:00
aaronbuchwald
1e57ab5de6
core: remove unused else branch in reorg ( #22783 )
2021-04-30 12:47:05 +02:00
Martin Holst Swende
83375b0873
core: remove old conversion to shuffle leveldb blocks into ancients
2021-04-26 14:27:56 +02:00
gary rong
d6ffa14035
core: nuke legacy snapshot supporting ( #22663 )
2021-04-20 08:27:46 +03:00
Guillaume Ballet
f79cce5de9
eth/catalyst: add catalyst API prototype ( #22641 )
...
This change adds the --catalyst flag, enabling an RPC API for eth2 integration.
In this initial version, catalyst mode also disables all peer-to-peer networking.
Co-authored-by: Mikhail Kalinin <noblesse.knight@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
2021-04-16 21:29:22 +02:00
Péter Szilágyi
1e207342b5
all: make logs a bit easier on the eye to digest ( #22665 )
...
* all: add thousandths separators for big numbers on log messages
* p2p/sentry: drop accidental file
* common, log: add fast number formatter
* common, eth/protocols/snap: simplifty fancy num types
* log: handle nil big ints
2021-04-15 20:35:00 +03:00
Jaynti Kanani
26ad897916
chg: update geth to v1.10.1
2021-03-09 17:06:18 +05:30
Péter Szilágyi
ef227c5f42
core: fix temp memory blowup caused by defers holding on to state
2021-02-12 12:45:34 +02:00
gary rong
f566dd305e
all: bloom-filter based pruning mechanism ( #21724 )
...
* cmd, core, tests: initial state pruner
core: fix db inspector
cmd/geth: add verify-state
cmd/geth: add verification tool
core/rawdb: implement flatdb
cmd, core: fix rebase
core/state: use new contract code layout
core/state/pruner: avoid deleting genesis state
cmd/geth: add helper function
core, cmd: fix extract genesis
core: minor fixes
contracts: remove useless
core/state/snapshot: plugin stacktrie
core: polish
core/state/snapshot: iterate storage concurrently
core/state/snapshot: fix iteration
core: add comments
core/state/snapshot: polish code
core/state: polish
core/state/snapshot: rebase
core/rawdb: add comments
core/rawdb: fix tests
core/rawdb: improve tests
core/state/snapshot: fix concurrent iteration
core/state: run pruning during the recovery
core, trie: implement martin's idea
core, eth: delete flatdb and polish pruner
trie: fix import
core/state/pruner: add log
core/state/pruner: fix issues
core/state/pruner: don't read back
core/state/pruner: fix contract code write
core/state/pruner: check root node presence
cmd, core: polish log
core/state: use HEAD-127 as the target
core/state/snapshot: improve tests
cmd/geth: fix verification tool
cmd/geth: use HEAD as the verification default target
all: replace the bloomfilter with martin's fork
cmd, core: polish code
core, cmd: forcibly delete state root
core/state/pruner: add hash64
core/state/pruner: fix blacklist
core/state: remove blacklist
cmd, core: delete trie clean cache before pruning
cmd, core: fix lint
cmd, core: fix rebase
core/state: fix the special case for clique networks
core/state/snapshot: remove useless code
core/state/pruner: capping the snapshot after pruning
cmd, core, eth: fixes
core/rawdb: update db inspector
cmd/geth: polish code
core/state/pruner: fsync bloom filter
cmd, core: print warning log
core/state/pruner: adjust the parameters for bloom filter
cmd, core: create the bloom filter by size
core: polish
core/state/pruner: sanitize invalid bloomfilter size
cmd: address comments
cmd/geth: address comments
cmd/geth: address comment
core/state/pruner: address comments
core/state/pruner: rename homedir to datadir
cmd, core: address comments
core/state/pruner: address comment
core/state: address comments
core, cmd, tests: address comments
core: address comments
core/state/pruner: release the iterator after each commit
core/state/pruner: improve pruner
cmd, core: adjust bloom paramters
core/state/pruner: fix lint
core/state/pruner: fix tests
core: fix rebase
core/state/pruner: remove atomic rename
core/state/pruner: address comments
all: run go mod tidy
core/state/pruner: avoid false-positive for the middle state roots
core/state/pruner: add checks for middle roots
cmd/geth: replace crit with error
* core/state/pruner: fix lint
* core: drop legacy bloom filter
* core/state/snapshot: improve pruner
* core/state/snapshot: polish concurrent logs to report ETA vs. hashes
* core/state/pruner: add progress report for pruning and compaction too
* core: fix snapshot test API
* core/state: fix some pruning logs
* core/state/pruner: support recovering from bloom flush fail
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2021-02-08 13:16:30 +02:00
gary rong
49cdcf5c70
core: reset to genesis when middle block is missing ( #22135 )
...
When a sethead/rewind finds that the targeted block is missing, it resets to genesis instead of crashing. Closes #22129
2021-01-25 14:29:45 +01:00
Péter Szilágyi
42f9f1f073
core/state: convert prefetcher to concurrent per-trie loader
2021-01-21 01:47:14 +02:00
Martin Holst Swende
1e1865b73f
core: implement background trie prefetcher
...
Squashed from the following commits:
core/state: lazily init snapshot storage map
core/state: fix flawed meter on storage reads
core/state: make statedb/stateobjects reuse a hasher
core/blockchain, core/state: implement new trie prefetcher
core: make trie prefetcher deliver tries to statedb
core/state: refactor trie_prefetcher, export storage tries
blockchain: re-enable the next-block-prefetcher
state: remove panics in trie prefetcher
core/state/trie_prefetcher: address some review concerns
sq
2021-01-21 01:46:38 +02:00
gary rong
5a1b384352
core: persist bad blocks ( #21827 )
...
* core: persist bad blocks
* core, eth, internal: address comments
* core/rawdb: add badblocks to inspector
* core, eth: update
* internal: revert
* core, eth: only save 10 bad blocks
* core/rawdb: address comments
* core/rawdb: fix
* core: address comments
2021-01-10 12:54:15 +01:00
Péter Szilágyi
017831dd5b
core, eth: split eth package, implement snap protocol ( #21482 )
...
This commit splits the eth package, separating the handling of eth and snap protocols. It also includes the capability to run snap sync (https://github.com/ethereum/devp2p/blob/master/caps/snap.md ) , but does not enable it by default.
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2020-12-14 10:27:15 +01:00
Martin Holst Swende
40b6ccf383
core,les: headerchain import in batches ( #21471 )
...
* core: add test for headerchain inserts
* core, light: write headerchains in batches
* core: change to one callback per batch of inserted headers + review concerns
* core: error-check on batch write
* core: unexport writeHeaders
* core: remove callback parameter in InsertHeaderChain
The semantics of InsertHeaderChain are now much simpler: it is now an
all-or-nothing operation. The new WriteStatus return value allows
callers to check for the canonicality of the insertion. This change
simplifies use of HeaderChain in package les, where the callback was
previously used to post chain events.
* core: skip some hashing when writing headers
* core: less hashing in header validation
* core: fix headerchain flaw regarding blacklisted hashes
Co-authored-by: Felix Lange <fjl@twurst.com>
2020-12-09 11:13:02 +01:00
Jaynti Kanani
81e357920d
fix: conflict
2020-12-05 19:57:46 +05:30
Jaynti Kanani
337d1bfb7c
new: add roothash and state sync filter apis
2020-11-20 14:25:19 +05:30
Jaynti Kanani
6235761fcf
Merge branch 'geth-bor' into geth-bor-changes
2020-11-20 11:01:28 +05:30
Jaynti Kanani
7a3036c110
fix: remove duplicate merge logs block
2020-11-20 11:01:09 +05:30
Jaynti Kanani
c241e81ea3
Merge branch 'geth-bor' into geth-bor-changes
2020-11-20 10:53:35 +05:30
Jaynti Kanani
b395595c8b
Merge tag v1.9.24 into geth-bor
2020-11-20 10:52:42 +05:30
gary rong
23524f8900
all: disable recording preimage of trie keys ( #21402 )
...
* cmd, core, eth, light, trie: disable recording preimage by default
* core, eth: fix unit tests
* core: fix import
* all: change to nopreimage
* cmd, core, eth, trie: use cache.preimages flag
* cmd: enable preimages for archive node
* cmd/utils, trie: simplify preimage tracking a bit
* core: fix linter
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2020-11-18 11:51:33 +02:00
Jaynti Kanani
82246a5e94
chg: no verify without engine
2020-11-14 14:53:23 +05:30
Jaynti Kanani
1e56a697c0
use go-ethereum for better forked-bor release
2020-11-13 09:21:48 +05:30
gary rong
b63e3c37a6
core: improve snapshot journal recovery ( #21594 )
...
* core/state/snapshot: introduce snapshot journal version
* core: update the disk layer in an atomic way
* core: persist the disk layer generator periodically
* core/state/snapshot: improve logging
* core/state/snapshot: forcibly ensure the legacy snapshot is matched
* core/state/snapshot: add debug logs
* core, tests: fix tests and special recovery case
* core: polish
* core: add more blockchain tests for snapshot recovery
* core/state: fix comment
* core: add recovery flag for snapshot
* core: add restart after start-after-crash tests
* core/rawdb: fix imports
* core: fix tests
* core: remove log
* core/state/snapshot: fix snapshot
* core: avoid callbacks in SetHead
* core: fix setHead cornercase where the threshold root has state
* core: small docs for the test cases
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2020-10-29 21:01:58 +02:00
Jaynti Kanani
0f0032e652
fix: websocket subscribe for state sync logs
2020-10-29 18:59:18 +05:30
Jaynti Kanani
34e9724c0d
fix: delete bor tx lookup on reorg
2020-10-27 20:45:54 +05:30
Jaynti Kanani
30708baafd
new: add bor block tx/receipt/logs as normal entities
2020-10-26 15:43:07 +05:30
gary rong
9d25f34263
core: track and improve tx indexing/unindexing ( #21331 )
...
* core: add background indexer to waitgroup
* core: make indexer stopable
* core/rawdb: add unit tests
* core/rawdb: fix lint
* core/rawdb: fix tests
* core/rawdb: fix linter
2020-10-20 16:34:50 +02:00
Jaynti Kanani
eeecd69289
fix: fill ancient data using convenience method
2020-10-19 18:22:50 +05:30
Jaynti Kanani
0c21e1c6b5
sort logs before getting bor block receipt logs
2020-10-18 18:01:25 +05:30
Jaynti Kanani
45230abb63
fix: add block receipt
2020-10-17 13:52:07 +05:30
Giuseppe Bertone
0185ee0993
core/rawdb: single point of maintenance for writing and deleting tx lookup indexes ( #21480 )
2020-09-15 10:37:01 +02:00
Martin Holst Swende
1b5a867eec
core: do less lookups when writing fast-sync block bodies ( #21468 )
2020-08-22 18:12:04 +02:00
gary rong
87c0ba9213
core, eth, les, trie: add a prefix to contract code ( #21080 )
2020-08-21 15:10:40 +03:00
Péter Szilágyi
8cbdc8638f
core: define and test chain rewind corner cases ( #21409 )
...
* core: define and test chain reparation cornercases
* core: write up a variety of set-head tests
* core, eth: unify chain rollbacks, handle all the cases
* core: make linter smile
* core: remove commented out legacy code
* core, eth/downloader: fix review comments
* core: revert a removed recovery mechanism
2020-08-20 13:01:24 +03:00
Marius van der Wijden
0bdd295cc0
core: more detailed metering for reorgs ( #21420 )
2020-08-20 09:49:35 +02:00
ptsayli@gmail.com
722e246d07
Fix: resolve comments
2020-08-12 15:27:01 +05:30
ptsayli@gmail.com
ae38eea1f3
add state sync to core.blockchain
2020-08-12 11:32:03 +05:30
ptsayli@gmail.com
38ebecb2fa
Fix: broadcast deposit event from non-validator node
2020-08-11 15:07:55 +05:30
Robert Zaremba
5a88a7cf5b
core: use errors.Is for consensus errors check ( #21095 )
2020-08-05 09:52:54 +02:00
ptsayli@gmail.com
50db55daa5
remove todo
2020-07-30 11:05:45 +05:30