lighthouse/beacon_node
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
..
beacon_chain Add lighthouse db command (#3129) 2022-04-01 00:58:59 +00:00
client Add lighthouse db command (#3129) 2022-04-01 00:58:59 +00:00
eth1 Update to Rust 1.59 and 2021 edition (#3038) 2022-02-25 00:10:17 +00:00
execution_layer Add lighthouse db command (#3129) 2022-04-01 00:58:59 +00:00
genesis Updates to tests and local testnet for Ganache 7 (#3056) 2022-03-20 22:48:14 +00:00
http_api Kiln mev boost (#3062) 2022-03-31 07:52:23 +00:00
http_metrics Support IPv6 in BN and VC HTTP APIs (#3104) 2022-03-24 00:04:49 +00:00
lighthouse_network Add lighthouse db command (#3129) 2022-04-01 00:58:59 +00:00
network Add lighthouse db command (#3129) 2022-04-01 00:58:59 +00:00
operation_pool Update to Rust 1.59 and 2021 edition (#3038) 2022-02-25 00:10:17 +00:00
src Add lighthouse db command (#3129) 2022-04-01 00:58:59 +00:00
store Add lighthouse db command (#3129) 2022-04-01 00:58:59 +00:00
tests Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
timer Update to Rust 1.59 and 2021 edition (#3038) 2022-02-25 00:10:17 +00:00
Cargo.toml v2.1.5 (#3096) 2022-03-17 23:13:46 +00:00