Skip to content

Commit

Permalink
cleanup and update Prover.toml for double_verify_honk
Browse files Browse the repository at this point in the history
  • Loading branch information
maramihali committed Dec 17, 2024
1 parent dd90ebf commit e96748e
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 98 deletions.
2 changes: 0 additions & 2 deletions barretenberg/acir_tests/sol-test/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ const readPublicInputs = (proofAsFields) => {
const publicInputs = [];
// Compute the number of public inputs, not accounted for in the constant NUMBER_OF_FIELDS_IN_PROOF
const numPublicInputs = proofAsFields.length - NUMBER_OF_FIELDS_IN_PROOF;
console.log("number of public inputs");
console.log(numPublicInputs);
let publicInputsOffset = 0;

// Honk proofs contain 3 pieces of metadata before the public inputs, while plonk does not
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,10 @@ class MegaFlavor {
this->return_data_inverses,
};
}
auto get_to_be_shifted() { return DerivedEntities<DataType>::get_to_be_shifted(); }
auto get_to_be_shifted()
{
return concatenate(WireEntities<DataType>::get_all(), DerivedEntities<DataType>::get_to_be_shifted());
}

MSGPACK_FIELDS(this->w_l,
this->w_r,
Expand Down Expand Up @@ -262,7 +265,7 @@ class MegaFlavor {
};

/**
* @brief Class for ShiftedEntities, containing only shifted witness polynomials.
* @brief Class for ShiftedEntities, containing the shifted witness polynomials.
*/
template <typename DataType> class ShiftedEntities {
public:
Expand Down Expand Up @@ -306,10 +309,7 @@ class MegaFlavor {
};
auto get_precomputed() { return PrecomputedEntities<DataType>::get_all(); }
auto get_witness() { return WitnessEntities<DataType>::get_all(); };
auto get_to_be_shifted()
{
return concatenate(WitnessEntities<DataType>::get_wires(), WitnessEntities<DataType>::get_to_be_shifted());
};
auto get_to_be_shifted() { return WitnessEntities<DataType>::get_to_be_shifted(); };
auto get_shifted() { return ShiftedEntities<DataType>::get_all(); };
// this getter is used in ZK Sumcheck, where all witness evaluations (including shifts) have to be masked
auto get_all_witnesses()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class UltraFlavor {
lookup_read_tags) // column 7

auto get_wires() { return RefArray{ w_l, w_r, w_o, w_4 }; };
auto get_to_be_shifted() { return RefArray{ z_perm }; };
auto get_to_be_shifted() { return RefArray{ w_l, w_r, w_o, w_4, z_perm }; };

MSGPACK_FIELDS(w_l, w_r, w_o, w_4, z_perm, lookup_inverses, lookup_read_counts, lookup_read_tags);
};
Expand Down Expand Up @@ -228,10 +228,7 @@ class UltraFlavor {
};
auto get_precomputed() { return PrecomputedEntities<DataType>::get_all(); }
auto get_witness() { return WitnessEntities<DataType>::get_all(); };
auto get_to_be_shifted()
{
return concatenate(WitnessEntities<DataType>::get_wires(), WitnessEntities<DataType>::get_to_be_shifted());
};
auto get_to_be_shifted() { return WitnessEntities<DataType>::get_to_be_shifted(); };

// getter for all witnesses including shifted ones
auto get_all_witnesses()
Expand Down
4 changes: 2 additions & 2 deletions barretenberg/sol/src/ultra/keys/Add2UltraVerificationKey.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Verification Key Hash: 27a934baf08e602134d51ca865c6a8b72203cfcfe220ff702b2ef8a99ac9245f
// Verification Key Hash: 40bb22daf923fbfe17fb0be06e0fa50474e40302c1af031f1aaf5f521998ad3a
// SPDX-License-Identifier: Apache-2.0
// Copyright 2022 Aztec
pragma solidity >=0.8.4;

library Add2UltraVerificationKey {
function verificationKeyHash() internal pure returns (bytes32) {
return 0x27a934baf08e602134d51ca865c6a8b72203cfcfe220ff702b2ef8a99ac9245f;
return 0x40bb22daf923fbfe17fb0be06e0fa50474e40302c1af031f1aaf5f521998ad3a;
}

function loadVerificationKey(uint256 _vk, uint256 _omegaInverseLoc) internal pure {
Expand Down
4 changes: 2 additions & 2 deletions barretenberg/sol/src/ultra/keys/BlakeUltraVerificationKey.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Verification Key Hash: df27d02deee52548f856b395dd18c2d0dbbc96b457b78f520b4fa52cb26871a5
// Verification Key Hash: 3963021515adf584e49a665edcbb8f92b252b66554a7a9f6b880ae6d76c013c3
// SPDX-License-Identifier: Apache-2.0
// Copyright 2022 Aztec
pragma solidity >=0.8.4;

library BlakeUltraVerificationKey {
function verificationKeyHash() internal pure returns (bytes32) {
return 0xdf27d02deee52548f856b395dd18c2d0dbbc96b457b78f520b4fa52cb26871a5;
return 0x3963021515adf584e49a665edcbb8f92b252b66554a7a9f6b880ae6d76c013c3;
}

function loadVerificationKey(uint256 _vk, uint256 _omegaInverseLoc) internal pure {
Expand Down
76 changes: 38 additions & 38 deletions barretenberg/sol/src/ultra/keys/EcdsaUltraVerificationKey.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Verification Key Hash: 759b981a450fcab830fc1dd89825d4914fd6062a100e68774f091d1b8b1f5a03
// Verification Key Hash: 2f843a63de8da557c6caf7abb57a3110d0c057892dd42037b7ed109d1a7b6105
// SPDX-License-Identifier: Apache-2.0
// Copyright 2022 Aztec
pragma solidity >=0.8.4;

library EcdsaUltraVerificationKey {
function verificationKeyHash() internal pure returns (bytes32) {
return 0x759b981a450fcab830fc1dd89825d4914fd6062a100e68774f091d1b8b1f5a03;
return 0x2f843a63de8da557c6caf7abb57a3110d0c057892dd42037b7ed109d1a7b6105;
}

function loadVerificationKey(uint256 _vk, uint256 _omegaInverseLoc) internal pure {
Expand All @@ -14,34 +14,34 @@ library EcdsaUltraVerificationKey {
mstore(add(_vk, 0x20), 0x0000000000000000000000000000000000000000000000000000000000000006) // vk.num_inputs
mstore(add(_vk, 0x40), 0x00eeb2cb5981ed45649abebde081dcff16c8601de4347e7dd1628ba2daac43b7) // vk.work_root
mstore(add(_vk, 0x60), 0x30641e0e92bebef818268d663bcad6dbcfd6c0149170f6d7d350b1b1fa6c1001) // vk.domain_inverse
mstore(add(_vk, 0x80), 0x177d2fc406491de711b4d134f628b88794a5ddcf7f35cdaa3d40880cd70f9cb1) // vk.Q1.x
mstore(add(_vk, 0xa0), 0x286f7ee67558c8ce754860495860b6d7f1bdb55baed6336bfdcc74dc241472ea) // vk.Q1.y
mstore(add(_vk, 0xc0), 0x10e238745741c57f4360a9a9789e16b487a41dd7320cb32cb02d9b200a1e447a) // vk.Q2.x
mstore(add(_vk, 0xe0), 0x172c5e285a66b6b5d1f071e40a5d17ec2936e0a217a6ac2998481bdb0ecc1e90) // vk.Q2.y
mstore(add(_vk, 0x100), 0x05d431b0ae6ad5bfb119a92bc3568df0fb32d1203110077914641e519d14099d) // vk.Q3.x
mstore(add(_vk, 0x120), 0x1d21c8e1240c6f5e02c749cf1265d1472f35162f71bc0231bf460bcfbe0259b1) // vk.Q3.y
mstore(add(_vk, 0x140), 0x19fe9373be05a55cfdcf6a651d61fe4cc4868b9c3d9a2ccc625662026ad82057) // vk.Q4.x
mstore(add(_vk, 0x160), 0x2c704dcb77b5a086a363a58def3eb5d3d8bb17c42f6242121e841add44e718e1) // vk.Q4.y
mstore(add(_vk, 0x180), 0x21dbb91e680abf1735bb699b976b6386656d061d710b868d76328fec89d0a59d) // vk.Q_M.x
mstore(add(_vk, 0x1a0), 0x0975b5b41ee566ef2cfcfce64666da4481ddacff0d3538b762d06fbf769ed3c9) // vk.Q_M.y
mstore(add(_vk, 0x1c0), 0x014b922dd112f0fb1721f4e8763feb5bb1e1e2173f1540f029b1b9256dd8219f) // vk.Q_C.x
mstore(add(_vk, 0x1e0), 0x005b05dbe091b3f8b318df5810965e8613a5ce84a23baf99cfcfb760b73dfdab) // vk.Q_C.y
mstore(add(_vk, 0x200), 0x008073ec28cb32d392e4cf5ca5c8882d0a172c5f727b2b967327bc737229210f) // vk.Q_ARITHMETIC.x
mstore(add(_vk, 0x220), 0x10b5841ce6323158a6491e29ac2afe2b20b4b3ed1dd46e3fb7ad7b7a285c3cf0) // vk.Q_ARITHMETIC.y
mstore(add(_vk, 0x240), 0x0069c485cdd6538403b7f723e554d2d615321994f5f7f82a3d9c79e368735891) // vk.QSORT.x
mstore(add(_vk, 0x260), 0x113726a166d7cd61f29fda4025cb822b25fcb2d26517d96d69dda23ef9081145) // vk.QSORT.y
mstore(add(_vk, 0x80), 0x1cc85a07fb1009e23540957b29121dc57aaae5b1e89a22a932a1bdf7ccac1af2) // vk.Q1.x
mstore(add(_vk, 0xa0), 0x19a1a4fa6d8781abbcb696097c1817f54da296348a292954e2aa9856f2fa3b6a) // vk.Q1.y
mstore(add(_vk, 0xc0), 0x0409f05fe2901e7e339b3aaf0d7af7b5d4023e416da923321b15aae633b18fee) // vk.Q2.x
mstore(add(_vk, 0xe0), 0x0ae6cc44e9024c190ab310d7ad110226c5c76f15d158b60fc9acd98f2e1f1aa3) // vk.Q2.y
mstore(add(_vk, 0x100), 0x20e3b4e35df25ba02ac2a9be26bc6fe74640355e57455598e69922b8d3fd0939) // vk.Q3.x
mstore(add(_vk, 0x120), 0x1f49d18bdb86a449e676558c6d6349f123372641187e33e12128ee7468431942) // vk.Q3.y
mstore(add(_vk, 0x140), 0x00e95627d4db555ccf3b1ee6def34fab1a815f0482cb6a745a363940d3163831) // vk.Q4.x
mstore(add(_vk, 0x160), 0x19fe011a8a139da323b5ce5abebe54bf4c105acd6045d7b2b5df40a34411f44b) // vk.Q4.y
mstore(add(_vk, 0x180), 0x04b41648960da31317eff66b5ca9be0a6c81ebeead27e70b3c5b28d4aba11081) // vk.Q_M.x
mstore(add(_vk, 0x1a0), 0x1bff2df21a3fd9c49c29b7f7c153dd0bc331d75afc6a35fb7155c17bb0f67a63) // vk.Q_M.y
mstore(add(_vk, 0x1c0), 0x15faa2ea86a6a66cd9b969d6305f863595a73b9215c1ae442969f4993a8e5230) // vk.Q_C.x
mstore(add(_vk, 0x1e0), 0x26391cc92544b485d90313d3396b53d9207db8f84ead11bcf45467fa7eb38b94) // vk.Q_C.y
mstore(add(_vk, 0x200), 0x01a0d650b65d29965e4ae2a8cfb69470d7560f0826268da59c6e72e684a06c9b) // vk.Q_ARITHMETIC.x
mstore(add(_vk, 0x220), 0x2248d4a02e68036c8d0a4a6725ba0e5e8e95950a5285a3a7daa1a1726cc8ec6b) // vk.Q_ARITHMETIC.y
mstore(add(_vk, 0x240), 0x01afcbad715a0c382971311ad6fe4ff8b6e99200162aeb6245b585c99c8748a9) // vk.QSORT.x
mstore(add(_vk, 0x260), 0x18bf352081d1ba2ffe8088d34ce6471e4cf6d2ee63f006ea9a5e31cc41b6587c) // vk.QSORT.y
mstore(add(_vk, 0x280), 0x21245d6c0a4d2ff12b21a825f39f30e8f8cf9b259448d111183e975828539576) // vk.Q_ELLIPTIC.x
mstore(add(_vk, 0x2a0), 0x16a409532c8a1693536e93b6ce9920bfc2e6796e8dfe404675a0cdf6ee77ee7a) // vk.Q_ELLIPTIC.y
mstore(add(_vk, 0x2c0), 0x0bf328435a5f6d1c74ee907358968420b293076d86317517871294f3d4182b2b) // vk.Q_AUX.x
mstore(add(_vk, 0x2e0), 0x02fb32c5c5c1801f4a41540e9c40f82c0e520658713e22c0f8098a903a8ebb13) // vk.Q_AUX.y
mstore(add(_vk, 0x300), 0x0b23bda3b72297f230273f478e411f40332db18c37a1b3961a4dda35404a9976) // vk.SIGMA1.x
mstore(add(_vk, 0x320), 0x2843e3fa6175d14ebf09cc6de5775bf27eed32a40e985469e9ae5fe92fd3b714) // vk.SIGMA1.y
mstore(add(_vk, 0x340), 0x2c1ef692ccb668a451ad0a3b2bcf58a053e830df8f718d5baaea944abd03bb40) // vk.SIGMA2.x
mstore(add(_vk, 0x360), 0x10f9e6850de170838e27cf3eb288c01f15293386bde26c2bdcce63a68d2f161d) // vk.SIGMA2.y
mstore(add(_vk, 0x380), 0x14a3df5a4348da1b3b145d1b90540ac94cf164d5c03c031cbc07b84b0e7f7b97) // vk.SIGMA3.x
mstore(add(_vk, 0x3a0), 0x1e3248f0598fc16de1cedf4a96459a6bfbe4d829a7c05b1ba87eedbe2878044d) // vk.SIGMA3.y
mstore(add(_vk, 0x3c0), 0x12573d129c38e8b50998b538ae277a865789512c6fb8d8a1a0697e1997532382) // vk.SIGMA4.x
mstore(add(_vk, 0x3e0), 0x12db2a48d0ea21c0368a46f96dcda55dbc88cc378cb71634990b3e2b0e65e5ea) // vk.SIGMA4.y
mstore(add(_vk, 0x2c0), 0x2d455f287e41544fd3744bab412640fd6916b01aa2163c84071eb47f0306a473) // vk.Q_AUX.x
mstore(add(_vk, 0x2e0), 0x09dea8e2b5e382a1c4a37bc4e60f5e8380688310b855c249d64153478d25e223) // vk.Q_AUX.y
mstore(add(_vk, 0x300), 0x09671927e293b22a3fb9fa8ea1680fcc4570bb2f312cb88004ff7fd4474e2109) // vk.SIGMA1.x
mstore(add(_vk, 0x320), 0x1c6442d9a49b3b93a928ef6ba2f348bc4c8cb778a59345faf7d173129f22b5a3) // vk.SIGMA1.y
mstore(add(_vk, 0x340), 0x0337d84b45a5abc701edbdc1a1d878178c23496b39ccddcc3f0f6199e3f97df6) // vk.SIGMA2.x
mstore(add(_vk, 0x360), 0x1c744f7be93d40c96d15fdf9d81c9502b7018573ad23e51dea7b065fdeb6f13a) // vk.SIGMA2.y
mstore(add(_vk, 0x380), 0x23a975cfb71f0c0d46ef9c0b01e6482e780b5e3af1a63547f7d01c46c1911699) // vk.SIGMA3.x
mstore(add(_vk, 0x3a0), 0x0d5a0be212cb2c7d3bba8c2406a9d2c4b04d4e64b0acef2681eb7c6aa490a7cb) // vk.SIGMA3.y
mstore(add(_vk, 0x3c0), 0x1ca2d0cca80bb16eab28d06c5c175e862a8ef14bceb6da79e65236a8a6a36838) // vk.SIGMA4.x
mstore(add(_vk, 0x3e0), 0x0555fe3dbd2ba2d7db2b5f740bf32fb57f4c5ac9d9f2e59e9a5a2cc2d84dae05) // vk.SIGMA4.y
mstore(add(_vk, 0x400), 0x18f7cf965339d9c9d190296fa92f915767b0a8da455975f3e03fa98439fd7110) // vk.TABLE1.x
mstore(add(_vk, 0x420), 0x0eecc02f9d44125407adbf00d56b086afd1adc5de536450afe05de382761b32f) // vk.TABLE1.y
mstore(add(_vk, 0x440), 0x0bdfe662ea9f40f125ca5f7e99a8c6ba09b87ba8313864316745df862946c5c4) // vk.TABLE2.x
Expand All @@ -50,16 +50,16 @@ library EcdsaUltraVerificationKey {
mstore(add(_vk, 0x4a0), 0x1fda66dfb58273345f2471dff55c51b6856241460272e64b4cc67cde65231e89) // vk.TABLE3.y
mstore(add(_vk, 0x4c0), 0x024ccc0fcff3b515cdc97dde2fae5c516bf3c97207891801707142af02538a83) // vk.TABLE4.x
mstore(add(_vk, 0x4e0), 0x27827250d02b7b67d084bfc52b26c722f33f75ae5098c109573bfe92b782e559) // vk.TABLE4.y
mstore(add(_vk, 0x500), 0x1c45b884f74b3d6adceb82af8149dcf5ac847fcaa3256142ba1222bb276a6488) // vk.TABLE_TYPE.x
mstore(add(_vk, 0x520), 0x3030d7782dd8035df1cdd1695ab4f24bc640c6876f2a897b7ce1d38b87f915e4) // vk.TABLE_TYPE.y
mstore(add(_vk, 0x540), 0x1294d1c8fbad4145efa8fe3f89fd24e3ec7dd804c43e7f9d7286fcce1cf7548b) // vk.ID1.x
mstore(add(_vk, 0x560), 0x21a7df2d89d67c518baf85172b66262c08ecbedffcb25068eddb008d0cd98ef5) // vk.ID1.y
mstore(add(_vk, 0x580), 0x23135e9861098e8461a5f7806010b3be05a036170c46263523662aa63627a29b) // vk.ID2.x
mstore(add(_vk, 0x5a0), 0x07c89554a38afdcb1cce29fae89196f4477e042391dc041d8ef8e5c697d168a8) // vk.ID2.y
mstore(add(_vk, 0x5c0), 0x2d560c5d2e6c81d3d4d3ebde80199ef18a77109b8a391a304e2dbb93be6cc23a) // vk.ID3.x
mstore(add(_vk, 0x5e0), 0x12543ff3bb258e27218c4db97783388213fbbe3f8dbcb29fcfa8b1900db5a105) // vk.ID3.y
mstore(add(_vk, 0x600), 0x071d9ed32b14145972cf27179c6c99f48378977d0b458f6cab549555b9d7c6c9) // vk.ID4.x
mstore(add(_vk, 0x620), 0x1951794e5e38ff2a0f7269aee43199562d64177588177fbac541e195b1cecd83) // vk.ID4.y
mstore(add(_vk, 0x500), 0x22b1d6b9827d6d03049f76dc9dc219ae6de93abe52d4d7de8677d961d3408c77) // vk.TABLE_TYPE.x
mstore(add(_vk, 0x520), 0x10ebc6be9f74e0367276028c613ab3efe0f2ed546c05339b36d5165d009c833a) // vk.TABLE_TYPE.y
mstore(add(_vk, 0x540), 0x2aa2e5247ce6524fecba0a2de9f383353096665f3ae8082fe7017fbf6d6572d8) // vk.ID1.x
mstore(add(_vk, 0x560), 0x1db802f61a6194bea68f7d5ec697facf26f1c1336b09e382801e8b773f0e116f) // vk.ID1.y
mstore(add(_vk, 0x580), 0x1aa955e508f3c2fbf55a36719eb666a45239935c4af10b8a1f4580d5cd614236) // vk.ID2.x
mstore(add(_vk, 0x5a0), 0x2bc21aa51420951a10a39d5c5242101d2207c47a0077852acb7d3fd6a16e1c58) // vk.ID2.y
mstore(add(_vk, 0x5c0), 0x245c89c4cf7c7e297b4db8e2625f5abd56398c351256a39aece0a36a940aaf62) // vk.ID3.x
mstore(add(_vk, 0x5e0), 0x01bd6e61d801d895c7edfee071518761f3c8c0e10bec5f0fb0b25ae430a2c91e) // vk.ID3.y
mstore(add(_vk, 0x600), 0x30223d4653291c03019e96bd716769c7c6d6520fddf2e633a75f94b08bee86dd) // vk.ID4.x
mstore(add(_vk, 0x620), 0x2e389428afa291855039f1b4af22e70d469f4e20116b85889737d624a2d27fef) // vk.ID4.y
mstore(add(_vk, 0x640), 0x00) // vk.contains_pairing_point_accumulator
mstore(add(_vk, 0x660), 0) // vk.pairing_point_accumulator_public_input_indices
mstore(add(_vk, 0x680), 0x260e01b251f6f1c7e7ff4e580791dee8ea51d87a358e038b4efe30fac09383c1) // vk.g2_x.X.c1
Expand Down
Loading

0 comments on commit e96748e

Please sign in to comment.