lighthouse/beacon_node/beacon_chain/src
Paul Hauner 103103e72e Address queue congestion in migrator (#1923)
## Issue Addressed

*Should* address #1917

## Proposed Changes

Stops the `BackgroupMigrator` rx channel from backing up with big `BeaconState` messages.

Looking at some logs from my Medalla node, we can see a discrepancy between the head finalized epoch and the migrator finalized epoch:

```
Nov 17 16:50:21.606 DEBG Head beacon block                       slot: 129214, root: 0xbc7a…0b99, finalized_epoch: 4033, finalized_root: 0xf930…6562, justified_epoch: 4035, justified_root: 0x206b…9321, service: beacon
Nov 17 16:50:21.626 DEBG Batch processed                         service: sync, processed_blocks: 43, last_block_slot: 129214, chain: 8274002112260436595, first_block_slot: 129153, batch_epoch: 4036
Nov 17 16:50:21.626 DEBG Chain advanced                          processing_target: 4036, new_start: 4036, previous_start: 4034, chain: 8274002112260436595, service: sync
Nov 17 16:50:22.162 DEBG Completed batch received                awaiting_batches: 5, blocks: 47, epoch: 4048, chain: 8274002112260436595, service: sync
Nov 17 16:50:22.162 DEBG Requesting batch                        start_slot: 129601, end_slot: 129664, downloaded: 0, processed: 0, state: Downloading(16Uiu2HAmG3C3t1McaseReECjAF694tjVVjkDoneZEbxNhWm1nZaT, 0 blocks, 1273), epoch: 4050, chain: 8274002112260436595, service: sync
Nov 17 16:50:22.654 DEBG Database compaction complete            service: beacon
Nov 17 16:50:22.655 INFO Starting database pruning               new_finalized_epoch: 2193, old_finalized_epoch: 2192, service: beacon
```

I believe this indicates that the migrator rx has a backed-up queue of `MigrationNotification` items which each contain a `BeaconState`.

## TODO

- [x] Remove finalized state requirement for op-pool
2020-11-17 23:11:26 +00:00
..
attestation_verification.rs Add check for head/target consistency (#1702) 2020-10-03 10:08:06 +10:00
beacon_chain.rs Address queue congestion in migrator (#1923) 2020-11-17 23:11:26 +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 Implement database temp states to reduce memory usage (#1798) 2020-10-23 01:27:51 +00:00
builder.rs fix genesis state root provided to HTTP server (#1783) 2020-10-21 23:15:30 +00:00
chain_config.rs Implement database temp states to reduce memory usage (#1798) 2020-10-23 01:27:51 +00:00
errors.rs Weak subjectivity start from genesis (#1675) 2020-10-03 10:00:28 +10:00
eth1_chain.rs Return eth1-related data via the API (#1797) 2020-11-02 00:37:30 +00:00
events.rs Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
head_tracker.rs Fix head tracker concurrency bugs (#1771) 2020-10-19 05:58:39 +00:00
lib.rs Fix head tracker concurrency bugs (#1771) 2020-10-19 05:58:39 +00:00
metrics.rs Fix head tracker concurrency bugs (#1771) 2020-10-19 05:58:39 +00:00
migrate.rs Address queue congestion in migrator (#1923) 2020-11-17 23:11:26 +00:00
naive_aggregation_pool.rs Implement standard eth2.0 API (#1569) 2020-10-01 11:12:36 +10: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 Fix head tracker concurrency bugs (#1771) 2020-10-19 05:58:39 +00:00
persisted_fork_choice.rs v0.12 fork choice update (#1229) 2020-06-17 11:10:22 +10:00
shuffling_cache.rs Implement standard eth2.0 API (#1569) 2020-10-01 11:12:36 +10:00
snapshot_cache.rs Support multiple BLS implementations (#1335) 2020-07-25 02:03:18 +00:00
test_utils.rs Implement database temp states to reduce memory usage (#1798) 2020-10-23 01:27:51 +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 Allow truncation of pubkey cache on creation (#1686) 2020-09-30 04:42:52 +00:00