Skip to content

Commit

Permalink
merge release v25 into dev (#1072)
Browse files Browse the repository at this point in the history
Signed-off-by: Danil <[email protected]>
Co-authored-by: Danil <[email protected]>
Co-authored-by: Vlad Bochok <[email protected]>
Co-authored-by: Grzegorz Prusak <[email protected]>
Co-authored-by: Bence Haromi <[email protected]>
Co-authored-by: Moshe Shababo <[email protected]>
Co-authored-by: Akosh Farkash <[email protected]>
Co-authored-by: Bruno França <[email protected]>
Co-authored-by: Roman Brodetski <[email protected]>
Co-authored-by: vladbochok <[email protected]>
Co-authored-by: Stanislav Bezkorovainyi <[email protected]>
Co-authored-by: otani <[email protected]>
Co-authored-by: Ivan Schasny <[email protected]>
Co-authored-by: Ivan Schasny <[email protected]>
Co-authored-by: Vladislav Volosnikov <[email protected]>
  • Loading branch information
15 people authored Nov 19, 2024
1 parent 38a8bb8 commit df328ca
Show file tree
Hide file tree
Showing 46 changed files with 963 additions and 1,535 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ inputs.commit }}
submodules: recursive

- name: Install foundry-zksync
run: |
mkdir ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly/foundry_nightly_linux_amd64.tar.gz
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
- name: Use Node.js
uses: actions/setup-node@v3
Expand All @@ -35,11 +44,24 @@ jobs:
yarn
echo "release_tag=${{ inputs.prefix }}-${{ inputs.commit }}" >> $GITHUB_OUTPUT
- name: Build contracts
- name: Build l1 contracts
working-directory: l1-contracts
run: |
forge build
- name: Build l2 contracts
working-directory: l2-contracts
run: |
forge build --zksync --zk-enable-eravm-extensions
- name: Build system-contracts
working-directory: system-contracts
run: |
yarn l1 build
yarn l2 build
yarn sc build
yarn install
yarn preprocess:system-contracts
forge build --zksync --zk-enable-eravm-extensions
yarn preprocess:bootloader
forge build --zksync --zk-enable-eravm-extensions
- name: Prepare artifacts
run: |
Expand Down
58 changes: 38 additions & 20 deletions .github/workflows/l1-contracts-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,42 @@ jobs:
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install foundry-zksync
run: |
mkdir ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly/foundry_nightly_linux_amd64.tar.gz
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.18.0
cache: yarn

- name: Install dependencies
run: yarn

- name: Build artifacts
run: yarn l1 build
- name: Build l1 contracts
working-directory: l1-contracts
run: |
forge build
- name: Build L2 artifacts
run: yarn l2 build
- name: Build l2 contracts
working-directory: l2-contracts
run: |
forge build --zksync --zk-enable-eravm-extensions
- name: Create cache
uses: actions/cache/save@v3
with:
key: artifacts-l1-${{ github.sha }}
path: |
l1-contracts/artifacts
l1-contracts/cache
l1-contracts/typechain
l2-contracts/artifacts-zk
l2-contracts/cache-zk
l2-contracts/typechain
l1-contracts/cache-forge
l1-contracts/out
l2-contracts/cache-forge
l2-contracts/zkout
lint:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -72,15 +81,19 @@ jobs:
with:
submodules: recursive

- name: Use Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.18.0
cache: yarn

- name: Install foundry-zksync
run: |
mkdir ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly/foundry_nightly_linux_amd64.tar.gz
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
- name: Install dependencies
run: yarn

Expand Down Expand Up @@ -128,7 +141,7 @@ jobs:
l2-contracts/typechain
- name: Run tests
run: yarn l1 test --no-compile
run: yarn l1 test

check-verifier-generator:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -164,15 +177,20 @@ jobs:
with:
submodules: recursive

- name: Use Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.18.0
cache: yarn

- name: Install foundry-zksync
run: |
mkdir ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly/foundry_nightly_linux_amd64.tar.gz
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
- name: Install dependencies
run: yarn

Expand Down
34 changes: 23 additions & 11 deletions .github/workflows/l2-contracts-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ jobs:
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install foundry-zksync
run: |
mkdir ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly/foundry_nightly_linux_amd64.tar.gz
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
- name: Use Node.js
uses: actions/setup-node@v3
Expand All @@ -20,23 +30,25 @@ jobs:
- name: Install dependencies
run: yarn

- name: Build L1 artifacts
run: yarn l1 build
- name: Build l1 contracts
working-directory: l1-contracts
run: |
forge build
- name: Build L2 artifacts
run: yarn l2 build
- name: Build l2 contracts
working-directory: l2-contracts
run: |
forge build --zksync --zk-enable-eravm-extensions
- name: Create cache
uses: actions/cache/save@v3
with:
key: artifacts-l2-${{ github.sha }}
key: artifacts-l1-${{ github.sha }}
path: |
l1-contracts/artifacts
l1-contracts/cache
l1-contracts/typechain
l2-contracts/artifacts-zk
l2-contracts/cache-zk
l2-contracts/typechain
l1-contracts/cache-forge
l1-contracts/out
l2-contracts/cache-forge
l2-contracts/zkout
lint:
runs-on: ubuntu-latest
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/slither.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,18 @@ jobs:
with:
python-version: 3.8

- name: Install foundry-zksync
run: |
mkdir ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly/foundry_nightly_linux_amd64.tar.gz
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
- name: Install Slither
run: |
pip install slither-analyzer
- name: Use Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Remove non-compiled files
run: |
rm -rf ./l1-contracts/contracts/state-transition/utils/
Expand All @@ -43,6 +48,6 @@ jobs:
rm -rf ./l1-contracts/contracts/dev-contracts/test/VerifierRecursiveTest.sol
- name: Run Slither
working-directory: l1-contracts
run: |
cd l1-contracts
slither --config ./slither.config.json .
66 changes: 27 additions & 39 deletions .github/workflows/system-contracts-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,45 @@ jobs:
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install foundry-zksync
run: |
mkdir ./foundry-zksync
curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly/foundry_nightly_linux_amd64.tar.gz
tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
echo "$PWD/foundry-zksync" >> $GITHUB_PATH
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.18.0
cache: yarn

- name: Install dependencies
run: yarn

- name: Build artifacts
run: yarn sc build
working-directory: system-contracts
run: |
yarn install
yarn preprocess:system-contracts
forge build --zksync --zk-enable-eravm-extensions
yarn preprocess:bootloader
forge build --zksync --zk-enable-eravm-extensions
yarn build
- name: Create cache
uses: actions/cache/save@v3
with:
key: artifacts-system-${{ github.sha }}
path: |
system-contracts/zkout
system-contracts/cache-forge
system-contracts/bootloader/build
system-contracts/artifacts-zk
system-contracts/cache-zk
system-contracts/typechain
system-contracts/contracts-preprocessed
system-contracts/bootloader/build
lint:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -72,11 +88,13 @@ jobs:
fail-on-cache-miss: true
key: artifacts-system-${{ github.sha }}
path: |
system-contracts/zkout
system-contracts/cache-forge
system-contracts/bootloader/build
system-contracts/artifacts-zk
system-contracts/cache-zk
system-contracts/typechain
system-contracts/contracts-preprocessed
system-contracts/bootloader/build
- name: Run bootloader tests
run: |
Expand Down Expand Up @@ -111,47 +129,17 @@ jobs:
fail-on-cache-miss: true
key: artifacts-system-${{ github.sha }}
path: |
system-contracts/zkout
system-contracts/cache-forge
system-contracts/bootloader/build
system-contracts/artifacts-zk
system-contracts/cache-zk
system-contracts/typechain
system-contracts/contracts-preprocessed
system-contracts/bootloader/build
- name: Run tests
run: yarn sc test

- name: Print output logs of era_test_node
if: always()
run: cat era_test_node.log

check-hashes:
needs: [build]
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.18.0
cache: yarn

- name: Install dependencies
run: yarn

- name: Restore artifacts cache
uses: actions/cache/restore@v3
with:
fail-on-cache-miss: true
key: artifacts-system-${{ github.sha }}
path: |
system-contracts/artifacts-zk
system-contracts/cache-zk
system-contracts/typechain
system-contracts/contracts-preprocessed
system-contracts/bootloader/build
- name: Check hashes
run: yarn sc calculate-hashes:check
1 change: 1 addition & 0 deletions .solhintignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ l1-contracts-foundry/lib
# l2-contracts
l2-contracts/cache-zk
l2-contracts/node_modules
l2-contracts/contracts/dev-contracts

# system-contracts
system-contracts/contracts/openzeppelin
Expand Down
Loading

0 comments on commit df328ca

Please sign in to comment.