lighthouse/beacon_node
Paul Hauner bd39cc8e26 Apply hotfix for inconsistent head (#1639)
## Issue Addressed

- Resolves #1616

## Proposed Changes

If we look at the function which persists fork choice and the canonical head to disk:

1db8daae0c/beacon_node/beacon_chain/src/beacon_chain.rs (L234-L280)

There is a race-condition which might cause the canonical head and fork choice values to be out-of-sync.

I believe this is the cause of #1616. I managed to recreate the issue and produce a database that was unable to sync under the `master` branch but able to sync with this branch.

These new changes solve the issue by ignoring the persisted `canonical_head_block_root` value and instead getting fork choice to generate it. This ensures that the canonical head is in-sync with fork choice.

## Additional Info

This is hotfix method that leaves some crusty code hanging around. Once this PR is merged (to satisfy the v0.2.x users) we should later update and merge #1638 so we can have a clean fix for the v0.3.x versions.
2020-09-22 02:06:10 +00:00
..
beacon_chain Apply hotfix for inconsistent head (#1639) 2020-09-22 02:06:10 +00:00
client Apply hotfix for inconsistent head (#1639) 2020-09-22 02:06:10 +00:00
eth1 Eth1 network exit on wrong network id (#1563) 2020-08-31 02:36:17 +00:00
eth2_libp2p Add trusted peers (#1640) 2020-09-22 01:12:36 +00:00
genesis Lighthouse crate v0.2.0 bump (#1450) 2020-08-06 03:43:05 +00:00
network Add trusted peers (#1640) 2020-09-22 01:12:36 +00:00
operation_pool Lighthouse crate v0.2.0 bump (#1450) 2020-08-06 03:43:05 +00:00
rest_api Remove rayon from rest_api (#1562) 2020-08-24 07:28:54 +00:00
src Add trusted peers (#1640) 2020-09-22 01:12:36 +00:00
store Update LevelDB to v0.8.6, removing patch (#1636) 2020-09-21 11:53:53 +00:00
tests Improve tokio task execution (#1181) 2020-06-04 21:48:05 +10:00
timer Lighthouse crate v0.2.0 bump (#1450) 2020-08-06 03:43:05 +00:00
websocket_server Lighthouse crate v0.2.0 bump (#1450) 2020-08-06 03:43:05 +00:00
Cargo.toml Bump version to v0.2.10 (#1630) 2020-09-18 06:41:29 +00:00