sigp / lighthouse

Ethereum consensus client in Rust
https://lighthouse.sigmaprime.io/
Apache License 2.0
2.92k stars 741 forks source link

Pre-generate test blobs to speed up Deneb tests #4778

Closed jimmygchen closed 1 year ago

jimmygchen commented 1 year ago

Description

Our tests on the Deneb branch are noticeably slower, and it appears that this is caused by the blob commitment/proof generation in tests that uses the block generator to generate random blobs.

Below is a flamegraph capture by @michaelsproul on one of the slow tests, which shows that a significant amount of time is spent on computing kzg commitments / proofs: flamegraph

We could potentially speed up these tests by pre-generating a bunch of (blobs,commitment,proof) tuples to usein the beacon chain tests (idea suggested by @pawanjay176).

jimmygchen commented 1 year ago

Completed in #4829