Closed kevaundray closed 4 days ago
Updating c-kzg should also surface the errors in the ef-tests and on devnet. In particular, it should refuse to make proofs and unconditionally return an error.
Check here for the recover_cells_and_kzg_proofs
method in consensus-specs to corroborate that it now takes a proof parameter: https://github.com/ethereum/consensus-specs/blob/dev/specs/_features/eip7594/polynomial-commitments-sampling.md#recover_cells_and_kzg_proofs
Note: I have not updated c-kzg in this PR because there are other breaking changes that were added that we would need to modify the codebase for, which would be out of scope, this is just to align the API with the consensus-spec-tests while ensuring nothing breaks.
Closing and making the cryptography library ignore the test vectors involving proofs instead
Issue Addressed
To recover the cells and proofs, we do not need the proofs that correspond to the cells we already have. As of now the DAS branch recovers_cells_and_proofs using three methods
recover_cells
,cells_to_blob
,compute_cells_and_proofs
.The consensus-specs has introduced a new method which encapsulates all three of these methods, called
recover_cells_and_proofs
. This method takes in a proof parameter and there are additional checks that libraries that implement that function will perform. This means that theproofs
parameter cannot be missing or empty. As an example, libraries will check that the number of proofs is equal to the number of cells.We will eventually remove the proof parameter here: https://github.com/ethereum/consensus-specs/pull/3819 but until then it is needed.
Proposed Changes
In reconstruct, we also fetch the proof for the given cell.
The specs do it by forming an ExtendedMatrix, however most codebases seem to just have PartialDataColumnSideCars instead, so was not able to corroborate with the specs
Additional Info
Please provide any additional information. For example, future considerations or information useful for reviewers.