Skip to content

Commit 67affae

Browse files
authored
chore: add zkstack-out CI check (#1977)
# What ❔ Adds a CI check to ensure that `l1-contracts/zkstack-out` is kept up to date, plus some other cosmetic fixes This is a sister PR to matter-labs/zksync-era#4616 <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated.
1 parent 807df26 commit 67affae

File tree

14 files changed

+774
-827
lines changed

14 files changed

+774
-827
lines changed

.github/workflows/l1-contracts-ci.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,17 @@ jobs:
4343
- name: Build l1 contracts
4444
working-directory: l1-contracts
4545
run: |
46+
rm -rf zkstack-out
4647
yarn build:foundry
4748
49+
# Fail if regenerated zkstack-out differs from what was committed
50+
if [ -n "$(git status --porcelain -- zkstack-out)" ]; then
51+
echo "::error::l1-contracts/zkstack-out is out of date. Run 'cd l1-contracts && yarn build:foundry' and commit the changes."
52+
git --no-pager status --porcelain -- zkstack-out
53+
git --no-pager diff -- zkstack-out || true
54+
exit 1
55+
fi
56+
4857
- name: Build l2 contracts
4958
working-directory: l2-contracts
5059
run: |
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.21;
3+
4+
/// @title IGatewayVotePreparation
5+
/// @notice Interface for GatewayVotePreparation.s.sol script
6+
/// @dev This interface ensures selector visibility for GatewayVotePreparation functions
7+
interface IGatewayVotePreparation {
8+
function run(address bridgehubProxy, uint256 ctmRepresentativeChainId) external;
9+
}

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

Lines changed: 0 additions & 38 deletions
This file was deleted.

l1-contracts/contracts/state-transition/IChainTypeManager.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ interface IChainTypeManager {
125125

126126
function validatorTimelock() external view returns (address);
127127

128+
function validatorTimelockPostV29() external view returns (address);
129+
128130
function initialize(ChainTypeManagerInitializeData calldata _initializeData) external;
129131

130132
function setLegacyValidatorTimelock(address _validatorTimelock) external;

l1-contracts/scripts/copy-to-zkstack-out.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,16 @@ const REQUIRED_CONTRACTS = [
1212
"L1Bridgehub.sol",
1313
"MessageRootBase.sol",
1414
"IZKChain.sol",
15-
"IChainTypeManagerForZKStack.sol",
16-
"IValidatorTimelockForZKStack.sol",
15+
"IValidatorTimelock.sol",
1716
"IChainAssetHandler.sol",
1817
"IChainTypeManager.sol",
1918
"IAdmin.sol",
2019
"IChainAdminOwnable.sol",
2120
"IRegisterZKChain.sol",
2221
"IDeployL2Contracts.sol",
23-
"DeployPaymaster.s.sol",
2422
"IDeployPaymaster.sol",
25-
"GatewayVotePreparation.s.sol",
23+
"IGatewayVotePreparation.sol",
2624
"AdminFunctions.s.sol",
27-
"EnableEvmEmulator.s.sol",
2825
"DeployGatewayTransactionFilterer.s.sol",
2926
"IAdminFunctions.sol",
3027
"IEnableEvmEmulator.sol",

l1-contracts/selectors

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4562,6 +4562,8 @@ IChainTypeManager
45624562
|----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------|
45634563
| Function | validatorTimelock() | 0xe66c8c44 |
45644564
|----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------|
4565+
| Function | validatorTimelockPostV29() | 0xef9955bc |
4566+
|----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------|
45654567
| Event | GenesisUpgrade(address,(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256[4],bytes,bytes,uint256[],bytes,bytes),uint256) | 0x778b7f95aad9610955002f243aabbbf9546bb6e792f7b3b89dab86b4f210e30f |
45664568
|----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------|
45674569
| Event | NewAdmin(address,address) | 0xf9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc |
@@ -4841,6 +4843,14 @@ IGatewayUtils
48414843
| Function | finishMigrateChainToGateway(address,bytes,uint256,uint256,bytes32,uint256,uint256,uint16,bytes32[],uint8) | 0x59067261 |
48424844
╰----------+-----------------------------------------------------------------------------------------------------------+------------╯
48434845

4846+
IGatewayVotePreparation
4847+
4848+
╭----------+----------------------+------------╮
4849+
| Type | Signature | Selector |
4850+
+==============================================+
4851+
| Function | run(address,uint256) | 0x381fd190 |
4852+
╰----------+----------------------+------------╯
4853+
48444854
IGetters
48454855

48464856
╭----------+-------------------------------------------+------------╮
@@ -6319,26 +6329,6 @@ IValidatorTimelock
63196329
| Event | ReportCommittedBatchRangeZKsyncOS(uint64,uint64,uint64) | 0xa2ac105688fc09c2584d6b2e79dd0fc14e6003a20c62ac45aa858e8ed12bb7bb |
63206330
╰----------+------------------------------------------------------------------+--------------------------------------------------------------------╯
63216331

6322-
IValidatorTimelockForZKStack
6323-
6324-
╭----------+--------------------------------------------+------------╮
6325-
| Type | Signature | Selector |
6326-
+====================================================================+
6327-
| Function | COMMITTER_ROLE() | 0x1a7c3f73 |
6328-
|----------+--------------------------------------------+------------|
6329-
| Function | EXECUTOR_ROLE() | 0x07bd0265 |
6330-
|----------+--------------------------------------------+------------|
6331-
| Function | PRECOMMITTER_ROLE() | 0xa86d67c5 |
6332-
|----------+--------------------------------------------+------------|
6333-
| Function | PROVER_ROLE() | 0xdc9a4ef6 |
6334-
|----------+--------------------------------------------+------------|
6335-
| Function | hasRole(uint256,bytes32,address) | 0x119345aa |
6336-
|----------+--------------------------------------------+------------|
6337-
| Function | hasRoleForChainId(uint256,bytes32,address) | 0x8e80aaf6 |
6338-
|----------+--------------------------------------------+------------|
6339-
| Function | validators(uint256,address) | 0x91b19874 |
6340-
╰----------+--------------------------------------------+------------╯
6341-
63426332
IVerifier
63436333

63446334
╭----------+-----------------------------+------------╮

l1-contracts/zkstack-out/DeployPaymaster.s.sol/DeployPaymaster.json

Lines changed: 0 additions & 55 deletions
This file was deleted.

l1-contracts/zkstack-out/EnableEvmEmulator.s.sol/EnableEvmEmulator.json

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)