Skip to content

Commit

Permalink
chore(protocol): improve ZKP verification handling (#13071)
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik committed Jan 29, 2023
1 parent 4144f4b commit beb0c33
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/protocol/contracts/L1/libs/LibProving.sol
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,10 @@ library LibProving {
// but a special prover can skip ZKP verification if the ZKP is empty.

// TODO(daniel): remove this special address.
address specialProver = resolver.resolve("special_prover", true);

for (uint256 i = 0; i < config.zkProofsPerBlock; ++i) {
if (msg.sender == specialProver && evidence.proofs[i].length == 0) {
// Skip ZKP verification
} else {
if (msg.sender == resolver.resolve("special_prover", true)) {
// Skip ZKP verification
} else {
for (uint256 i = 0; i < config.zkProofsPerBlock; ++i) {
require(
proofVerifier.verifyZKP({
verifierId: string(
Expand Down

0 comments on commit beb0c33

Please sign in to comment.