erigon-pulse/core
Martin Holst Swende cb5a995060 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>
# Conflicts:
#	core/blockchain.go
#	core/headerchain.go
#	light/lightchain.go
2021-03-08 14:24:23 +01:00
..
asm core/asm: allow numbers in labels (#20362) 2019-12-03 13:55:30 +01:00
bloombits core/bloombits: faster generator (#21625) 2020-10-26 17:16:00 +01:00
forkid Bodies download and simplify header download (#1471) 2021-02-08 09:25:10 +00:00
rawdb Add validation of senders amount (#1539) 2021-03-04 16:34:49 +07:00
state Revert "Extract validating interface (#1120)" (#1543) 2021-03-05 20:34:23 +00:00
types core/types: fixed typo (#21897) 2021-03-08 12:32:26 +01:00
vm core/vm/runtime: remove duplicated line (#21956) 2021-03-08 12:48:08 +01:00
.gitignore Renamed chain => core 2014-12-04 10:28:02 +01:00
bench_test.go Store transactions individually (#1358) 2020-11-22 21:25:26 +00:00
block_validator_test.go Don't force sync in case InMemDb (#1174) 2020-10-02 14:08:28 +01:00
block_validator.go core: fix a typo in comment (#21439) 2020-10-06 14:12:09 +02:00
blockchain_insert.go Mdbx devel 5 (#1413) 2020-12-16 14:35:14 +00:00
blockchain.go core,les: headerchain import in batches (#21471) 2021-03-08 14:24:23 +01:00
blocks.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
chain_indexer.go Method delete to accept second param: allow delete dupsort values (#1297) 2020-10-29 13:19:31 +00:00
chain_makers.go New Trie db layout - store trie structure info and multiple hashes per record (#1500) 2021-02-21 18:41:59 +00:00
dao_test.go Another step in migrating tests to staged sync (#970) 2020-08-24 18:00:40 +01:00
error.go all: fix typos in comments (#21118) 2020-06-15 19:38:13 +03:00
eth_backend.go rpcdaemon: subscriptions, newHeads (#1359) 2020-11-17 19:13:41 +00:00
events.go eth/filters: remove use of event.TypeMux for pending logs (#20312) 2020-01-30 13:36:30 +02:00
evm.go core, all: split vm.Context into BlockContext and TxContext (#21672) 2021-03-08 12:17:35 +01:00
gaspool.go miner: avoid unnecessary work (#15883) 2018-01-15 12:57:06 +02:00
gen_genesis_account.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
gen_genesis.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
genesis_alloc.go cmd, core, params: inital support for yolo-v1 testnet (#21154) 2020-06-15 19:38:13 +03:00
genesis.go further cleanup, unit tests for RPC daemon and tracing improvements (#1392) 2020-12-09 18:24:08 +00:00
headerchain_test.go core,les: headerchain import in batches (#21471) 2021-03-08 14:24:23 +01:00
headerchain.go core,les: headerchain import in batches (#21471) 2021-03-08 14:24:23 +01:00
mkalloc.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
pruner_test.go New Trie db layout - store trie structure info and multiple hashes per record (#1500) 2021-02-21 18:41:59 +00:00
pruner.go New Trie db layout - store trie structure info and multiple hashes per record (#1500) 2021-02-21 18:41:59 +00:00
rlp_test.go Speed up GenerateChain by using intermediate hashes (#736) 2020-07-10 22:37:34 +01:00
skip_analysis.go Update skip analysis for release (#1541) 2021-03-04 13:13:12 +00:00
state_prefetcher.go core, all: split vm.Context into BlockContext and TxContext (#21672) 2021-03-08 12:17:35 +01:00
state_processor_test.go core: improve contextual information on core errors (#21869) 2021-03-08 12:52:32 +01:00
state_processor.go core: improve contextual information on core errors (#21869) 2021-03-08 12:52:32 +01:00
state_transition.go core: improve contextual information on core errors (#21869) 2021-03-08 12:52:32 +01:00
tx_cacher.go Grpc-based remoteDb (#788) 2020-07-27 19:15:48 +07:00
tx_journal.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
tx_list_test.go Revert "core, txpool: less allocations when handling transactions (#21232)" 2020-08-07 12:52:34 +02:00
tx_list.go core: free pointer from slice after popping element from price heap (#21572) 2020-10-26 17:16:00 +01:00
tx_noncer.go Remove Copy from IntraBlockState and use references instead of copies in other places. 2019-11-07 13:32:20 +01:00
tx_pool_test.go test fixups 2020-08-29 14:35:39 +02:00
tx_pool.go don't open db in exclusive mode if no migrations (#1524) 2021-03-01 11:02:22 +07:00
types.go Jumpdest skip optimisation (#851) 2020-08-01 17:56:57 +01:00