Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
circuit: Add verifying key correctness checks in SP1CompressVerifier
This PR adds verifying key (VK) correctness checks in the SP1CompressVerifier::verify method. The changes ensure that: 1. All VK commitments are non-zero, preventing invalid or uninitialized VKs from being used 2. Each VK's digest matches the expected root VK digest, maintaining consistency across the verification chain These checks are crucial for maintaining the security and correctness of the recursive proof verification process. The validation happens before any proof verification begins, ensuring that we fail fast if any VK is invalid. Technical changes: - Added VK commitment non-zero checks using builder.assert_bool_felt_neq - Added VK digest verification against the root VK using StarkVerifier::compute_vk_digest - Implemented checks in a loop to validate all VKs in the batch Testing: - Existing tests should pass - Additional tests for VK validation would be beneficial (can be added if requested)
- Loading branch information