lighthouse-pulse/beacon_node/beacon_chain/src
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
..
attestation_verification.rs Fix mistake with attestation skip slots (#1539) 2020-08-18 06:28:26 +00:00
beacon_chain.rs Update state before producing attestation (#1596) 2020-09-08 11:25:43 +00:00
beacon_fork_choice_store.rs Apply store refactor to new fork choice 2020-06-17 15:20:44 +10:00
beacon_snapshot.rs Add no-copy block processing cache (#863) 2020-04-06 10:53:33 +10:00
block_verification.rs Fix bad assumption when checking finalized descendant (#1629) 2020-09-18 05:14:31 +00:00
builder.rs Apply hotfix for inconsistent head (#1639) 2020-09-22 02:06:10 +00:00
chain_config.rs Set default max skips to 700 (#1542) 2020-08-18 09:27:04 +00:00
errors.rs Fix bug in database pruning (#1564) 2020-08-26 00:01:06 +00:00
eth1_chain.rs Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
events.rs Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
head_tracker.rs Race condition fix + Reliability improvements around forks pruning (#1132) 2020-05-16 13:23:32 +10:00
lib.rs Alternative (to BeaconChainHarness) BeaconChain testing API (#1380) 2020-08-26 09:24:55 +00:00
metrics.rs v0.12 fork choice update (#1229) 2020-06-17 11:10:22 +10:00
migrate.rs Alternative (to BeaconChainHarness) BeaconChain testing API (#1380) 2020-08-26 09:24:55 +00:00
naive_aggregation_pool.rs Push naive attestations into op pool (#1466) 2020-08-06 07:26:46 +00:00
observed_attestations.rs Move long-running tests to dbg (#1137) 2020-05-13 10:55:02 +10:00
observed_attesters.rs Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
observed_block_producers.rs Add attestation gossip pre-verification (#983) 2020-05-06 21:42:56 +10:00
observed_operations.rs Process exits and slashings off the network (#1253) 2020-06-18 21:06:34 +10:00
persisted_beacon_chain.rs Apply hotfix for inconsistent head (#1639) 2020-09-22 02:06:10 +00:00
persisted_fork_choice.rs v0.12 fork choice update (#1229) 2020-06-17 11:10:22 +10:00
shuffling_cache.rs Optimize attestation processing (#841) 2020-03-05 17:19:35 +11:00
snapshot_cache.rs Support multiple BLS implementations (#1335) 2020-07-25 02:03:18 +00:00
test_utils.rs Alternative (to BeaconChainHarness) BeaconChain testing API (#1380) 2020-08-26 09:24:55 +00:00
timeout_rw_lock.rs Add timeouts to canonical head rwlock (#759) 2020-01-06 17:30:37 +11:00
validator_pubkey_cache.rs Support multiple BLS implementations (#1335) 2020-07-25 02:03:18 +00:00