lighthouse/beacon_node/execution_layer/src
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
..
engine_api Align engine API timeouts with spec (#3470) 2022-08-17 02:36:39 +00:00
test_utils Builder profit threshold flag (#3534) 2022-09-05 04:50:49 +00:00
engine_api.rs Add metrics for EE PayloadStatus returns (#3486) 2022-08-19 04:27:23 +00:00
engines.rs Pause sync when EE is offline (#3428) 2022-08-24 23:34:56 +00:00
lib.rs Deduplicate block root computation (#3590) 2022-09-23 03:52:42 +00:00
metrics.rs Add metrics for EE PayloadStatus returns (#3486) 2022-08-19 04:27:23 +00:00
payload_cache.rs Builder Specs v0.2.0 (#3134) 2022-07-30 00:22:37 +00:00
payload_status.rs Remove INVALID_TERMINAL_BLOCK (#3385) 2022-08-10 07:52:58 +00:00