Skip to content

Commit

Permalink
feat(protocol): update PlonkVerifier (#13805)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed May 24, 2023
1 parent e55e39a commit 6f9f022
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions packages/protocol/contracts/libs/yul/PlonkVerifier.yulp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ object "plonk_verifier" {
}
mstore(0x20, mod(calldataload(0x0), f_q))
mstore(0x40, mod(calldataload(0x20), f_q))
mstore(0x0, 2650073228546597285498128370665412117817632668990668978721563035398204088421)
mstore(0x0, 18195451809593975346080671558496097816127859411031546312484073833072873064160)

{
let x := calldataload(0x40)
Expand Down Expand Up @@ -595,7 +595,7 @@ mstore(0x23e0, mulmod(mload(0x3c0), mload(0x23c0), f_q))
mstore(0x2400, mulmod(mload(0x920), mload(0xb20), f_q))
mstore(0x2420, addmod(mload(0x23e0), mload(0x2400), f_q))
mstore(0x2440, mulmod(mload(0x3c0), mload(0x2420), f_q))
mstore(0x2460, mulmod(288, mload(0xb20), f_q))
mstore(0x2460, mulmod(320, mload(0xb20), f_q))
mstore(0x2480, addmod(mload(0x2440), mload(0x2460), f_q))
mstore(0x24a0, mulmod(mload(0x3c0), mload(0x2480), f_q))
mstore(0x24c0, mulmod(mload(0x940), mload(0xb20), f_q))
Expand Down Expand Up @@ -1032,26 +1032,26 @@ mstore(0x5620, mload(0x5540))
mstore(0x5660, mload(0x55c0))
mstore(0x5680, mload(0x55e0))
success := and(eq(staticcall(gas(), 0x6, 0x5620, 0x80, 0x5620, 0x40), 1), success)
mstore(0x56a0, 0x2ed5c16dba7083fcd7341e6c1d1eb437c6c24aa271c8fec0cb9687f4e85c78d3)
mstore(0x56c0, 0x2df6d71518da47df8401284309a6a39729ac2a4548e7a9b4ee5613665821ac92)
mstore(0x56a0, 0x040e7fade2c74938e81fc41d57ec74d4c69aab70bcf534fbe293068c9a1088c4)
mstore(0x56c0, 0x1fbbbddc552b9965f655834f34ecc67375118985a1db09eb95d8d97a4caea007)
mstore(0x56e0, mload(0x3f20))
success := and(eq(staticcall(gas(), 0x7, 0x56a0, 0x60, 0x56a0, 0x40), 1), success)
mstore(0x5700, mload(0x5620))
mstore(0x5720, mload(0x5640))
mstore(0x5740, mload(0x56a0))
mstore(0x5760, mload(0x56c0))
success := and(eq(staticcall(gas(), 0x6, 0x5700, 0x80, 0x5700, 0x40), 1), success)
mstore(0x5780, 0x281cb52cdf2267dd03ad7ecaa4819d5dba7f829b51ff35f0c44ba1bda3be32a8)
mstore(0x57a0, 0x2c8d8895ebd5e1a46d3907ef26920e5cc0ae32227b48c2c0ab0f75defbf423b9)
mstore(0x5780, 0x0f24d1f95ec8f320d5aa85582e5b03c11f1d74f49d9995c58ea25752b4643581)
mstore(0x57a0, 0x1eff525bddf71f3c5131f97a6ab66b29c1c094ef2ed7ec26efba1e9cde72c306)
mstore(0x57c0, mload(0x3f40))
success := and(eq(staticcall(gas(), 0x7, 0x5780, 0x60, 0x5780, 0x40), 1), success)
mstore(0x57e0, mload(0x5700))
mstore(0x5800, mload(0x5720))
mstore(0x5820, mload(0x5780))
mstore(0x5840, mload(0x57a0))
success := and(eq(staticcall(gas(), 0x6, 0x57e0, 0x80, 0x57e0, 0x40), 1), success)
mstore(0x5860, 0x229e3a8fb15a80cd79c44393f6ea5556e3ad668adf534b892b0af5be634c9fb8)
mstore(0x5880, 0x25fca1a25339c7186bd51110235fd26539b8c09cbef8e2ed27c86ec992468257)
mstore(0x5860, 0x295a04ef97b33d153294b19ff7db2dbc2c1783542d8163ecacc7ab2e74ea8d35)
mstore(0x5880, 0x0fc1fc7d1c3adc234fe11bfab267359e3c70e72cf182006ac301130cf16e45a9)
mstore(0x58a0, mload(0x3f60))
success := and(eq(staticcall(gas(), 0x7, 0x5860, 0x60, 0x5860, 0x40), 1), success)
mstore(0x58c0, mload(0x57e0))
Expand All @@ -1068,8 +1068,8 @@ mstore(0x59a0, mload(0x58c0))
mstore(0x59e0, mload(0x5940))
mstore(0x5a00, mload(0x5960))
success := and(eq(staticcall(gas(), 0x6, 0x59a0, 0x80, 0x59a0, 0x40), 1), success)
mstore(0x5a20, 0x269ea562c797337fa2b82b9e5685ed7ed6a9bf64c10ad1c4647f44f1f724f9ac)
mstore(0x5a40, 0x2c9d614e9eba14b280da1c8b88090af4094585a6ae07dceeb208adfcd2e5f43a)
mstore(0x5a20, 0x19188946a2875d90d8fac20a52175bc7fc8a093220c89665bc379cf4edbef704)
mstore(0x5a40, 0x0e96d5c7272650e81fefec1f91d7b3e8672f1ef7ae606a0aed4cc91d364b3b6c)
mstore(0x5a60, mload(0x3fa0))
success := and(eq(staticcall(gas(), 0x7, 0x5a20, 0x60, 0x5a20, 0x40), 1), success)
mstore(0x5a80, mload(0x59a0))
Expand All @@ -1086,17 +1086,17 @@ mstore(0x5b60, mload(0x5a80))
mstore(0x5ba0, mload(0x5b00))
mstore(0x5bc0, mload(0x5b20))
success := and(eq(staticcall(gas(), 0x6, 0x5b60, 0x80, 0x5b60, 0x40), 1), success)
mstore(0x5be0, 0x24cd09e9ddbe78904ef088fb7d9add7671f0ed402a53d8eee9fbeba24856f8de)
mstore(0x5c00, 0x1fee7f57b90d3cd90a7c75ba7f22fae869a5c3d3759601a27f5ee8fc8df67230)
mstore(0x5be0, 0x170e9674fda6bc38da57745e72ced5e695a814e1035995c783db73a4215e43b4)
mstore(0x5c00, 0x0fb27481ec92c7ba36485ef4f15c9cb2385d627d8dbf6b2f7b7b2303c9e91980)
mstore(0x5c20, mload(0x3fe0))
success := and(eq(staticcall(gas(), 0x7, 0x5be0, 0x60, 0x5be0, 0x40), 1), success)
mstore(0x5c40, mload(0x5b60))
mstore(0x5c60, mload(0x5b80))
mstore(0x5c80, mload(0x5be0))
mstore(0x5ca0, mload(0x5c00))
success := and(eq(staticcall(gas(), 0x6, 0x5c40, 0x80, 0x5c40, 0x40), 1), success)
mstore(0x5cc0, 0x2011b8eacdb329a3f12e99e88574145d47ffd6f0b2bd2fda770867e2272b3389)
mstore(0x5ce0, 0x2483960c2986178421542fdc33e65949d9480ab66040b60a0e776293f1a971a9)
mstore(0x5cc0, 0x027beed3134a76b6b90a669d181b02ca3499aaf7b06a669314b49b04bcde9f0b)
mstore(0x5ce0, 0x0c5565cb9709b5a0a4285d051e15a52c161cac35ea27b7b0173edd9e0ced99ad)
mstore(0x5d00, mload(0x4000))
success := and(eq(staticcall(gas(), 0x7, 0x5cc0, 0x60, 0x5cc0, 0x40), 1), success)
mstore(0x5d20, mload(0x5c40))
Expand All @@ -1113,8 +1113,8 @@ mstore(0x5e00, mload(0x5d20))
mstore(0x5e40, mload(0x5da0))
mstore(0x5e60, mload(0x5dc0))
success := and(eq(staticcall(gas(), 0x6, 0x5e00, 0x80, 0x5e00, 0x40), 1), success)
mstore(0x5e80, 0x1f11693235739a17fa7f29adcfffbd2a9d191d3f4add8979df2a7165b61e9d12)
mstore(0x5ea0, 0x0019913aa142d6fc990b095edc0ca8896bf473558df26d7a30a0aff88620b86f)
mstore(0x5e80, 0x066b8032d0498080100f9e2c20554ce7a3e0d9ff491563643023d8631d54018b)
mstore(0x5ea0, 0x1df01ac9ae1b168770bbf1d957aa1d2b8397c113fc2252a26304d1d7fa9ba67b)
mstore(0x5ec0, mload(0x4040))
success := and(eq(staticcall(gas(), 0x7, 0x5e80, 0x60, 0x5e80, 0x40), 1), success)
mstore(0x5ee0, mload(0x5e00))
Expand Down Expand Up @@ -1176,8 +1176,8 @@ mstore(0x6420, mload(0x6340))
mstore(0x6460, mload(0x63c0))
mstore(0x6480, mload(0x63e0))
success := and(eq(staticcall(gas(), 0x6, 0x6420, 0x80, 0x6420, 0x40), 1), success)
mstore(0x64a0, 0x2aac7efcdcecc6b9e5bd3dcfb869aa6b9bc4a5997f558b625127b1142190d92c)
mstore(0x64c0, 0x18c5d82b3f3947147a562001dc76441331a05dc86395f3ca0535dc7ba842674c)
mstore(0x64a0, 0x0dcb1cdd3657c399ece58217a56c692dbe284bf69a7ab9d5c314ccfbb5783bc7)
mstore(0x64c0, 0x0b62ed66ad3fb16d0494a009f61c4457d28815267af9dc3e56faf696c42ec70b)
mstore(0x64e0, mload(0x43a0))
success := and(eq(staticcall(gas(), 0x7, 0x64a0, 0x60, 0x64a0, 0x40), 1), success)
mstore(0x6500, mload(0x6420))
Expand Down Expand Up @@ -1264,7 +1264,7 @@ success := and(eq(staticcall(gas(), 0x8, 0x6ba0, 0x180, 0x6ba0, 0x20), 1), succe
success := and(eq(mload(0x6ba0), 1), success)

if not(success) { revert(0, 0) }
// keccak256("taiko")
// keccak256("taiko")
mstore(0x00, 0x93ac8fdbfc0b0608f9195474a0dd6242f019f5abc3c4e26ad51fefb059cc0177)
return(0, 32)

Expand Down

0 comments on commit 6f9f022

Please sign in to comment.