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": "0x010003ed0d28d53b41aa7a9d4867799c8029158ff1cf77b5d540663316ccbade",
"zkBytecodePath": "/l1-contracts/zkout/GatewayCTMDeployer.sol/GatewayCTMDeployer.json",
"evmBytecodeHash": "0x46f5c35bdb223d835c2c9d8cb0bed6cf02fe619443c5b76f73f40942ada8cde9",
"evmBytecodeHash": "0x2300386201cf8ef7e2118a987b2a10561eb1afe10e2c03e0c1ca653e02fc48e1",
"evmBytecodePath": "/l1-contracts/out/GatewayCTMDeployer.sol/GatewayCTMDeployer.json",
"evmDeployedBytecodeHash": "0xac74f675b7601d723bf53efc8493507e6b8703ad95e638b23c79999a3d806f8a"
"evmDeployedBytecodeHash": "0x5b4cf38940342315de8530103b9d8fb242e3cbe862752c991f9eecb9a69d5143"
},
{
"contractName": "l1-contracts/GatewayTransactionFilterer",
Expand Down Expand Up @@ -1121,19 +1121,19 @@
},
{
"contractName": "l1-contracts/L1VerifierFflonk",
"zkBytecodeHash": "0x010009bfa02ebae3fbb8a28fa687292f07a266d8ac17963b7ecd52c6a0d71614",
"zkBytecodeHash": "0x010009bf5c74b29a7b5e458781d4d195dc11284817058f69a891ce0f32e5470d",
"zkBytecodePath": "/l1-contracts/zkout/L1VerifierFflonk.sol/L1VerifierFflonk.json",
"evmBytecodeHash": "0x57662f37f95b983aab2d8618c4a21449b6d8301ed98d0b193dfbfaa8e34506c0",
"evmBytecodeHash": "0xad768525438c4d1717b08e182ca967fd1a1e50372ea51e34f3036db955f8bd61",
"evmBytecodePath": "/l1-contracts/out/L1VerifierFflonk.sol/L1VerifierFflonk.json",
"evmDeployedBytecodeHash": "0xce62d181ce5c6ccd510aa8dedb6b0ef24f3bf50f1e5d8bfbf27a2b3b0e7ec3c5"
"evmDeployedBytecodeHash": "0x55904311f66b0e793d330f81f7ea8bc43e98494d5cd9ed14ad64e7dba79a620c"
},
{
"contractName": "l1-contracts/L1VerifierPlonk",
"zkBytecodeHash": "0x01000dbbc332245e683b6dbd97afd600033f7d99e26c22ee979ad3799742d355",
"zkBytecodeHash": "0x01000dbbf216a39ec0e7c193ca8cc86f9cf1b43b2a22707d491ff91d9c486f73",
"zkBytecodePath": "/l1-contracts/zkout/L1VerifierPlonk.sol/L1VerifierPlonk.json",
"evmBytecodeHash": "0xc0f51a35634544f5bc26100178545b3e0d6fdce629a0bf6657433d05d3999fc1",
"evmBytecodeHash": "0x9f76ef4c02db1200ecb25f7508a3a5b9012da9ecdb60ba07bd1aeb3ca6e2d9d8",
"evmBytecodePath": "/l1-contracts/out/L1VerifierPlonk.sol/L1VerifierPlonk.json",
"evmDeployedBytecodeHash": "0xf2b11748a4966ab0d0af4b9ba169fd27ece953fa51400597b48cdef43b8a475b"
"evmDeployedBytecodeHash": "0x8c8cd16748e6d90f1310cb43fe9741d5d21986dba76aa09d813d74e4339d47ec"
},
{
"contractName": "l1-contracts/L2AdminFactory",
Expand Down Expand Up @@ -1193,19 +1193,19 @@
},
{
"contractName": "l1-contracts/L2VerifierFflonk",
"zkBytecodeHash": "0x010009edd1b497b4857b964780ff0a743774adece8894777e681a7fa5310044a",
"zkBytecodeHash": "0x010009eddf7c3282d450bd80c5ca2d32e32cca997fbff1d9ab10ddb640288738",
"zkBytecodePath": "/l1-contracts/zkout/L2VerifierFflonk.sol/L2VerifierFflonk.json",
"evmBytecodeHash": "0xbe8666ee2a4f83669571688f9bdda7f7210c7caf9d0f1782d57ed325bc6a4300",
"evmBytecodeHash": "0x5a4f8f71600e6b6cc49994cd83c72d4738efc88e947d87444ac2ac5f9af00812",
"evmBytecodePath": "/l1-contracts/out/L2VerifierFflonk.sol/L2VerifierFflonk.json",
"evmDeployedBytecodeHash": "0xd6eb6ea687593bf45eb90e8e0b4fc59f481c0870e48ba4f0af6bca8431f3667a"
"evmDeployedBytecodeHash": "0x74f1b9d8a54248ec2cafca66e583a167c9460810c1de1f5a34bb900f0d363a0e"
},
{
"contractName": "l1-contracts/L2VerifierPlonk",
"zkBytecodeHash": "0x01000e17bb3c8e616a9c37e67b21ef7061b43aadcd33e4534464f0ae584045ce",
"zkBytecodeHash": "0x01000e17697ad7b5816b2f8f8435d6f273467b08711d2eeb355c6d57473052e9",
"zkBytecodePath": "/l1-contracts/zkout/L2VerifierPlonk.sol/L2VerifierPlonk.json",
"evmBytecodeHash": "0x3d3ee48981e38425b7db1044eb43cf73e8dbe4f800b41f22811c356443f46f00",
"evmBytecodeHash": "0x1fe9c43f80cbe1ad84b1b381a63b32be844869464e4984103536cae1e7467f30",
"evmBytecodePath": "/l1-contracts/out/L2VerifierPlonk.sol/L2VerifierPlonk.json",
"evmDeployedBytecodeHash": "0x63948f495551c5e7998a54badabb1637490d7bbfa667d710c245dac72294ae32"
"evmDeployedBytecodeHash": "0xa2e2c4dd2fb81341a77fd13259d547d6565d6c8a973081567d74c2ec70149109"
},
{
"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 0x63db8c026b05a196aa7f197efb7b0f1e14164fe7eb564a8ff5c5e8e1b8c33082
/// @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 = 0x27962da93ad45afa6a46f196b9a996ea98f8689ee6fa3340619bfddafdb63787;
uint256 internal constant VK_C0_G1_Y = 0x3012c8d4d6babe4bd914c8e75b1dc5cd44f1b09d09f8a88f5cbbd2a554bc974b;

// 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 0x805cb409f1103db9cee4a2024d998d30bb50f74567c9bad9dd6bc5cdf41689ea
/// @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, 0x251f6555b972b99e22b3bd0fcc589b3f39dd457151929c830588e3df8850af4f)
mstore(VK_GATE_SETUP_0_Y_SLOT, 0x22649a9ca189864f1a29a25e133aa39a07a5fba1a7484dfb38be5ef40d90791d)
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, 0x0639a52f21b8f96a4380db465f5bd0cdcc2d350863be8e9b1423681600c2a85e)
mstore(VK_GATE_SETUP_6_Y_SLOT, 0x2a9818dfc9c91bfa61bdd4b5b490abb15c738d5301a20108624b57bf97ee856a)
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 0x63db8c026b05a196aa7f197efb7b0f1e14164fe7eb564a8ff5c5e8e1b8c33082
/// @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 = 0x27962da93ad45afa6a46f196b9a996ea98f8689ee6fa3340619bfddafdb63787;
uint256 internal constant VK_C0_G1_Y = 0x3012c8d4d6babe4bd914c8e75b1dc5cd44f1b09d09f8a88f5cbbd2a554bc974b;

// 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 0x805cb409f1103db9cee4a2024d998d30bb50f74567c9bad9dd6bc5cdf41689ea
/// @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, 0x251f6555b972b99e22b3bd0fcc589b3f39dd457151929c830588e3df8850af4f)
mstore(VK_GATE_SETUP_0_Y_SLOT, 0x22649a9ca189864f1a29a25e133aa39a07a5fba1a7484dfb38be5ef40d90791d)
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, 0x0639a52f21b8f96a4380db465f5bd0cdcc2d350863be8e9b1423681600c2a85e)
mstore(VK_GATE_SETUP_6_Y_SLOT, 0x2a9818dfc9c91bfa61bdd4b5b490abb15c738d5301a20108624b57bf97ee856a)
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
7033494360070436743,
11022675119678567232,
7658073846052394730,
2852517618845506298
],
"y": [
16958997684630495899,
14467438315364241100,
9052191284110899355,
1383589758309537490
6682166079667345227,
4967946052490012815,
15642348301756253645,
3464051879862517323
],
"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
398819116226490191,
4169565183017131139,
2500550093671275327,
2674968122539293086
],
"y": [
10245877187023648100,
4189412853632299831,
5748203165349347759,
1455907734764386005
4088809913991592221,
551123201137593851,
1885216443964498842,
2478275692476335695
],
"infinity": false
},
Expand Down Expand Up @@ -96,16 +96,16 @@
},
{
"x": [
5467385424335926204,
1959516906714691548,
6229241392725008235,
2763853223874916556
1451117948654757982,
14712473867838721691,
4864128692854182093,
448571259747891562
],
"y": [
12493211968039313176,
10637392935510877004,
12389983449596269632,
215536480614791430
7082851319369598314,
6661823661460291848,
7043019269160872881,
3069230495495166970
],
"infinity": false
},
Expand Down
Loading