Skip to content

Commit

Permalink
fix: recovery is done with respects to the cells not the blob
Browse files Browse the repository at this point in the history
  • Loading branch information
kevaundray committed Jul 7, 2024
1 parent 8e84f95 commit 0594fee
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions eip7594/src/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,17 @@ impl ProverContext {
cells: Vec<CellRef>,
) -> Result<([Cell; CELLS_PER_EXT_BLOB], [KZGProof; CELLS_PER_EXT_BLOB]), ProverError> {
self.thread_pool.install(|| {
// Use erasure decoding to recover the polynomial corresponding to the bit-reversed blob in monomial form
// Use erasure decoding to recover the polynomial corresponding to the cells
// that were generated from fk20.
//
// Note: The fact that this is the polynomial for the bit-reversed version of the blob
// is irrelevant.
let poly_coeff = self
.verifier_context
.recover_polynomial_coeff(cell_ids, cells)
.map_err(ProverError::RecoveryFailure)?;

// Check the degree of the polynomial.
// All polynomials in monomial form at this level of the API, have the same degree.
assert_eq!(FIELD_ELEMENTS_PER_BLOB, poly_coeff.len());

// Compute the proofs and the evaluation sets for the polynomial.
Expand Down

0 comments on commit 0594fee

Please sign in to comment.