Skip to content

Draft: Initial version for precommits & role-based validator timelock #1461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 23 commits into
base: draft-v29
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d9a785b
initial version
StanislavBreadless May 8, 2025
f9afe0b
minor fixes
StanislavBreadless May 8, 2025
fac1786
Merge branch 'draft-v29' into sb-precommit-support-proposal
StanislavBreadless May 8, 2025
f539ed4
doc comments
StanislavBreadless May 9, 2025
4309ada
make compile
StanislavBreadless May 9, 2025
dc74a2f
fix some things
StanislavBreadless May 9, 2025
64de360
amend scripts for server to work
StanislavBreadless May 12, 2025
eda5aae
fmt for server
StanislavBreadless May 12, 2025
55996d0
fix some comments + fmt
StanislavBreadless May 12, 2025
b44eb69
add hint as asked
StanislavBreadless May 12, 2025
d304e6d
fmt
StanislavBreadless May 12, 2025
53ab324
Add precommit to IExecutor
Deniallugo May 13, 2025
04808e0
test: executor operations gas test (#1477)
ly0va May 20, 2025
ab8cda7
Update contarct hashes
Deniallugo May 22, 2025
f7761ee
Precommit proposal optimizations (#1494)
StanislavBreadless May 27, 2025
b1d8581
Update l1-contracts/contracts/state-transition/AccessControlEnumerabl…
StanislavBreadless May 28, 2025
abdb5ee
Update l1-contracts/contracts/state-transition/AccessControlEnumerabl…
StanislavBreadless May 28, 2025
def5958
Update l1-contracts/contracts/state-transition/ValidatorTimelock.sol
StanislavBreadless May 28, 2025
a26f4cc
Update l1-contracts/contracts/state-transition/chain-deps/facets/Exec…
StanislavBreadless May 28, 2025
659fcf6
respond to comments
StanislavBreadless May 28, 2025
cc80870
Merge remote-tracking branch 'origin/sb-precommit-support-proposal' i…
StanislavBreadless May 28, 2025
aadedba
fix some comments
StanislavBreadless May 28, 2025
128f874
lints & compile
StanislavBreadless May 28, 2025
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
26 changes: 15 additions & 11 deletions .github/workflows/l1-contracts-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
- name: Install foundry-zksync
run: |
mkdir ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-27360d4c8d12beddbb730dae07ad33a206b38f4b/foundry_nightly_linux_amd64.tar.gz
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.15/foundry_zksync_v0.0.15_linux_amd64.tar.gz
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to make it a workflow-level environment variable? So that we have one source or truth regarding the version.

Another option which might be even better is to have a file in the repo which specifies the exact commit or version of tooling one should use on the branch. This way tooling can be consistent across local and CI runs. I had this issue of something not working just because I have a wrong tooling version and it's a pain to figure out which version to install.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, but this is out of scope of this PR

tar zxf foundry_zksync_v0.0.15_linux_amd64.tar.gz -C ./foundry-zksync
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
echo "$PWD/foundry-zksync" >> $GITHUB_PATH

Expand Down Expand Up @@ -149,8 +149,8 @@ jobs:
- name: Install foundry-zksync
run: |
mkdir ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-27360d4c8d12beddbb730dae07ad33a206b38f4b/foundry_nightly_linux_amd64.tar.gz
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.15/foundry_zksync_v0.0.15_linux_amd64.tar.gz
tar zxf foundry_zksync_v0.0.15_linux_amd64.tar.gz -C ./foundry-zksync
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
echo "$PWD/foundry-zksync" >> $GITHUB_PATH

Expand All @@ -173,7 +173,11 @@ jobs:

- name: Run tests
working-directory: ./l1-contracts
run: FOUNDRY_PROFILE=default yarn test:foundry
run: yarn test:foundry

- name: Check gas snapshots
working-directory: ./l1-contracts
run: forge test --match-test MeasureGas --gas-snapshot-check=true

test-foundry-zksync:
needs: [build, lint]
Expand All @@ -194,8 +198,8 @@ jobs:
- name: Install foundry-zksync
run: |
mkdir ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-27360d4c8d12beddbb730dae07ad33a206b38f4b/foundry_nightly_linux_amd64.tar.gz
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.15/foundry_zksync_v0.0.15_linux_amd64.tar.gz
tar zxf foundry_zksync_v0.0.15_linux_amd64.tar.gz -C ./foundry-zksync
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
echo "$PWD/foundry-zksync" >> $GITHUB_PATH

Expand All @@ -221,7 +225,7 @@ jobs:

- name: Run tests
working-directory: ./l1-contracts
run: FOUNDRY_PROFILE=default yarn test:zkfoundry
run: yarn test:zkfoundry

check-verifier-generator-l1:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -301,8 +305,8 @@ jobs:
- name: Install foundry-zksync
run: |
mkdir ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-27360d4c8d12beddbb730dae07ad33a206b38f4b/foundry_nightly_linux_amd64.tar.gz
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.15/foundry_zksync_v0.0.15_linux_amd64.tar.gz
tar zxf foundry_zksync_v0.0.15_linux_amd64.tar.gz -C ./foundry-zksync
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
echo "$PWD/foundry-zksync" >> $GITHUB_PATH

Expand All @@ -324,7 +328,7 @@ jobs:
system-contracts/zkout

- name: Run coverage
run: FOUNDRY_PROFILE=default yarn test:foundry && FOUNDRY_PROFILE=default yarn coverage:foundry --report summary --report lcov
run: yarn test:foundry && yarn coverage:foundry --report summary --report lcov

# Installing the specific version of `lcov` because of
# the `genhtml: ERROR: line ... of ... has branchcov but no linecov data` error.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/l1-contracts-foundry-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
- name: Install foundry-zksync
run: |
mkdir ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-27360d4c8d12beddbb730dae07ad33a206b38f4b/foundry_nightly_linux_amd64.tar.gz
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.15/foundry_zksync_v0.0.15_linux_amd64.tar.gz
tar zxf foundry_zksync_v0.0.15_linux_amd64.tar.gz -C ./foundry-zksync
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/l2-contracts-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- name: Install foundry-zksync
run: |
mkdir ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-27360d4c8d12beddbb730dae07ad33a206b38f4b/foundry_nightly_linux_amd64.tar.gz
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.15/foundry_zksync_v0.0.15_linux_amd64.tar.gz
tar zxf foundry_zksync_v0.0.15_linux_amd64.tar.gz -C ./foundry-zksync
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
echo "$PWD/foundry-zksync" >> $GITHUB_PATH

Expand Down Expand Up @@ -109,8 +109,8 @@ jobs:
- name: Install foundry-zksync
run: |
mkdir ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-27360d4c8d12beddbb730dae07ad33a206b38f4b/foundry_nightly_linux_amd64.tar.gz
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.15/foundry_zksync_v0.0.15_linux_amd64.tar.gz
tar zxf foundry_zksync_v0.0.15_linux_amd64.tar.gz -C ./foundry-zksync
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
echo "$PWD/foundry-zksync" >> $GITHUB_PATH

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/system-contracts-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- name: Install foundry-zksync
run: |
mkdir ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-5353a10345187933527fbad213d8c4f6500a775c/foundry_nightly_linux_amd64.tar.gz
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/foundry-zksync-v0.0.15/foundry_zksync_v0.0.15_linux_amd64.tar.gz
tar zxf foundry_zksync_v0.0.15_linux_amd64.tar.gz -C ./foundry-zksync
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
echo "$PWD/foundry-zksync" >> $GITHUB_PATH

Expand Down
2 changes: 1 addition & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"check-send-result": "error",
"compiler-version": ["error", "^0.8.0"],
"const-name-snakecase": "off",
"contract-name-camelcase": "off",
"contract-name-capwords": "off",
"gas-calldata-parameters": "error",
"gas-custom-errors": "error",
"gas-increment-by-one": "error",
Expand Down
Loading