lighthouse/beacon_node/store/src
Michael Sproul 41e7a07c51 Add lighthouse db command (#3129)
## Proposed Changes

Add a `lighthouse db` command with three initial subcommands:

- `lighthouse db version`: print the database schema version.
- `lighthouse db migrate --to N`: manually upgrade (or downgrade!) the database to a different version.
- `lighthouse db inspect --column C`: log the key and size in bytes of every value in a given `DBColumn`.

This PR lays the groundwork for other changes, namely:

- Mark's fast-deposit sync (https://github.com/sigp/lighthouse/pull/2915), for which I think we should implement a database downgrade (from v9 to v8).
- My `tree-states` work, which already implements a downgrade (v10 to v8).
- Standalone purge commands like `lighthouse db purge-dht` per https://github.com/sigp/lighthouse/issues/2824.

## Additional Info

I updated the `strum` crate to 0.24.0, which necessitated some changes in the network code to remove calls to deprecated methods.

Thanks to @winksaville for the motivation, and implementation work that I used as a source of inspiration (https://github.com/sigp/lighthouse/pull/2685).
2022-04-01 00:58:59 +00:00
..
impls Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
chunk_writer.rs Implement checkpoint sync (#2244) 2021-09-22 00:37:28 +00:00
chunked_iter.rs Add configurable block replayer (#2863) 2021-12-21 06:30:52 +00:00
chunked_vector.rs Resolve Rust 1.56 lints and warnings (#2728) 2021-10-19 00:30:42 +00:00
config.rs Implement checkpoint sync (#2244) 2021-09-22 00:37:28 +00:00
errors.rs Add configurable block replayer (#2863) 2021-12-21 06:30:52 +00:00
forwards_iter.rs Add configurable block replayer (#2863) 2021-12-21 06:30:52 +00:00
garbage_collection.rs Compact database on finalization (#1871) 2020-11-09 07:02:21 +00:00
hot_cold_store.rs Add lighthouse db command (#3129) 2022-04-01 00:58:59 +00:00
impls.rs Implement checkpoint sync (#2244) 2021-09-22 00:37:28 +00:00
iter.rs Add configurable block replayer (#2863) 2021-12-21 06:30:52 +00:00
leveldb_store.rs Add lighthouse db command (#3129) 2022-04-01 00:58:59 +00:00
lib.rs Add lighthouse db command (#3129) 2022-04-01 00:58:59 +00:00
memory_store.rs Compact database on finalization (#1871) 2020-11-09 07:02:21 +00:00
metadata.rs Optimise balances cache in case of skipped slots (#2849) 2021-12-13 23:35:57 +00:00
metrics.rs Implement slasher (#1567) 2020-11-23 03:43:22 +00:00
partial_beacon_state.rs Initial merge changes 2021-12-02 14:26:50 +11:00
reconstruct.rs Add configurable block replayer (#2863) 2021-12-21 06:30:52 +00:00