mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-18 09:27:05 +00:00
reject invalid proofs when validating blobs (#5445)
Currently, passing `0xc00000...` proof seems to pass `verifyProofs`. Unsure why such a check is not necessary in spec, and also unsure whether it is correct to reject proof at infinity, or if it could occur, e.g., for a blob containing all 0 bytes. Weird overall... * proper fix
This commit is contained in:
parent
c1b43d166b
commit
1640c45a95
@ -791,7 +791,10 @@ proc validate_blobs*(expected_kzg_commitments: seq[KzgCommitment],
|
||||
if proofs.len != blobs.len:
|
||||
return err("validate_blobs: different proof and blob lengths")
|
||||
|
||||
if verifyProofs(blobs, expected_kzg_commitments, proofs).isErr():
|
||||
let res = verifyProofs(blobs, expected_kzg_commitments, proofs).valueOr:
|
||||
return err("validate_blobs: proof verification error")
|
||||
|
||||
if not res:
|
||||
return err("validate_blobs: proof verification failed")
|
||||
|
||||
ok()
|
||||
|
Loading…
x
Reference in New Issue
Block a user