lighthouse/common
Paul Hauner 48f73b21e6 Expand eth1 block cache, add more logs (#1938)
## Issue Addressed

NA

## Proposed Changes

- Caches later blocks than is required by `ETH1_FOLLOW_DISTANCE`.
- Adds logging to `warn` if the eth1 cache is insufficiently primed.
- Use `max_by_key` instead of `max_by` in `BeaconChain::Eth1Chain` since it's simpler.
- Rename `voting_period_start_timestamp` to `voting_target_timestamp` for accuracy.

## Additional Info

The reason for eating into the `ETH1_FOLLOW_DISTANCE` and caching blocks that are closer to the head is due to possibility for `SECONDS_PER_ETH1_BLOCK` to be incorrect (as is the case for the Pyrmont testnet on Goerli).

If `SECONDS_PER_ETH1_BLOCK` is too short, we'll skip back too far from the head and skip over blocks that would be valid [`is_candidate_block`](https://github.com/ethereum/eth2.0-specs/blob/v1.0.0/specs/phase0/validator.md#eth1-data) blocks. This was the case on the Pyrmont testnet and resulted in Lighthouse choosing blocks that were about 30 minutes older than is ideal.
2020-11-21 00:26:15 +00:00
..
account_utils Added fn to count unicode characters (#1903) 2020-11-16 09:30:34 +00:00
clap_utils Update to spec v1.0.0-rc.0 and BLSv4 (#1765) 2020-10-28 22:19:38 +00:00
compare_fields Check for unused deps in CI (#1262) 2020-06-14 10:59:50 +10:00
compare_fields_derive Update external deps (#1711) 2020-10-05 08:22:19 +00:00
deposit_contract Update external deps (#1711) 2020-10-05 08:22:19 +00:00
directory Update external deps (#1711) 2020-10-05 08:22:19 +00:00
eth2 Expand eth1 block cache, add more logs (#1938) 2020-11-21 00:26:15 +00:00
eth2_config Add Pyrmont testnet (#1904) 2020-11-16 05:11:35 +00:00
eth2_interop_keypairs Update external deps (#1711) 2020-10-05 08:22:19 +00:00
eth2_testnet_config Add lighthouse bootnodes (#1929) 2020-11-18 07:07:45 +00:00
eth2_wallet_manager Reject invalid utf-8 characters during encryption (#1928) 2020-11-19 00:37:43 +00:00
hashset_delay Add UPnP support for Lighthouse (#1587) 2020-10-03 10:07:47 +10:00
lighthouse_metrics Gossipsub scoring (#1668) 2020-11-12 01:48:28 +00:00
lighthouse_version Bump to v0.3.5 (#1927) 2020-11-18 00:44:28 +00:00
logging Update external deps (#1711) 2020-10-05 08:22:19 +00:00
lru_cache Keep track of failed head chains and prevent re-lookups (#1534) 2020-08-18 03:54:09 +00:00
remote_signer_consumer [Remote signer] Add signer consumer lib (#1763) 2020-11-19 04:04:52 +00:00
rest_types Add UPnP support for Lighthouse (#1587) 2020-10-03 10:07:47 +10:00
slot_clock Implement standard eth2.0 API (#1569) 2020-10-01 11:12:36 +10:00
task_executor Update to spec v1.0.0-rc.0 and BLSv4 (#1765) 2020-10-28 22:19:38 +00:00
test_random_derive Update external deps (#1711) 2020-10-05 08:22:19 +00:00
validator_dir Reject invalid utf-8 characters during encryption (#1928) 2020-11-19 00:37:43 +00:00
warp_utils Standard beacon api updates (#1831) 2020-11-09 23:13:56 +00:00
README.md Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00

eth2

Common crates containing eth2-specific logic.