lighthouse/beacon_node/http_api/tests
Michael Sproul 20067b9465 Remove checkpoint alignment requirements and enable historic state pruning (#4610)
## Issue Addressed

Closes #3210
Closes #3211

## Proposed Changes

- Checkpoint sync from the latest finalized state regardless of its alignment.
- Add the `block_root` to the database's split point. This is _only_ added to the in-memory split in order to avoid a schema migration. See `load_split`.
- Add a new method to the DB called `get_advanced_state`, which looks up a state _by block root_, with a `state_root` as fallback. Using this method prevents accidental accesses of the split's unadvanced state, which does not exist in the hot DB and is not guaranteed to exist in the freezer DB at all. Previously Lighthouse would look up this state _from the freezer DB_, even if it was required for block/attestation processing, which was suboptimal.
- Replace several state look-ups in block and attestation processing with `get_advanced_state` so that they can't hit the split block's unadvanced state.
- Do not store any states in the freezer database by default. All states will be deleted upon being evicted from the hot database unless `--reconstruct-historic-states` is set. The anchor info which was previously used for checkpoint sync is used to implement this, including when syncing from genesis.

## Additional Info

Needs further testing. I want to stress-test the pruned database under Hydra.

The `get_advanced_state` method is intended to become more relevant over time: `tree-states` includes an identically named method that returns advanced states from its in-memory cache.

Co-authored-by: realbigsean <seananderson33@gmail.com>
2023-08-21 05:02:32 +00:00
..
broadcast_validation_tests.rs Support SSZ request body for POST /beacon/blinded_blocks endpoints (v1 & v2) (#4504) 2023-08-07 22:53:04 +00:00
fork_tests.rs Remove hidden re-exports to appease Rust 1.73 (#4495) 2023-07-12 07:06:00 +00:00
interactive_tests.rs Fix HTTP state API bug and add --epochs-per-migration (#4236) 2023-07-17 00:14:12 +00:00
main.rs Add broadcast validation routes to Beacon Node HTTP API (#4316) 2023-06-29 12:02:38 +00:00
status_tests.rs Update node health endpoint (#4310) 2023-06-30 01:13:04 +00:00
tests.rs Remove checkpoint alignment requirements and enable historic state pruning (#4610) 2023-08-21 05:02:32 +00:00