Skip to content

Commit

Permalink
Merge branch 'main' of github.com:lambdaclass/zksync-era into feat_va…
Browse files Browse the repository at this point in the history
…lidium_pubdata_abstraction
  • Loading branch information
ilitteri committed Feb 3, 2024
2 parents 0f4cffe + 5ec41b2 commit 0ce5616
Show file tree
Hide file tree
Showing 511 changed files with 15,825 additions and 16,415 deletions.
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via `zk fmt` and `zk lint`.
- [ ] Spellcheck has been run via `zk spellcheck`.
- [ ] Linkcheck has been run via `zk linkcheck`.
4 changes: 2 additions & 2 deletions .github/release-please/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk/zksync-rs": "0.4.0",
"core": "20.1.0",
"prover": "10.1.0"
"core": "20.5.1",
"prover": "11.0.0"
}
6 changes: 2 additions & 4 deletions .github/workflows/build-core-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
- server-v2
- external-node
- contract-verifier
- cross-external-nodes-checker
- snapshots-creator
platforms:
- linux/amd64
Expand Down Expand Up @@ -74,7 +73,8 @@ jobs:
ci_run yarn zk build
ci_run curl -LO https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_2\^26.key
- name: login to Docker registries
- name: Login to Docker registries
if: ${{ inputs.action == 'push' }}
run: |
ci_run docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
ci_run gcloud auth configure-docker us-docker.pkg.dev -q
Expand Down Expand Up @@ -108,8 +108,6 @@ jobs:
platform: linux/amd64,linux/arm64
- name: contract-verifier
platform: linux/amd64
- name: cross-external-nodes-checker
platform: linux/amd64
- name: snapshots-creator
platform: linux/amd64
env:
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Check Links

on:
push:
branches:
- main
pull_request:
merge_group:

env:
CARGO_TERM_COLOR: always

jobs:
linkcheck:
runs-on: [matterlabs-ci-runner]
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
submodules: "recursive"
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Setup environment
run: |
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
- name: Start services
run: |
docker compose up -d zk
- name: Build zk
run: |
ci_run zk
- name: Run zk linkcheck
run: |
ci_run zk linkcheck
37 changes: 37 additions & 0 deletions .github/workflows/ci-common-reusable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Workflow template for CI jobs to be ran on both Prover and Core Components
on:
workflow_call:

jobs:
build:
runs-on: [matterlabs-ci-runner]
env:
RUNNER_COMPOSE_FILE: "docker-compose-runner-nightly.yml"

steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
submodules: "recursive"

- name: Setup environment
run: |
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
- name: Start services
run: |
docker-compose -f ${RUNNER_COMPOSE_FILE} pull
mkdir -p ./volumes/postgres
docker-compose -f ${RUNNER_COMPOSE_FILE} up --build -d zk postgres
ci_run sccache --start-server
- name: Init
run: |
ci_run zk
ci_run zk db setup
# This does both linting and "building". We're using `zk lint prover` as it's common practice within our repo
# `zk lint prover` = cargo clippy, which does cargo check behind the scenes, which is a lightweight version of cargo build
- name: Lints
run: ci_run zk lint prover
33 changes: 21 additions & 12 deletions .github/workflows/ci-core-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,13 @@ jobs:
ci_run sccache --show-stats
ci_run cat /tmp/sccache_log.txt
integration:
runs-on: [matterlabs-ci-runner]
strategy:
matrix:
consensus: [false,true]
env:
SERVER_COMPONENTS: "api,tree,eth,state_keeper,housekeeper,basic_witness_input_producer${{ matrix.consensus && ',consensus' || '' }}"

runs-on: [matterlabs-ci-runner]
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
Expand Down Expand Up @@ -179,7 +184,7 @@ jobs:
# `sleep 5` because we need to wait until server started properly
- name: Run server
run: |
ci_run zk server &>server.log &
ci_run zk server --components=$SERVER_COMPONENTS &>server.log &
ci_run sleep 5
- name: Run contract verifier
Expand All @@ -197,7 +202,7 @@ jobs:
run: |
ci_run pkill zksync_server || true
ci_run sleep 2
ci_run zk test i revert
ENABLE_CONSENSUS=${{ matrix.consensus }} PASSED_ENV_VARS=ENABLE_CONSENSUS ci_run zk test i revert
# This test should be the last one as soon as it
# finished bootloader will be different
Expand Down Expand Up @@ -230,7 +235,14 @@ jobs:
ci_run cat /tmp/sccache_log.txt
external-node:
strategy:
matrix:
consensus: [false,true]
runs-on: [matterlabs-ci-runner]

env:
SERVER_COMPONENTS: "api,tree,eth,state_keeper,housekeeper,basic_witness_input_producer${{ matrix.consensus && ',consensus' || '' }}"
EXT_NODE_FLAGS: "${{ matrix.consensus && '--enable-consensus' || '' }}"

steps:
- name: Checkout code # Checks out the repository under $GITHUB_WORKSPACE, so the job can access it.
Expand Down Expand Up @@ -291,38 +303,35 @@ jobs:
# `sleep 30` because we need to wait until server started properly
- name: Run server
run: |
ci_run zk server &>server.log &
ci_run zk server --components=$SERVER_COMPONENTS &>server.log &
ci_run sleep 30
- name: Run external node
run: |
ci_run zk env ext-node-docker
ci_run zk db setup
ci_run zk external-node &>ext-node.log &
ci_run zk external-node $EXT_NODE_FLAGS &>ext-node.log &
ci_run sleep 30
# TODO(PLA-653): Restore bridge tests for EN.
- name: Integration tests
run: ci_run zk test i server --testPathIgnorePatterns 'contract-verification|custom-erc20-bridge|snapshots-creator'

- name: Run Cross EN Checker
run: ci_run zk run cross-en-checker

- name: Run revert test
run: |
ci_run zk env
ci_run zk env docker
ci_run pkill zksync_server || true
ci_run sleep 2
ci_run zk env
ci_run zk test i revert
ENABLE_CONSENSUS=${{ matrix.consensus }} PASSED_ENV_VARS=ENABLE_CONSENSUS ci_run zk test i revert
# Check that the rollback was performed on the EN
ci_run sleep 20
ci_run grep -q 'Rollback successfully completed' ext-node.log
# Restart the EN
ci_run zk server &>>server.log &
ci_run zk server --components=$SERVER_COMPONENTS &>>server.log &
ci_run sleep 30
ZKSYNC_ENV=ext-node-docker ci_run zk external-node &>>ext-node.log &
ZKSYNC_ENV=ext-node-docker ci_run zk external-node $EXT_NODE_FLAGS &>>ext-node.log &
ci_run sleep 30
- name: Run upgrade test
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/ci-prover-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ jobs:
- name: Formatting
run: ci_run bash -c "cd prover && cargo fmt --check"

- name: Lints
run: ci_run zk lint prover

unit-tests:
runs-on: [matterlabs-ci-runner]
env:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
- 'core/**'
- '!core/CHANGELOG.md'
- 'docker/contract-verifier/**'
- 'docker/cross-external-nodes-checker/**'
- 'docker/external-node/**'
- 'docker/server/**'
- '.github/workflows/build-core-template.yml'
Expand Down Expand Up @@ -96,6 +95,13 @@ jobs:
name: CI for Docs
uses: ./.github/workflows/ci-docs-reusable.yml

# What needs to be ran for both core and prover
ci-for-common:
needs: changed_files
if: ${{ (needs.changed_files.outputs.prover == 'true' || needs.changed_files.outputs.core == 'true' || needs.changed_files.outputs.all == 'true') && !contains(github.ref_name, 'release-please--branches') }}
name: CI for Common Components (prover or core)
uses: ./.github/workflows/ci-common-reusable.yml

build-contracts:
name: Build contracts
needs: changed_files
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Cargo.lock
!/etc/env/docker.toml
!/etc/env/ext-node.toml
!/etc/env/ext-node-docker.toml
!/etc/env/consensus_config.json
!/etc/env/en_consensus_config.json
/etc/tokens/localhost.json
/etc/zksolc-bin/*
/etc/zkvyper-bin/*
Expand Down
Loading

0 comments on commit 0ce5616

Please sign in to comment.