lighthouse/beacon_node/network/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
..
beacon_processor Remove sync await points (#3036) 2022-03-23 01:09:39 +00:00
router Custom RPC request management for sync (#3029) 2022-03-02 22:07:17 +00:00
service Filter non global ips from discovery (#3023) 2022-03-02 03:14:27 +00:00
subnet_service Improved peer management (#2993) 2022-02-18 02:36:43 +00:00
sync Add lighthouse db command (#3129) 2022-04-01 00:58:59 +00:00
error.rs Rename eth2_libp2p to lighthouse_network (#2702) 2021-10-19 00:30:39 +00:00
lib.rs Rename eth2_libp2p to lighthouse_network (#2702) 2021-10-19 00:30:39 +00:00
metrics.rs Add lighthouse db command (#3129) 2022-04-01 00:58:59 +00:00
nat.rs rust 1.53.0 updates (#2411) 2021-06-18 05:58:01 +00:00
persisted_dht.rs Rename eth2_libp2p to lighthouse_network (#2702) 2021-10-19 00:30:39 +00:00
service.rs Custom RPC request management for sync (#3029) 2022-03-02 22:07:17 +00:00
status.rs Correctly update range status when outdated chains are removed (#2827) 2021-11-26 01:13:49 +00:00