bsc/core/rawdb
Martin Holst Swende 681618275c
core: speed up header import (#21967)
This PR implements the following modifications

- Don't shortcut check if block is present, thus avoid disk lookup
- Don't check hash ancestry in early-check (it's still done in parallel checker)
- Don't check time.Now for every single header

Charts and background info can be found here: https://github.com/holiman/headerimport/blob/main/README.md
With these changes, writing 1M headers goes down to from 80s to 62s.
2021-01-26 12:17:11 +01:00
..
accessors_chain_test.go core: persist bad blocks (#21827) 2021-01-10 12:54:15 +01:00
accessors_chain.go core: persist bad blocks (#21827) 2021-01-10 12:54:15 +01:00
accessors_indexes_test.go core/rawdb: single point of maintenance for writing and deleting tx lookup indexes (#21480) 2020-09-15 10:37:01 +02:00
accessors_indexes.go core/rawdb: single point of maintenance for writing and deleting tx lookup indexes (#21480) 2020-09-15 10:37:01 +02:00
accessors_metadata.go core, eth, les: implement unclean-shutdown marker (#21893) 2020-12-11 15:56:00 +01:00
accessors_snapshot.go core/rawdb, eth/protocols : Method name typo fix (#22026) 2020-12-27 22:38:16 +01:00
accessors_state.go core, eth, les, trie: add a prefix to contract code (#21080) 2020-08-21 15:10:40 +03:00
chain_iterator_test.go core: track and improve tx indexing/unindexing (#21331) 2020-10-20 16:34:50 +02:00
chain_iterator.go core: track and improve tx indexing/unindexing (#21331) 2020-10-20 16:34:50 +02:00
database.go core: persist bad blocks (#21827) 2021-01-10 12:54:15 +01:00
freezer_table_test.go core/rawdb: swap tailId and itemOffset for deleted items in freezer (#21220) 2020-06-17 09:41:07 +02:00
freezer_table.go core: speed up header import (#21967) 2021-01-26 12:17:11 +01:00
freezer.go core: define and test chain rewind corner cases (#21409) 2020-08-20 13:01:24 +03:00
schema.go core: persist bad blocks (#21827) 2021-01-10 12:54:15 +01:00
table_test.go all: simplify and fix database iteration with prefix/start (#20808) 2020-04-15 14:08:53 +03:00
table.go all: simplify and fix database iteration with prefix/start (#20808) 2020-04-15 14:08:53 +03:00