lighthouse/beacon_node/beacon_chain/tests
Paul Hauner fa6ad1a11a Deduplicate block root computation (#3590)
## Issue Addressed

NA

## Proposed Changes

This PR removes duplicated block root computation.

Computing the `SignedBeaconBlock::canonical_root` has become more expensive since the merge as we need to compute the merke root of each transaction inside an `ExecutionPayload`.

Computing the root for [a mainnet block](https://beaconcha.in/slot/4704236) is taking ~10ms on my i7-8700K CPU @ 3.70GHz (no sha extensions). Given that our median seen-to-imported time for blocks is presently 300-400ms, removing a few duplicated block roots (~30ms) could represent an easy 10% improvement. When we consider that the seen-to-imported times include operations *after* the block has been placed in the early attester cache, we could expect the 30ms to be more significant WRT our seen-to-attestable times.

## Additional Info

NA
2022-09-23 03:52:42 +00:00
..
attestation_production.rs Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
attestation_verification.rs Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
block_verification.rs Deduplicate block root computation (#3590) 2022-09-23 03:52:42 +00:00
main.rs Retrospective invalidation of exec. payloads for opt. sync (#2837) 2022-02-28 22:07:48 +00:00
merge.rs Don't create a execution payload with same timestamp as terminal block (#3331) 2022-07-18 23:15:41 +00:00
op_verification.rs Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
payload_invalidation.rs Deduplicate block root computation (#3590) 2022-09-23 03:52:42 +00:00
store_tests.rs Deduplicate block root computation (#3590) 2022-09-23 03:52:42 +00:00
sync_committee_verification.rs Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
tests.rs Deduplicate block root computation (#3590) 2022-09-23 03:52:42 +00:00