lighthouse/beacon_node
Michael Sproul 77eabc5401 Revert "Optimise HTTP validator lookups" (#3658)
## Issue Addressed

This reverts commit ca9dc8e094 (PR #3559) with some modifications.

## Proposed Changes

Unfortunately that PR introduced a performance regression in fork choice. The optimisation _intended_ to build the exit and pubkey caches on the head state _only if_ they were not already built. However, due to the head state always being cloned without these caches, we ended up building them every time the head changed, leading to a ~70ms+ penalty on mainnet.

fcfd02aeec/beacon_node/beacon_chain/src/canonical_head.rs (L633-L636)

I believe this is a severe enough regression to justify immediately releasing v3.2.1 with this change.

## Additional Info

I didn't fully revert #3559, because there were some unrelated deletions of dead code in that PR which I figured we may as well keep.

An alternative would be to clone the extra caches, but this likely still imposes some cost, so in the interest of applying a conservative fix quickly, I think reversion is the best approach. The optimisation from #3559 was not even optimising a particularly significant path, it was mostly for VCs running larger numbers of inactive keys. We can re-do it in the `tree-states` world where cache clones are cheap.
2022-10-26 06:50:04 +00:00
..
beacon_chain Revert "Optimise HTTP validator lookups" (#3658) 2022-10-26 06:50:04 +00:00
builder_client Builder Specs v0.2.0 (#3134) 2022-07-30 00:22:37 +00:00
client beacon_node: add --disable-deposit-contract-sync flag (#3597) 2022-10-19 22:55:49 +00:00
eth1 add execution-timeout-multiplier flag to optionally increase timeouts (#3631) 2022-10-18 04:02:07 +00:00
execution_layer add execution-timeout-multiplier flag to optionally increase timeouts (#3631) 2022-10-18 04:02:07 +00:00
genesis Remove fallback support from eth1 service (#3594) 2022-10-04 08:33:39 +00:00
http_api Revert "Optimise HTTP validator lookups" (#3658) 2022-10-26 06:50:04 +00:00
http_metrics Support IPv6 in BN and VC HTTP APIs (#3104) 2022-03-24 00:04:49 +00:00
lighthouse_network Ban and unban peers at the swarm level (#3653) 2022-10-24 21:39:30 +00:00
network [DEV FEATURE] Deterministic long lived subnets (#3453) 2022-10-04 10:37:48 +00:00
operation_pool Refactor op pool for speed and correctness (#3312) 2022-08-29 09:10:26 +00:00
src beacon_node: add --disable-deposit-contract-sync flag (#3597) 2022-10-19 22:55:49 +00:00
store Consensus context with proposer index caching (#3604) 2022-10-15 22:25:54 +00:00
tests Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
timer Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
Cargo.toml Release v3.2.0 (#3647) 2022-10-25 06:36:51 +00:00