lighthouse/beacon_node/execution_layer/src
Jimmy Chen 64c156c0c1 Pre-generate test blobs bundle to improve test time. (#4829)
## Issue Addressed

Addresses #4778, and potentially fixes the flaky deneb builder test `builder_works_post_deneb`.

The [deneb builder test](c5c84f1213/beacon_node/http_api/tests/tests.rs (L5371)) has been quite flaky on our CI (`release-tests`) since it was introduced. I'm guessing that it might be timing out on the builder `get_header` call (1 second), and therefore the local payload is used, while the test expects builder payload to be used. 

On my machine the [`get_header` ](c5c84f1213/beacon_node/execution_layer/src/test_utils/mock_builder.rs (L367)) call takes about 550ms, which could easily go over 1s on slower environments (our windows CI runner is much slower than the ubuntu one).

I did a profile on the test and it showed that `blob_to_kzg_commiment` and `compute_kzg_proof` was taking a large chunk of time, so perhaps pre-generating the blobs could help stablise this test.

## Proposed Changes

Pre-generate blobs bundle for Mainnet and Minimal presets.

Before the change `get_header` took about **550ms**, and it's now reduced to **50-55ms** after the change. If timeout was indeed the cause of the flaky test, this fix should stablise it. This also brings the flaky `builder_works_post_deneb` test time from 50s to 10s. (8s if we only use a single blob)
2023-10-18 04:40:29 +00:00
..
engine_api Deneb pr updates 2 (#4851) 2023-10-17 09:53:46 +11:00
test_utils Pre-generate test blobs bundle to improve test time. (#4829) 2023-10-18 04:40:29 +00:00
block_hash.rs More deneb cleanup (#4640) 2023-08-20 21:17:17 -04:00
engine_api.rs fix beacon chain tests (#4645) 2023-08-21 11:42:50 -04:00
engines.rs Implement el_offline and use it in the VC (#4295) 2023-05-17 05:51:56 +00:00
keccak.rs Verify execution block hashes during finalized sync (#3794) 2023-01-09 03:11:59 +00:00
lib.rs Deneb pr updates 2 (#4851) 2023-10-17 09:53:46 +11:00
metrics.rs Reconstruct Payloads using Payload Bodies Methods (#4028) 2023-03-19 23:15:59 +00:00
payload_cache.rs Builder flow for Deneb & Blobs (#4428) 2023-08-10 09:32:49 -04:00
payload_status.rs Permit a null LVH from an INVALID response to newPayload (#4037) 2023-03-03 04:12:50 +00:00