Offloading KZG Proof Computation from the beacon node (#7117)

Addresses #7108

- Add EL integration for `getPayloadV5` and `getBlobsV2`
- Offload proof computation and use proofs from EL RPC APIs
This commit is contained in:
Jimmy Chen
2025-04-08 17:37:16 +10:00
committed by GitHub
parent e924264e17
commit 759b0612b3
31 changed files with 721 additions and 476 deletions

View File

@@ -220,7 +220,7 @@ impl Kzg {
.map_err(Into::into)
}
/// Computes the cells and associated proofs for a given `blob` at index `index`.
/// Computes the cells and associated proofs for a given `blob`.
pub fn compute_cells_and_proofs(
&self,
blob: KzgBlobRef<'_>,
@@ -235,11 +235,14 @@ impl Kzg {
Ok((cells, c_kzg_proof))
}
/// Computes the cells for a given `blob`.
pub fn compute_cells(&self, blob: KzgBlobRef<'_>) -> Result<[Cell; CELLS_PER_EXT_BLOB], Error> {
self.context()
.compute_cells(blob)
.map_err(Error::PeerDASKZG)
}
/// Verifies a batch of cell-proof-commitment triplets.
///
/// Here, `coordinates` correspond to the (row, col) coordinate of the cell in the extended
/// blob "matrix". In the 1D extension, row corresponds to the blob index, and col corresponds
/// to the data column index.
pub fn verify_cell_proof_batch(
&self,
cells: &[CellRef<'_>],