Skip to content

Commit fe72775

Browse files
authored
add comment on redundant check (#289)
1 parent 5f465b6 commit fe72775

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

eip7594/src/verifier.rs

+9-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ impl VerifierContext {
3535
pub fn new(trusted_setup: &TrustedSetup) -> VerifierContext {
3636
let verification_key = VerificationKey::from(trusted_setup);
3737

38-
let multipoint_verifier =
39-
Verifier::new(verification_key, FIELD_ELEMENTS_PER_EXT_BLOB, CELLS_PER_EXT_BLOB);
38+
let multipoint_verifier = Verifier::new(
39+
verification_key,
40+
FIELD_ELEMENTS_PER_EXT_BLOB,
41+
CELLS_PER_EXT_BLOB,
42+
);
4043

4144
VerifierContext {
4245
rs: ReedSolomon::new(
@@ -296,6 +299,10 @@ mod validation {
296299

297300
// Check that we don't have too many cells
298301
// ie more than we initially generated from the blob
302+
//
303+
// Note: Since we check that there are no duplicates and that all cell_indices
304+
// are between 0 and CELLS_PER_EXT_BLOB. This check should never fail.
305+
// It is kept here to be compliant with the specs.
299306
if cell_indices.len() > CELLS_PER_EXT_BLOB {
300307
return Err(VerifierError::TooManyCellsReceived {
301308
num_cells_received: cell_indices.len(),

0 commit comments

Comments
 (0)