Skip to content

Commit

Permalink
fix: contract compilation, docker platform
Browse files Browse the repository at this point in the history
  • Loading branch information
MirandaWood committed Feb 3, 2022
1 parent d334bee commit ab94337
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
15 changes: 3 additions & 12 deletions contracts/verify/Verifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ contract Verifier is Ownable {

using Pairing for *;

struct Proof_GM16 {
struct Proof_G16 {
Pairing.G1Point A;
Pairing.G2Point B;
Pairing.G1Point C;
Expand Down Expand Up @@ -63,7 +63,7 @@ contract Verifier is Ownable {
}
}

function verificationCalculation(uint256[] memory _proof, uint256[] memory _inputs, uint256[] memory _vk) public returns (uint) {
function verificationCalculation(uint256[] memory _proof, uint256[] memory _publicInputs, uint256[] memory _vk) public returns (uint) {

Proof_G16 memory proof;
Pairing.G1Point memory vk_dot_inputs;
Expand Down Expand Up @@ -98,18 +98,10 @@ contract Verifier is Ownable {
vk_dot_inputs,
sm_qpih
);
}

vk_dot_inputs = Pairing.addition(vk_dot_inputs, vk.gamma_abc[0]);

/**
* e(A*G^{alpha}, B*H^{beta}) = e(G^{alpha}, H^{beta}) * e(G^{psi}, H^{gamma})
* * e(C, H)
* where psi = \sum_{i=0}^l input_i pvk.query[i]
*/
if (!Pairing.pairingProd4(vk.Galpha, vk.Hbeta, vk_dot_inputs, vk.Hgamma, proof.C, vk.H, Pairing.negate(Pairing.addition(proof.A, vk.Galpha)), Pairing.addition2(proof.B, vk.Hbeta))) {
return 1;
}


/**
* e(A*G^{alpha}, B*H^{beta}) = e(G^{alpha}, H^{beta}) * e(G^{psi}, H^{gamma})
Expand All @@ -127,6 +119,5 @@ contract Verifier is Ownable {
}
}
return 0;

}
}
2 changes: 1 addition & 1 deletion src/boilerplate/common/boilerplate-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:

zokrates:
image: ghcr.io/eyblockchain/zokrates-worker-m1
platform: linux/amd64
platform: linux/arm64/v8
volumes:
- ./circuits/:/app/circuits:delegated
- ./proving-files/:/app/output:delegated
Expand Down

0 comments on commit ab94337

Please sign in to comment.