Skip to content

Commit 56aecc5

Browse files
authored
Merge pull request #1978 from matter-labs/kl/v31-upgrade-2
small config rework and renaming ecosystem upgrade
1 parent e5d22a7 commit 56aecc5

File tree

54 files changed

+1983
-685
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1983
-685
lines changed

AllContractsHashes.json

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,23 +1081,23 @@
10811081
},
10821082
{
10831083
"contractName": "l1-contracts/EraDualVerifier",
1084-
"zkBytecodeHash": "0x010000d301d1862cd2090f02b7079c41f2f7da323cb18b2807aad63fbf8c5a65",
1084+
"zkBytecodeHash": "0x010000d355328b472216d2ffe396eaab23eb0b0a8a81b472052564fda7fa0cb6",
10851085
"zkBytecodePath": "/l1-contracts/zkout/EraDualVerifier.sol/EraDualVerifier.json",
1086-
"evmBytecodeHash": "0xdb8028b6989e96a78ec5c770f2951fd82ddcfc7a6c735c70c3b2c3bc319f215d",
1086+
"evmBytecodeHash": "0x168bea589ea4daed5f2af3d8dc3644e6f027fd5dc9a6fe46fdfea42eb2c86de9",
10871087
"evmBytecodePath": "/l1-contracts/out/EraDualVerifier.sol/EraDualVerifier.json",
1088-
"evmDeployedBytecodeHash": "0x1376e96e4e9fab5377bd8755c0c303a03ee8f81aa50898e2cebe36d2179c598f",
1089-
"evmDeployedBytecodeBlakeHash": "0x01cc77e4f75b0c9ef74ac68749fa104f0082a6a9b616004c38a4ed7de46e466b",
1088+
"evmDeployedBytecodeHash": "0x733b9585687156922bec03a8acef0d8984ec4e6db00d2c17058bed5b97782221",
1089+
"evmDeployedBytecodeBlakeHash": "0x242f7c904686e462ff9c1b24a93bff5b75dda87fe3cde9ecd3540e2d40489c99",
10901090
"evmDeployedBytecodeLength": 1836
10911091
},
10921092
{
10931093
"contractName": "l1-contracts/EraTestnetVerifier",
1094-
"zkBytecodeHash": "0x0100009dad07755f508de7b688a989fa834a2cecce4cdb60e1e9fadd155c7ee0",
1094+
"zkBytecodeHash": "0x010000c79c2996520c8bf04fe3864e788cc529c54088c387fb5e1814c677ba29",
10951095
"zkBytecodePath": "/l1-contracts/zkout/EraTestnetVerifier.sol/EraTestnetVerifier.json",
1096-
"evmBytecodeHash": "0x9ebe6d6dc5649d865f894b680db2afb8bfea6e648ab5005b7fe5bdc496c72aa2",
1096+
"evmBytecodeHash": "0xc2a893d08c4ebd4cdf6c6205fd9b2ef3854e44a6b4ae38a4612ae595a7226253",
10971097
"evmBytecodePath": "/l1-contracts/out/EraTestnetVerifier.sol/EraTestnetVerifier.json",
1098-
"evmDeployedBytecodeHash": "0x10b1bbb7f3031a6b54157a5c76eaddd00c754828ca126c68c3de09e2e18f6e3e",
1099-
"evmDeployedBytecodeBlakeHash": "0x957a1205a09750683f66bf9b3288cc7c1946d9be6cf2b9266cd91a7d4463782a",
1100-
"evmDeployedBytecodeLength": 998
1098+
"evmDeployedBytecodeHash": "0x5ecae0386ffe5796f18b5e5bccca145d6837e7a4f990bb101cee6b6ed4f93423",
1099+
"evmDeployedBytecodeBlakeHash": "0xe5da84cb015e26c9e02aebfcc0a956954f37739f2cb7792e19be2065b8973285",
1100+
"evmDeployedBytecodeLength": 1362
11011101
},
11021102
{
11031103
"contractName": "l1-contracts/EraVerifierFflonk",
@@ -1211,22 +1211,22 @@
12111211
},
12121212
{
12131213
"contractName": "l1-contracts/GatewayCTMDeployerVerifiers",
1214-
"zkBytecodeHash": "0x0100008508b48e64bc96960c6b5ffb4f0038efe20622ed2c6c98d79e82dc1b1e",
1214+
"zkBytecodeHash": "0x0100008587c70de20bf570f12cafc77cccd8bcf32e5b54d14d0ff70a147b8fd1",
12151215
"zkBytecodePath": "/l1-contracts/zkout/GatewayCTMDeployerVerifiers.sol/GatewayCTMDeployerVerifiers.json",
1216-
"evmBytecodeHash": "0x765da5d0ffdf36cc3ce837967f16e590eeaa3fb7f3ac806d77f52c5689e32813",
1216+
"evmBytecodeHash": "0xcdee0af6fafee8b2ae84edbb5bd448011e1f429be9c90a31e458455ad5c4e167",
12171217
"evmBytecodePath": "/l1-contracts/out/GatewayCTMDeployerVerifiers.sol/GatewayCTMDeployerVerifiers.json",
1218-
"evmDeployedBytecodeHash": "0x25b1752ef316aaf9532ae5a9169fe94558abab66a06eb131c8c8a7e8b0155bc5",
1219-
"evmDeployedBytecodeBlakeHash": "0x41bd3d0ab75a567a8a1d96d0759cc83379f085a1ab71402dc45ab9ec45d9ad73",
1218+
"evmDeployedBytecodeHash": "0x0089dc18936627e25bd159d2cf11fa3db84f55dbc54ecf3e47c5022cab10eb05",
1219+
"evmDeployedBytecodeBlakeHash": "0x6dbea0f8e45bfe89943a1af214db0547a43b40d47230e484f1b2964dd7c7b0e3",
12201220
"evmDeployedBytecodeLength": 256
12211221
},
12221222
{
12231223
"contractName": "l1-contracts/GatewayCTMDeployerVerifiersZKsyncOS",
1224-
"zkBytecodeHash": "0x0100008788542f6052aa73e3879b950c5a2c6cd633e52bf3e69e82390aa528f5",
1224+
"zkBytecodeHash": "0x010000877c2939903ba615ee5546ae9866b15748b5dd99ad128132f70e5a632a",
12251225
"zkBytecodePath": "/l1-contracts/zkout/GatewayCTMDeployerVerifiersZKsyncOS.sol/GatewayCTMDeployerVerifiersZKsyncOS.json",
1226-
"evmBytecodeHash": "0x393c2df7b994dca23499f4fe051384418968c723ba3b3acd734be8d6bb519d4e",
1226+
"evmBytecodeHash": "0x2221335242bad4c3fc12ed7a3e51cc2c678d732fe08c6add1ca035a2d2f25322",
12271227
"evmBytecodePath": "/l1-contracts/out/GatewayCTMDeployerVerifiersZKsyncOS.sol/GatewayCTMDeployerVerifiersZKsyncOS.json",
1228-
"evmDeployedBytecodeHash": "0xbd9faa59a00130ba2792aa2f1c4c721ea0cb23bdc640e0d210b4788b74d61079",
1229-
"evmDeployedBytecodeBlakeHash": "0x4f3558656e2c5307d05beacfe781afddd5d323e5f0ef17c5940fe4cd79d37e6a",
1228+
"evmDeployedBytecodeHash": "0xe857812d30c51f7bcce27f0a40f877907042d9a389df8221fcdec1f4d1aefa8f",
1229+
"evmDeployedBytecodeBlakeHash": "0x5f4484dc97ce02b57efcf5cd5e53f6099df6464356a3b8a5f81d93dc21f25a85",
12301230
"evmDeployedBytecodeLength": 256
12311231
},
12321232
{
@@ -1371,12 +1371,12 @@
13711371
},
13721372
{
13731373
"contractName": "l1-contracts/L1MessageRoot",
1374-
"zkBytecodeHash": "0x010008afbf196d681bc44a294d2cd577fba1962b0557a6498276fcc0d23202f8",
1374+
"zkBytecodeHash": "0x010008af7d2fae08d1150d5feaa0862d54c32ee352660963bbe3c8f8920b2d8b",
13751375
"zkBytecodePath": "/l1-contracts/zkout/L1MessageRoot.sol/L1MessageRoot.json",
1376-
"evmBytecodeHash": "0xb43628693f028317acc4dbe03284633d25b893b84e6e4452d65a1d9d000900ff",
1376+
"evmBytecodeHash": "0xb5270d2f7d71bf0cf154cff1d2bbf8acfe5ee1ae38007bfcf7fb32401f574270",
13771377
"evmBytecodePath": "/l1-contracts/out/L1MessageRoot.sol/L1MessageRoot.json",
1378-
"evmDeployedBytecodeHash": "0x475e900915a61c19ccad13bdaaf48313a9fd0c6de4bd30ccf22c7f6b016dc6b4",
1379-
"evmDeployedBytecodeBlakeHash": "0x696208769b39be168cdb30ecceaa3eb53976a5b5c996b0fe8d7b18746312543d",
1378+
"evmDeployedBytecodeHash": "0x5d8067138eed98bec24a6a764568ed9e8ebda6dde45902c905356ebf312d9d24",
1379+
"evmDeployedBytecodeBlakeHash": "0x0ea56a5b6ed3f2e8676083f109e0a312c7aef617edc49a530e3cb7733caffcb2",
13801380
"evmDeployedBytecodeLength": 15656
13811381
},
13821382
{
@@ -1841,13 +1841,13 @@
18411841
},
18421842
{
18431843
"contractName": "l1-contracts/SettlementLayerV31Upgrade",
1844-
"zkBytecodeHash": "0x010003e5340620ac4d88c82498fc5eeb28c2f804971beceaf3830c244a3826cc",
1844+
"zkBytecodeHash": "0x010003834579dd66b3f947da366c487f3ccff4f7b51466d5f5f5339a2393ac79",
18451845
"zkBytecodePath": "/l1-contracts/zkout/SettlementLayerV31Upgrade.sol/SettlementLayerV31Upgrade.json",
1846-
"evmBytecodeHash": "0x8b6304b9c58fb6baacfbad11aa6f7dcd121b0cccdc543f9d408d8abfe8b6d9ef",
1846+
"evmBytecodeHash": "0x61a20c38b55e90b5b939e6f66ba91325294183fc7af596bf77b614b2fd930e69",
18471847
"evmBytecodePath": "/l1-contracts/out/SettlementLayerV31Upgrade.sol/SettlementLayerV31Upgrade.json",
1848-
"evmDeployedBytecodeHash": "0x6076e39a92e03493afef47ec8f3b7bc6a0c24f1941c0367998b4eace7600b64a",
1849-
"evmDeployedBytecodeBlakeHash": "0xb7c70f52e45741780847955199d44ddbd2070064913f2e1a272ae9ff74734090",
1850-
"evmDeployedBytecodeLength": 10215
1848+
"evmDeployedBytecodeHash": "0x3f28eb094c72f6e69e2afcc504a1509c02016445d98ac4a2f08758c2eede5e03",
1849+
"evmDeployedBytecodeBlakeHash": "0x006825bebc2f7907de932713e13cfad27af92eae9bb2d850c8e01eb5ec88377d",
1850+
"evmDeployedBytecodeLength": 9481
18511851
},
18521852
{
18531853
"contractName": "l1-contracts/SignatureCheckerUpgradeable",
@@ -2181,22 +2181,22 @@
21812181
},
21822182
{
21832183
"contractName": "l1-contracts/ZKsyncOSDualVerifier",
2184-
"zkBytecodeHash": "0x0100018df2481a85aa3107b1c44e01d37d18039c8d22a6840afa44123859a52a",
2184+
"zkBytecodeHash": "0x0100018da86b98f2436716d1cb7b25850ce2ecf199c1596f10670baef2c87ada",
21852185
"zkBytecodePath": "/l1-contracts/zkout/ZKsyncOSDualVerifier.sol/ZKsyncOSDualVerifier.json",
2186-
"evmBytecodeHash": "0x99bb229b789c9a64209149f3c44cb1f53a53425a91b8aa00be478f21a68bd6f6",
2186+
"evmBytecodeHash": "0x1edd43efd9d9e31eaf3766490bd03f23407d1cf8df8715ae088ed21b034adde4",
21872187
"evmBytecodePath": "/l1-contracts/out/ZKsyncOSDualVerifier.sol/ZKsyncOSDualVerifier.json",
2188-
"evmDeployedBytecodeHash": "0xcda8c4ca84f4868bfccc13294a04cc4e6c822731d2308a09c49682368b136866",
2189-
"evmDeployedBytecodeBlakeHash": "0x6d4851c7ba270ece7a2255a6966aa20838ab2aa67251f98cc015bf8640db248c",
2188+
"evmDeployedBytecodeHash": "0x505ae117f479191ff70ebf20f779a340f6cbe01174040a4f3473ca6baa3e6066",
2189+
"evmDeployedBytecodeBlakeHash": "0x053beadfefe4c55ee372024146d4d70db7028596b9fa3beeb757296003a673e6",
21902190
"evmDeployedBytecodeLength": 4203
21912191
},
21922192
{
21932193
"contractName": "l1-contracts/ZKsyncOSTestnetVerifier",
2194-
"zkBytecodeHash": "0x010001ad9f393c935e6de01d73c24e14a7153f283f7a60905b8f3ec99b7fe995",
2194+
"zkBytecodeHash": "0x010001adae07d45f0dd1cbdad8dbd3ebd5016a63ebfa3586719629ece25c15e8",
21952195
"zkBytecodePath": "/l1-contracts/zkout/ZKsyncOSTestnetVerifier.sol/ZKsyncOSTestnetVerifier.json",
2196-
"evmBytecodeHash": "0x1791ea92c12728a9af39919aea5e1f37b8c8507040174af62449484b1d2842a2",
2196+
"evmBytecodeHash": "0x5ed2490802ae4603adb1d2e4aca25757ee0a999d740ef47db511caa1b4233275",
21972197
"evmBytecodePath": "/l1-contracts/out/ZKsyncOSTestnetVerifier.sol/ZKsyncOSTestnetVerifier.json",
2198-
"evmDeployedBytecodeHash": "0x430d713dadb8c1964fd7573708c392ec7990e17b7d7554dbc4ea1b0c61605aaf",
2199-
"evmDeployedBytecodeBlakeHash": "0x50ac59baf332ec04c18e22b965e3763062f165541778f5e87caa3c5a1f3263fb",
2198+
"evmDeployedBytecodeHash": "0x426a03722e5b15ae1f6e6076f83e9d5b24578984b348e2371d2213e33707ec8b",
2199+
"evmDeployedBytecodeBlakeHash": "0x06d90e0855e17f1c50882b4029ef030903c2e3b1f4d2ba8c69777fb8878a4f48",
22002200
"evmDeployedBytecodeLength": 4407
22012201
},
22022202
{

_typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ FOT = "FOT"
2525
ue = "ue"
2626
# Valid Rust module naming convention for constants
2727
consts = "consts"
28+
IZ = "IZ"

cspell.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"version": "0.2",
3+
"language": "en",
4+
"words": [
5+
"zksync",
6+
"Ksync",
7+
"Bridgehub",
8+
"bridgehub",
9+
"keccak",
10+
"multicall",
11+
"Multicall",
12+
"Timelock",
13+
"Pubdata",
14+
"pubdata",
15+
"chainid",
16+
"Rollup",
17+
"solhint"
18+
],
19+
"ignorePaths": ["node_modules/**", "**/node_modules/**"]
20+
}

l1-contracts/contracts/core/message-root/L1MessageRoot.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ contract L1MessageRoot is MessageRootBase {
5050
_disableInitializers();
5151
}
5252

53-
/// @dev Initializes a contract for later use. Expected to be used in the proxy on L1, on L2 it is a system contract without a proxy.
53+
/// @dev Initializes a contract for later use. Expected to be used in the proxy on L1, on L2 it is a built-in contract without a proxy.
5454
function initialize() external reinitializer(2) {
5555
_initialize();
5656
uint256[] memory allZKChains = IBridgehubBase(BRIDGE_HUB).getAllZKChainChainIDs();

l1-contracts/contracts/script-interfaces/IAdminFunctions.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ interface IAdminFunctions {
4343
uint256 timestamp
4444
) external;
4545

46+
function upgradeChainFromCTM(address chainAddress, address adminAddr, address accessControlRestriction) external;
47+
4648
function makePermanentRollup(ChainAdmin chainAdmin, address target) external;
4749

4850
function updateValidator(
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity 0.8.28;
3+
4+
import {Diamond} from "../../libraries/Diamond.sol";
5+
6+
/// @title IDiamondCut Interface
7+
/// @dev Interface for the diamondCut function used in zkstack CLI
8+
interface IDiamondCut {
9+
/// @notice Execute diamond cut
10+
/// @param _diamondCut The diamond cut data containing facet cuts, init address, and init calldata
11+
function diamondCut(Diamond.DiamondCutData memory _diamondCut) external;
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// SPDX-License-Identifier: MIT
2+
3+
pragma solidity ^0.8.21;
4+
5+
import {IVerifierV2} from "./IVerifierV2.sol";
6+
import {IVerifier} from "./IVerifier.sol";
7+
8+
/// @notice Interface for EraDualVerifier sub-verifier getters
9+
interface IEraDualVerifier {
10+
function FFLONK_VERIFIER() external view returns (IVerifierV2);
11+
function PLONK_VERIFIER() external view returns (IVerifier);
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// SPDX-License-Identifier: MIT
2+
3+
pragma solidity ^0.8.21;
4+
5+
import {IVerifierV2} from "./IVerifierV2.sol";
6+
import {IVerifier} from "./IVerifier.sol";
7+
8+
/// @notice Interface for ZKsyncOSDualVerifier sub-verifier getters
9+
interface IZKsyncOSDualVerifier {
10+
function fflonkVerifiers(uint32 version) external view returns (IVerifierV2);
11+
function plonkVerifiers(uint32 version) external view returns (IVerifier);
12+
}

l1-contracts/contracts/state-transition/verifiers/EraDualVerifier.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ pragma solidity 0.8.28;
44

55
import {IVerifierV2} from "../chain-interfaces/IVerifierV2.sol";
66
import {IVerifier} from "../chain-interfaces/IVerifier.sol";
7+
import {IEraDualVerifier} from "../chain-interfaces/IEraDualVerifier.sol";
78
import {EmptyProofLength, UnknownVerifierType} from "../../common/L1ContractErrors.sol";
89

910
/// @title Dual Verifier
@@ -13,7 +14,7 @@ import {EmptyProofLength, UnknownVerifierType} from "../../common/L1ContractErro
1314
/// to the correct verifier based on the provided proof type. It reuses the same interface as on the original `Verifier`
1415
/// contract, while abusing on of the fields (`_recursiveAggregationInput`) for proof verification type. The contract is
1516
/// needed for the smooth transition from PLONK based verifier to the FFLONK verifier.
16-
contract EraDualVerifier is IVerifier {
17+
contract EraDualVerifier is IVerifier, IEraDualVerifier {
1718
/// @notice The latest FFLONK verifier contract.
1819
IVerifierV2 public immutable FFLONK_VERIFIER;
1920

l1-contracts/contracts/state-transition/verifiers/EraTestnetVerifier.sol

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ pragma solidity 0.8.28;
55
import {EraDualVerifier} from "./EraDualVerifier.sol";
66
import {IVerifierV2} from "../chain-interfaces/IVerifierV2.sol";
77
import {IVerifier} from "../chain-interfaces/IVerifier.sol";
8+
import {IEraDualVerifier} from "../chain-interfaces/IEraDualVerifier.sol";
89

910
/// @author Matter Labs
1011
/// @custom:security-contact security@matterlabs.dev
1112
/// @notice Modified version of the main verifier contract for the testnet environment
1213
/// @dev This contract is used to skip the zkp verification for the testnet environment.
1314
/// If the proof is not empty, it will verify it using the main verifier contract,
1415
/// otherwise, it will skip the verification.
15-
contract EraTestnetVerifier is IVerifier {
16+
contract EraTestnetVerifier is IVerifier, IEraDualVerifier {
1617
EraDualVerifier public immutable DUAL_VERIFIER;
1718
bool public constant IS_TESTNET_VERIFIER = true;
1819

@@ -38,4 +39,16 @@ contract EraTestnetVerifier is IVerifier {
3839
function verificationKeyHash() external view override returns (bytes32) {
3940
return DUAL_VERIFIER.verificationKeyHash();
4041
}
42+
43+
/// @inheritdoc IEraDualVerifier
44+
// solhint-disable-next-line func-name-mixedcase
45+
function FFLONK_VERIFIER() external view override returns (IVerifierV2) {
46+
return DUAL_VERIFIER.FFLONK_VERIFIER();
47+
}
48+
49+
/// @inheritdoc IEraDualVerifier
50+
// solhint-disable-next-line func-name-mixedcase
51+
function PLONK_VERIFIER() external view override returns (IVerifier) {
52+
return DUAL_VERIFIER.PLONK_VERIFIER();
53+
}
4154
}

0 commit comments

Comments
 (0)