lighthouse-pulse/consensus/proto_array/src
Paul Hauner 619ad106cf Restrict fork choice getters to finalized blocks (#1475)
## Issue Addressed

- Resolves #1451

## Proposed Changes

- Restricts the `contains_block` and `contains_block` so they only indicate a block is present if it descends from the finalized root. This helps to ensure that fork choice never points to a block that has been pruned from the database.
- Resolves #1451
- Before importing a block, double-check that its parent is known and a descendant of the finalized root.
- Split a big, monolithic block verification test into smaller tests. 

## Additional Notes

I suspect there would be a craftier way to do the `is_descendant_of_finalized` check, but we're a bit tight on time now and we can optimize later if it starts showing in benches.

## TODO

- [x] Tests
2020-08-14 06:36:38 +00:00
..
fork_choice_test_definition Merge remote-tracking branch 'origin/master' into spec-v0.12 2020-06-26 12:57:56 +10:00
bin.rs Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
error.rs v0.12 fork choice update (#1229) 2020-06-17 11:10:22 +10:00
fork_choice_test_definition.rs Merge remote-tracking branch 'origin/master' into spec-v0.12 2020-06-26 12:57:56 +10:00
lib.rs v0.12 fork choice update (#1229) 2020-06-17 11:10:22 +10:00
proto_array_fork_choice.rs Restrict fork choice getters to finalized blocks (#1475) 2020-08-14 06:36:38 +00:00
proto_array.rs Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
ssz_container.rs Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00