lighthouse icon indicating copy to clipboard operation
lighthouse copied to clipboard

Optimise verification on GetBlobsV2 response

Open jimmygchen opened this issue 5 months ago • 2 comments

We've recently introduced gossip verification to getBlobsV2 response (#7493) to make sure

  1. The proofs from the EL are validated
  2. We don't re-process already imported data columns (GossipDataColumnError::PriorKnown and GossipDataColumnError::PriorKnownUnpublished)

We currently do this by performing full gossip verification here: https://github.com/jimmygchen/lighthouse/blob/e33dadbf1a520e92ddec614f3b7133fcc9e4c572/beacon_node/beacon_chain/src/fetch_blobs/mod.rs#L340-L352

The full verification includes relatively expensive checks like signature verification, which isn't necessary since the block headers are already verified and we're just cloning it over to build DataColumnSidecars. This impacts the block attestable time and import time. We could optimise this to have a verification mode that skips all validation on the SignedBeaconBlockHeader and still do the rest.

jimmygchen avatar Jun 03 '25 01:06 jimmygchen

I'd like to work on this if no one else is already on it

eserilev avatar Jun 03 '25 04:06 eserilev

Nice, thanks @eserilev

jimmygchen avatar Jun 03 '25 05:06 jimmygchen

Completed in #7582

jimmygchen avatar Jun 28 '25 12:06 jimmygchen