lighthouse/beacon_node/beacon_chain
Michael Sproul 5cde3fc4da Reduce lock contention in backfill sync (#2716)
## Proposed Changes

Clone the proposer pubkeys during backfill signature verification to reduce the time that the pubkey cache lock is held for. Cloning such a small number of pubkeys has negligible impact on the total running time, but greatly reduces lock contention.

On a Ryzen 5950X, the setup step seems to take around 180us regardless of whether the key is cloned or not, while the verification takes 7ms. When Lighthouse is limited to 10% of one core using `sudo cpulimit --pid <pid> --limit 10` the total time jumps up to 800ms, but the setup step remains only 250us. This means that under heavy load this PR could cut the time the lock is held for from 800ms to 250us, which is a huge saving of 99.97%!
2021-10-15 03:28:03 +00:00
..
src Reduce lock contention in backfill sync (#2716) 2021-10-15 03:28:03 +00:00
tests Add BeaconChainHarness::builder (#2707) 2021-10-14 02:58:10 +00:00
Cargo.toml Add test_logger as feature to logging (#2586) 2021-10-06 00:46:07 +00:00