lighthouse-pulse/beacon_node
Michael Sproul 556190ff46 Compact database on finalization (#1871)
## Issue Addressed

Closes #1866

## Proposed Changes

* Compact the database on finalization. This removes the deleted states from disk completely. Because it happens in the background migrator, it doesn't block other database operations while it runs. On my Medalla node it took about 1 minute and shrank the database from 90GB to 9GB.
* Fix an inefficiency in the pruning algorithm where it would always use the genesis checkpoint as the `old_finalized_checkpoint` when running for the first time after start-up. This would result in loading lots of states one-at-a-time back to genesis, and storing a lot of block roots in memory. The new code stores the old finalized checkpoint on disk and only uses genesis if no checkpoint is already stored. This makes it both backwards compatible _and_ forwards compatible -- no schema change required!
* Introduce two new `INFO` logs to indicate when pruning has started and completed. Users seem to want to know this information without enabling debug logs!
2020-11-09 07:02:21 +00:00
..
beacon_chain Compact database on finalization (#1871) 2020-11-09 07:02:21 +00:00
client Add --testnet mainnet and start HTTP server before genesis (#1862) 2020-11-09 05:04:03 +00:00
eth1 Return eth1-related data via the API (#1797) 2020-11-02 00:37:30 +00:00
eth2_libp2p Seen addresses store port (#1841) 2020-11-09 04:01:03 +00:00
genesis Return eth1-related data via the API (#1797) 2020-11-02 00:37:30 +00:00
http_api Seen addresses store port (#1841) 2020-11-09 04:01:03 +00:00
http_metrics Support pre-flight CORS check (#1772) 2020-10-22 04:47:27 +00:00
network Update libp2p (#1865) 2020-11-06 04:14:14 +00:00
operation_pool Refine op pool pruning (#1805) 2020-10-22 04:47:29 +00:00
src Add --testnet mainnet and start HTTP server before genesis (#1862) 2020-11-09 05:04:03 +00:00
store Compact database on finalization (#1871) 2020-11-09 07:02:21 +00:00
tests Implement standard eth2.0 API (#1569) 2020-10-01 11:12:36 +10:00
timer Upgrade discovery and restructure task execution (#1693) 2020-10-05 18:45:54 +11:00
websocket_server Update external deps (#1711) 2020-10-05 08:22:19 +00:00
Cargo.toml Bump version to v0.3.3 (#1850) 2020-11-02 23:55:15 +00:00