Skip to content

Commit

Permalink
adding leaf contents check
Browse files Browse the repository at this point in the history
  • Loading branch information
anupsv committed Aug 14, 2024
1 parent 1e19130 commit 71e4491
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/osp/OneStepProverHostIo.sol
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ contract OneStepProverHostIo is IOneStepProver {
require(z < BN254.FR_MODULUS, "Z_LARGER_THAN_FIELD");
require(y < BN254.FR_MODULUS, "Y_LARGER_THAN_FIELD");

require((keccak256(kzgProof[224:288]) == bytes32(kzgProof[:32])), "KZG_PROOF_WRONG_HASH");
require((keccak256(kzgProof[224:288]) == bytes32(kzgProof[:32])) && (bytes32(kzgProof[:32]) == leafContents), "KZG_PROOF_WRONG_HASH");

// must be valid proof
require(VerifyKzgProofWithG1Equivalence(kzgCommitment, y, proofUint256, z, alphaMinusG2), "INVALID_KZG_PROOF_EIGENDA");
Expand Down

0 comments on commit 71e4491

Please sign in to comment.