Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions AllContractsHashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -1025,11 +1025,11 @@
},
{
"contractName": "l1-contracts/GatewayCTMDeployer",
"zkBytecodeHash": "0x010003edc08ef593bc1a79933875eb304ec40556246edaf521c0d61fba02ccd3",
"zkBytecodeHash": "0x010003ed0328f73047e2c3bca2ac9af4ece24772153f666a9c6568e493d1f02c",
"zkBytecodePath": "/l1-contracts/zkout/GatewayCTMDeployer.sol/GatewayCTMDeployer.json",
"evmBytecodeHash": "0x46f5c35bdb223d835c2c9d8cb0bed6cf02fe619443c5b76f73f40942ada8cde9",
"evmBytecodeHash": "0x55cf0de553cf10f383263adceb02e068280edfff65aa4c359b8e6c139d18eb47",
"evmBytecodePath": "/l1-contracts/out/GatewayCTMDeployer.sol/GatewayCTMDeployer.json",
"evmDeployedBytecodeHash": "0xac74f675b7601d723bf53efc8493507e6b8703ad95e638b23c79999a3d806f8a"
"evmDeployedBytecodeHash": "0xdf908010709350759b7aab8d5c187153d17750e1a0145a8c26bdb383a988ca69"
},
{
"contractName": "l1-contracts/GatewayTransactionFilterer",
Expand Down Expand Up @@ -1121,19 +1121,19 @@
},
{
"contractName": "l1-contracts/L1VerifierFflonk",
"zkBytecodeHash": "0x010009bfa02ebae3fbb8a28fa687292f07a266d8ac17963b7ecd52c6a0d71614",
"zkBytecodeHash": "0x010009bfc9b2c85cc2c1af741ae8ca02de365ad3b1fad5e42fc2f8d44c76ecec",
"zkBytecodePath": "/l1-contracts/zkout/L1VerifierFflonk.sol/L1VerifierFflonk.json",
"evmBytecodeHash": "0x57662f37f95b983aab2d8618c4a21449b6d8301ed98d0b193dfbfaa8e34506c0",
"evmBytecodeHash": "0x40fd4575ae04a93d0e6fe12f89fef3af8e8aecbce1503248f90fd31093c6f456",
"evmBytecodePath": "/l1-contracts/out/L1VerifierFflonk.sol/L1VerifierFflonk.json",
"evmDeployedBytecodeHash": "0xce62d181ce5c6ccd510aa8dedb6b0ef24f3bf50f1e5d8bfbf27a2b3b0e7ec3c5"
"evmDeployedBytecodeHash": "0x44abae369fb56334e7b857959612c91e5972234a75a0d9bfb69e34fb3409edb8"
},
{
"contractName": "l1-contracts/L1VerifierPlonk",
"zkBytecodeHash": "0x01000dbbc332245e683b6dbd97afd600033f7d99e26c22ee979ad3799742d355",
"zkBytecodeHash": "0x01000dbbbebde7470759f88baab428b70166b7936527bede16de060ee479510b",
"zkBytecodePath": "/l1-contracts/zkout/L1VerifierPlonk.sol/L1VerifierPlonk.json",
"evmBytecodeHash": "0xc0f51a35634544f5bc26100178545b3e0d6fdce629a0bf6657433d05d3999fc1",
"evmBytecodeHash": "0x71d8a84e977055a3b7f4438c6a90513c87a2cfc35c271ec1d462795637eb54ab",
"evmBytecodePath": "/l1-contracts/out/L1VerifierPlonk.sol/L1VerifierPlonk.json",
"evmDeployedBytecodeHash": "0xf2b11748a4966ab0d0af4b9ba169fd27ece953fa51400597b48cdef43b8a475b"
"evmDeployedBytecodeHash": "0x6ef2ef9807a818c7d65702c7183ec402bacc2b74c0cce48014808bce4d222e62"
},
{
"contractName": "l1-contracts/L2AdminFactory",
Expand Down Expand Up @@ -1193,19 +1193,19 @@
},
{
"contractName": "l1-contracts/L2VerifierFflonk",
"zkBytecodeHash": "0x010009edd1b497b4857b964780ff0a743774adece8894777e681a7fa5310044a",
"zkBytecodeHash": "0x010009edcc096cb3c7a8466f88c1509748568fde8efd0e535e0eb4989b6b0787",
"zkBytecodePath": "/l1-contracts/zkout/L2VerifierFflonk.sol/L2VerifierFflonk.json",
"evmBytecodeHash": "0xbe8666ee2a4f83669571688f9bdda7f7210c7caf9d0f1782d57ed325bc6a4300",
"evmBytecodeHash": "0xc089d107ee850c4683f58a11f9c50524ea0f19ccc8a29ccdc3a8c6d2a98dc112",
"evmBytecodePath": "/l1-contracts/out/L2VerifierFflonk.sol/L2VerifierFflonk.json",
"evmDeployedBytecodeHash": "0xd6eb6ea687593bf45eb90e8e0b4fc59f481c0870e48ba4f0af6bca8431f3667a"
"evmDeployedBytecodeHash": "0x7a9ca5f2d32c35b4a26e4c6fb8b6924177f1503290e7effb11524aa1a3510938"
},
{
"contractName": "l1-contracts/L2VerifierPlonk",
"zkBytecodeHash": "0x01000e17bb3c8e616a9c37e67b21ef7061b43aadcd33e4534464f0ae584045ce",
"zkBytecodeHash": "0x01000e170b9bc8185f27c17009629700c101ef17d44e2b7f0897797fbbf3b900",
"zkBytecodePath": "/l1-contracts/zkout/L2VerifierPlonk.sol/L2VerifierPlonk.json",
"evmBytecodeHash": "0x3d3ee48981e38425b7db1044eb43cf73e8dbe4f800b41f22811c356443f46f00",
"evmBytecodeHash": "0xdb3b5b6e4451ebf35d5db021de03c19d2ca1159da86def9a3afabbef5d69a6e1",
"evmBytecodePath": "/l1-contracts/out/L2VerifierPlonk.sol/L2VerifierPlonk.json",
"evmDeployedBytecodeHash": "0x63948f495551c5e7998a54badabb1637490d7bbfa667d710c245dac72294ae32"
"evmDeployedBytecodeHash": "0xa7cc34cfe26927e248fab2faacc714b672cbf995e99985bc39f6bdaa7830ad3b"
},
{
"contractName": "l1-contracts/L2WrappedBaseToken",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {IVerifierV2} from "../chain-interfaces/IVerifierV2.sol";
/// @notice FFT inspired version of PlonK to optimize on-chain gas cost
/// @dev For better understanding of the protocol follow the below papers:
/// * Fflonk Paper: https://eprint.iacr.org/2021/1167
/// @dev Contract was generated from a verification key with a hash of 0xe4503cf38485e3d728a7362155d53d3d63293e2fa48dca4f5588aa4625de251f
/// @dev Contract was generated from a verification key with a hash of 0xc8cd705a0db89577146137de78eba6bd1f1c9c3f66dc52f7627e7c2df30895b2
/// @custom:security-contact security@matterlabs.dev
contract L1VerifierFflonk is IVerifierV2 {
// ================Constants================
Expand All @@ -24,8 +24,8 @@ contract L1VerifierFflonk is IVerifierV2 {
// ================Verification Key================
uint256 internal constant VK_NUM_INPUTS = 1;
// [C0]1 = qL(X^8)+ X*qR(X^8)+ X^2*qO(X^8)+ X^3*qM(X^8)+ X^4*qC(X^8)+ X^5*Sσ1(X^8)+ X^6*Sσ2(X^8)+ X^7*Sσ3(X^8)
uint256 internal constant VK_C0_G1_X = 0x0ac03820cac7a6d7b2981f076ef641425a0f59f27513235db38d6250f67e0b9b;
uint256 internal constant VK_C0_G1_Y = 0x13337f8dfae896d27d9fd8032851389bc8c6aa7efd294ecceb5a768aa312a29b;
uint256 internal constant VK_C0_G1_X = 0x0e2ded5cfc9ea295ca630aed1ed641e12a89d83e60e59bd9b467ad5668b5357d;
uint256 internal constant VK_C0_G1_Y = 0x2940e9a4985d775fba0bf93338a86999e56fc13bdde4078ad549dee2fad1dbf7;

// k1 = 5, k2 = 7
uint256 internal constant VK_NON_RESIDUES_0 = 0x05;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {IVerifier} from "../chain-interfaces/IVerifier.sol";
/// @notice Modified version of the Permutations over Lagrange-bases for Oecumenical Noninteractive arguments of
/// Knowledge (PLONK) verifier.
/// Modifications have been made to optimize the proof system for ZK chain circuits.
/// @dev Contract was generated from a verification key with a hash of 0x93e83aa1ec05a2ac4de1f0b241394efb9f94a4e7c1784a5a9bf6b85eb930c62a
/// @dev Contract was generated from a verification key with a hash of 0xb2f50340e0edbe49dc657d4eb298e07f13860c1be0fe2e438e44ef8fad133d84
/// @dev It uses a custom memory layout inside the inline assembly block. Each reserved memory cell is declared in the
/// constants below.
/// @dev For a better understanding of the verifier algorithm please refer to the following papers:
Expand Down Expand Up @@ -284,8 +284,8 @@ contract L1VerifierPlonk is IVerifier {
function _loadVerificationKey() internal pure virtual {
assembly {
// gate setup commitments
mstore(VK_GATE_SETUP_0_X_SLOT, 0x05bc768c38f151cd8f9f7ad0585afa38bcba4c71835e31df1399fcc469f79678)
mstore(VK_GATE_SETUP_0_Y_SLOT, 0x14346c5efc5ff6d54fc5b852d76c81af3a23c8cb3e3573378e30ab0440d2b564)
mstore(VK_GATE_SETUP_0_X_SLOT, 0x007ab3b6eb38bcb3d387e923a00c9a0e76181545797111e9920869e95413f8b2)
mstore(VK_GATE_SETUP_0_Y_SLOT, 0x1ccb98df0d44a0f2ea377131d4ebdf771d7cfd9cec5adbdcaf5657cc9c012dd3)
mstore(VK_GATE_SETUP_1_X_SLOT, 0x04659caf7b05471ba5ba85b1ab62267aa6c456836e625f169f7119d55b9462d2)
mstore(VK_GATE_SETUP_1_Y_SLOT, 0x0ea63403692148d2ad22189a1e5420076312f4d46e62036a043a6b0b84d5b410)
mstore(VK_GATE_SETUP_2_X_SLOT, 0x0e6696d09d65fce1e42805be03fca1f14aea247281f688981f925e77d4ce2291)
Expand All @@ -296,8 +296,8 @@ contract L1VerifierPlonk is IVerifier {
mstore(VK_GATE_SETUP_4_Y_SLOT, 0x22e404bc91350f3bc7daad1d1025113742436983c85eac5ab7b42221a181b81e)
mstore(VK_GATE_SETUP_5_X_SLOT, 0x0d9b29613037a5025655c82b143d2b7449c98f3aea358307c8529249cc54f3b9)
mstore(VK_GATE_SETUP_5_Y_SLOT, 0x15b3c4c946ad1babfc4c03ff7c2423fd354af3a9305c499b7fb3aaebe2fee746)
mstore(VK_GATE_SETUP_6_X_SLOT, 0x265b2ddd1461f0cc5672b60af1889f6b1b319a3ea419f7dc4be00e1373b0f3bc)
mstore(VK_GATE_SETUP_6_Y_SLOT, 0x02fdbd49832eb906abf2104d6e279440939f9c83f960234cad60ce17d2a45f18)
mstore(VK_GATE_SETUP_6_X_SLOT, 0x29990ff80ff0b5a35a177f8e461ed72b5f80c81af5348bcde0a14d74dbf1b321)
mstore(VK_GATE_SETUP_6_Y_SLOT, 0x164e998cb7ae3ae5f39b9a96c52464cbe24224fecef541d6a5edd0dd7a1c0c9c)
mstore(VK_GATE_SETUP_7_X_SLOT, 0x283344a1ab3e55ecfd904d0b8e9f4faea338df5a4ead2fa9a42f0e103da40abc)
mstore(VK_GATE_SETUP_7_Y_SLOT, 0x223b37b83b9687512d322993edd70e508dd80adb10bcf7321a3cc8a44c269521)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {IVerifierV2} from "../chain-interfaces/IVerifierV2.sol";
/// @notice FFT inspired version of PlonK to optimize on-chain gas cost
/// @dev For better understanding of the protocol follow the below papers:
/// * Fflonk Paper: https://eprint.iacr.org/2021/1167
/// @dev Contract was generated from a verification key with a hash of 0xe4503cf38485e3d728a7362155d53d3d63293e2fa48dca4f5588aa4625de251f
/// @dev Contract was generated from a verification key with a hash of 0xc8cd705a0db89577146137de78eba6bd1f1c9c3f66dc52f7627e7c2df30895b2
/// @custom:security-contact security@matterlabs.dev
contract L2VerifierFflonk is IVerifierV2 {
// ================Constants================
Expand All @@ -24,8 +24,8 @@ contract L2VerifierFflonk is IVerifierV2 {
// ================Verification Key================
uint256 internal constant VK_NUM_INPUTS = 1;
// [C0]1 = qL(X^8)+ X*qR(X^8)+ X^2*qO(X^8)+ X^3*qM(X^8)+ X^4*qC(X^8)+ X^5*Sσ1(X^8)+ X^6*Sσ2(X^8)+ X^7*Sσ3(X^8)
uint256 internal constant VK_C0_G1_X = 0x0ac03820cac7a6d7b2981f076ef641425a0f59f27513235db38d6250f67e0b9b;
uint256 internal constant VK_C0_G1_Y = 0x13337f8dfae896d27d9fd8032851389bc8c6aa7efd294ecceb5a768aa312a29b;
uint256 internal constant VK_C0_G1_X = 0x0e2ded5cfc9ea295ca630aed1ed641e12a89d83e60e59bd9b467ad5668b5357d;
uint256 internal constant VK_C0_G1_Y = 0x2940e9a4985d775fba0bf93338a86999e56fc13bdde4078ad549dee2fad1dbf7;

// k1 = 5, k2 = 7
uint256 internal constant VK_NON_RESIDUES_0 = 0x05;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {IVerifier} from "../chain-interfaces/IVerifier.sol";
/// @notice Modified version of the Permutations over Lagrange-bases for Oecumenical Noninteractive arguments of
/// Knowledge (PLONK) verifier.
/// Modifications have been made to optimize the proof system for ZK chain circuits.
/// @dev Contract was generated from a verification key with a hash of 0x93e83aa1ec05a2ac4de1f0b241394efb9f94a4e7c1784a5a9bf6b85eb930c62a
/// @dev Contract was generated from a verification key with a hash of 0xb2f50340e0edbe49dc657d4eb298e07f13860c1be0fe2e438e44ef8fad133d84
/// @dev It uses a custom memory layout inside the inline assembly block. Each reserved memory cell is declared in the
/// constants below.
/// @dev For a better understanding of the verifier algorithm please refer to the following papers:
Expand Down Expand Up @@ -284,8 +284,8 @@ contract L2VerifierPlonk is IVerifier {
function _loadVerificationKey() internal pure virtual {
assembly {
// gate setup commitments
mstore(VK_GATE_SETUP_0_X_SLOT, 0x05bc768c38f151cd8f9f7ad0585afa38bcba4c71835e31df1399fcc469f79678)
mstore(VK_GATE_SETUP_0_Y_SLOT, 0x14346c5efc5ff6d54fc5b852d76c81af3a23c8cb3e3573378e30ab0440d2b564)
mstore(VK_GATE_SETUP_0_X_SLOT, 0x007ab3b6eb38bcb3d387e923a00c9a0e76181545797111e9920869e95413f8b2)
mstore(VK_GATE_SETUP_0_Y_SLOT, 0x1ccb98df0d44a0f2ea377131d4ebdf771d7cfd9cec5adbdcaf5657cc9c012dd3)
mstore(VK_GATE_SETUP_1_X_SLOT, 0x04659caf7b05471ba5ba85b1ab62267aa6c456836e625f169f7119d55b9462d2)
mstore(VK_GATE_SETUP_1_Y_SLOT, 0x0ea63403692148d2ad22189a1e5420076312f4d46e62036a043a6b0b84d5b410)
mstore(VK_GATE_SETUP_2_X_SLOT, 0x0e6696d09d65fce1e42805be03fca1f14aea247281f688981f925e77d4ce2291)
Expand All @@ -296,8 +296,8 @@ contract L2VerifierPlonk is IVerifier {
mstore(VK_GATE_SETUP_4_Y_SLOT, 0x22e404bc91350f3bc7daad1d1025113742436983c85eac5ab7b42221a181b81e)
mstore(VK_GATE_SETUP_5_X_SLOT, 0x0d9b29613037a5025655c82b143d2b7449c98f3aea358307c8529249cc54f3b9)
mstore(VK_GATE_SETUP_5_Y_SLOT, 0x15b3c4c946ad1babfc4c03ff7c2423fd354af3a9305c499b7fb3aaebe2fee746)
mstore(VK_GATE_SETUP_6_X_SLOT, 0x265b2ddd1461f0cc5672b60af1889f6b1b319a3ea419f7dc4be00e1373b0f3bc)
mstore(VK_GATE_SETUP_6_Y_SLOT, 0x02fdbd49832eb906abf2104d6e279440939f9c83f960234cad60ce17d2a45f18)
mstore(VK_GATE_SETUP_6_X_SLOT, 0x29990ff80ff0b5a35a177f8e461ed72b5f80c81af5348bcde0a14d74dbf1b321)
mstore(VK_GATE_SETUP_6_Y_SLOT, 0x164e998cb7ae3ae5f39b9a96c52464cbe24224fecef541d6a5edd0dd7a1c0c9c)
mstore(VK_GATE_SETUP_7_X_SLOT, 0x283344a1ab3e55ecfd904d0b8e9f4faea338df5a4ead2fa9a42f0e103da40abc)
mstore(VK_GATE_SETUP_7_Y_SLOT, 0x223b37b83b9687512d322993edd70e508dd80adb10bcf7321a3cc8a44c269521)

Expand Down
16 changes: 8 additions & 8 deletions tools/data/fflonk_scheduler_key.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"n": 8388607,
"c0": {
"x": [
12938105404377664411,
6489504485945320285,
12869070051998056770,
774680849399916247
12999549436063724925,
3065218783827565529,
14583512031896682977,
1021733674113999509
],
"y": [
16958997684630495899,
14467438315364241100,
9052191284110899355,
1383589758309537490
15369060269830560759,
16532645219970320266,
13406082714187622809,
2972632647204697951
],
"infinity": false
},
Expand Down
32 changes: 16 additions & 16 deletions tools/data/plonk_scheduler_key.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
"gate_setup_commitments": [
{
"x": [
1412437878678984312,
13599266075217637855,
10349125503974832696,
413335610434081229
10522776980210055346,
8509574884050932201,
15242407803077040654,
34537545370483891
],
"y": [
10245877187023648100,
4189412853632299831,
5748203165349347759,
1455907734764386005
12634382340936773075,
2124851974634134492,
16877082587433787255,
2074920137101975794
],
"infinity": false
},
Expand Down Expand Up @@ -96,16 +96,16 @@
},
{
"x": [
5467385424335926204,
1959516906714691548,
6229241392725008235,
2763853223874916556
16186303700047868705,
6881720248730684365,
6491797636916369195,
2997444585085515171
],
"y": [
12493211968039313176,
10637392935510877004,
12389983449596269632,
215536480614791430
11956442235393543324,
16303634277847089622,
17553793944949908683,
1607390946673965797
],
"infinity": false
},
Expand Down
Loading