plugeth/light
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
..
lightchain_test.go core: improve contextual information on core errors (#21869) 2020-12-04 12:22:19 +01:00
lightchain.go core,les: headerchain import in batches (#21471) 2020-12-09 11:13:02 +01:00
nodeset.go all: integrate the freezer with fast sync 2019-05-16 10:39:32 +03:00
odr_test.go core, all: split vm.Context into BlockContext and TxContext (#21672) 2020-11-13 13:42:19 +01:00
odr_util.go les: historical data garbage collection (#19570) 2020-07-13 11:02:54 +02:00
odr.go light: fix wrong description in a comment (#21573) 2020-09-28 14:30:10 +02:00
postprocess.go all: disable recording preimage of trie keys (#21402) 2020-11-18 11:51:33 +02:00
trie_test.go cmd, core, eth: background transaction indexing (#20302) 2020-05-11 18:58:43 +03:00
trie.go core, eth, les, trie: add a prefix to contract code (#21080) 2020-08-21 15:10:40 +03:00
txpool_test.go cmd, core, eth: background transaction indexing (#20302) 2020-05-11 18:58:43 +03:00
txpool.go core/rawdb: single point of maintenance for writing and deleting tx lookup indexes (#21480) 2020-09-15 10:37:01 +02:00