Skip to content
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

fix(da-eigen-implementation-m0): merge main #316

Draft
wants to merge 18 commits into
base: da-eigen-implementation-m0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 20 additions & 5 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,29 @@
RED='\033[0;31m'
NC='\033[0m' # No Color

# Common prompts
INSTALL_PROPT="Please install ZK Stack CLI using zkstackup from https://github.com/matter-labs/zksync-era/tree/main/zkstack_cli/zkstackup"
FORMAT_PROMPT="Please format the code via 'zkstack dev fmt', cannot push unformatted code"

# Check that prettier formatting rules are not violated.
if which zk_supervisor >/dev/null; then
if ! zk_supervisor fmt --check; then
if which zkstack >/dev/null; then
if ! zkstack dev fmt --check; then
echo -e "${RED}Push error!${NC}"
echo "Please format the code via 'zks fmt', cannot push unformatted code"
echo -e "${FORMAT_PROMPT}"
exit 1
fi
else
echo "Please install zk_toolbox using zkup from https://github.com/matter-labs/zksync-era/tree/main/zk_toolbox/zkup, and then run ./bin/zkt from the zksync-era repository."
exit 1
if which zk_supervisor >/dev/null; then
echo -e "${RED}WARNING: zkup, zk_inception/zki, and zk_supervisor/zks are DEPRECATED.${NC}"
echo -e "${RED}${INSTALL_PROPT}${NC}"

if ! zk_supervisor fmt --check; then
echo -e "${RED}Push error!${NC}"
echo -e "${FORMAT_PROMPT}"
exit 1
fi
else
echo -e "${INSTALL_PROPT}"
exit 1
fi
fi
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
- [ ] 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.
- [ ] Code has been formatted via `zk_supervisor fmt` and `zk_supervisor lint`.
- [ ] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`.
4 changes: 2 additions & 2 deletions .github/release-please/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"release-type": "simple",
"component": "prover"
},
"zk_toolbox": {
"zkstack_cli": {
"release-type": "simple",
"component": "zk_toolbox",
"component": "zkstack_cli",
"plugins": [
"cargo-workspace"
]
Expand Down
6 changes: 3 additions & 3 deletions .github/release-please/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"core": "24.28.0",
"prover": "16.5.0",
"zk_toolbox": "0.1.2"
"core": "25.0.0",
"prover": "17.0.0",
"zkstack_cli": "0.1.2"
}
9 changes: 6 additions & 3 deletions .github/workflows/build-contract-verifier-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ jobs:
- name: start-services
run: |
echo "IMAGE_TAG_SUFFIX=${{ env.IMAGE_TAG_SUFFIX }}" >> .env
mkdir -p ./volumes/postgres
run_retried docker compose pull zk postgres
docker compose up -d zk postgres
ci_run pre_download_compilers.sh
Expand All @@ -113,15 +112,19 @@ jobs:
ci_run git config --global --add safe.directory /usr/src/zksync/sdk/binaryen
ci_run git config --global --add safe.directory /usr/src/zksync/contracts/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts
ci_run ./bin/zkt || true
ci_run ./bin/zk || true
ci_run run_retried curl -LO https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_2\^26.key

- name: install zkstack
run: |
ci_run ./zkstack_cli/zkstackup/install -g --path ./zkstack_cli/zkstackup/zkstackup || true
ci_run zkstackup -g --local

- name: build contracts
if: env.BUILD_CONTRACTS == 'true'
run: |
ci_run cp etc/tokens/{test,localhost}.json
ci_run zk_supervisor contracts
ci_run zkstack dev contracts

- name: Login to Docker registries
if: ${{ inputs.action == 'push' }}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/build-core-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ jobs:
- name: start-services
run: |
echo "IMAGE_TAG_SUFFIX=${{ env.IMAGE_TAG_SUFFIX }}" >> .env
mkdir -p ./volumes/postgres
run_retried docker compose pull zk postgres
docker compose up -d zk postgres
ci_run pre_download_compilers.sh
Expand All @@ -127,14 +126,19 @@ jobs:
ci_run git config --global --add safe.directory /usr/src/zksync/contracts/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts
ci_run ./bin/zk || true
ci_run ./bin/zkt || true
ci_run run_retried curl -LO https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_2\^26.key

- name: Install zkstack
if: env.BUILD_CONTRACTS == 'true'
run: |
ci_run ./zkstack_cli/zkstackup/install -g --path ./zkstack_cli/zkstackup/zkstackup || true
ci_run zkstackup -g --local

- name: build contracts
if: env.BUILD_CONTRACTS == 'true'
run: |
ci_run cp etc/tokens/{test,localhost}.json
ci_run zk_supervisor contracts
ci_run zkstack dev contracts --system-contracts --l1-contracts --l2-contracts

- name: Login to Docker registries
if: ${{ inputs.action == 'push' }}
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/build-local-node-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@ jobs:

- name: start-services
run: |
mkdir -p ./volumes/postgres
run_retried docker compose pull zk postgres
docker compose up -d zk postgres

- name: Install zkstack
run: |
ci_run ./zkstack_cli/zkstackup/install -g --path ./zkstack_cli/zkstackup/zkstackup || true
ci_run zkstackup -g

- name: init
run: |
Expand All @@ -61,9 +65,11 @@ jobs:
ci_run git config --global --add safe.directory /usr/src/zksync/contracts

ci_run zk
ci_run zkt
ci_run cp etc/tokens/{test,localhost}.json
ci_run zk_supervisor contracts

- name: build contracts
run: |
ci_run zkstack dev contracts

- name: update-image
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
- name: Download Setup data
run: |
gsutil -m rsync -r gs://matterlabs-setup-data-us/${{ inputs.setup_keys_id }} docker/prover-gpu-fri-gar
cp -v docker/prover-gpu-fri-gar/*.bin docker/circuit-prover-gpu-gar/

- name: Login to us-central1 GAR
run: |
Expand Down Expand Up @@ -70,6 +69,10 @@ jobs:
--tag europe-docker.pkg.dev/matterlabs-infra/matterlabs-docker/prover-fri-gpu-gar:2.0-${{ inputs.protocol_version }}-${{ inputs.image_tag_suffix }} \
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/prover-fri-gpu-gar:2.0-${{ inputs.protocol_version }}-${{ inputs.image_tag_suffix }}

- name: Move Setup data from prover-gpu-fri-gar to circuit-prover-gpu-gar
run: |
mv -v docker/prover-gpu-fri-gar/*.bin docker/circuit-prover-gpu-gar/

- name: Build and push circuit-prover-gpu-gar
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
with:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/build-prover-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
RUNNER_COMPOSE_FILE: "docker-compose-runner-nightly.yml"
ERA_BELLMAN_CUDA_RELEASE: ${{ inputs.ERA_BELLMAN_CUDA_RELEASE }}
CUDA_ARCH: ${{ inputs.CUDA_ARCH }}
runs-on: [ matterlabs-ci-runner-high-performance ]
runs-on: [matterlabs-ci-runner-high-performance]
strategy:
matrix:
component:
Expand All @@ -56,6 +56,7 @@ jobs:
- prover-fri-gateway
- prover-job-monitor
- proof-fri-gpu-compressor
- prover-autoscaler
outputs:
protocol_version: ${{ steps.protocolversion.outputs.protocol_version }}
steps:
Expand All @@ -74,7 +75,6 @@ jobs:
- name: start-services
run: |
echo "IMAGE_TAG_SUFFIX=${{ env.IMAGE_TAG_SUFFIX }}" >> .env
mkdir -p ./volumes/postgres
run_retried docker compose pull zk postgres
docker compose up -d zk postgres
ci_run sccache --start-server
Expand All @@ -91,7 +91,6 @@ jobs:
run: |
ci_run run_retried curl -LO https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_2\^24.key


- name: login to Docker registries
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))
run: |
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-witness-generator-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ jobs:
- name: start-services
run: |
echo "IMAGE_TAG_SUFFIX=${{ env.IMAGE_TAG_SUFFIX }}" >> .env
mkdir -p ./volumes/postgres
run_retried docker compose pull zk postgres
docker compose up -d zk postgres
ci_run sccache --start-server
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci-common-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ jobs:
- name: Start services
run: |
run_retried docker-compose -f ${RUNNER_COMPOSE_FILE} pull
mkdir -p ./volumes/postgres
docker-compose -f ${RUNNER_COMPOSE_FILE} up --build -d zk postgres

- name: Init
- name: Install zkstack
run: |
ci_run zkt
ci_run ./zkstack_cli/zkstackup/install -g --path ./zkstack_cli/zkstackup/zkstackup
ci_run zkstackup -g --local

# 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_supervisor lint -t rs --check
run: ci_run zkstack dev lint -t rs --check

25 changes: 16 additions & 9 deletions .github/workflows/ci-core-lint-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,31 @@ jobs:
- name: Start services
run: |
ci_localnet_up

- name: Install zkstack
run: |
ci_run ./zkstack_cli/zkstackup/install -g --path ./zkstack_cli/zkstackup/zkstackup
ci_run zkstackup -g --local

- name: Build
run: |
ci_run ./bin/zkt
ci_run yarn install
ci_run git config --global --add safe.directory /usr/src/zksync
ci_run zk_supervisor db setup --prover-url=${{ env.prover_url }} --core-url=${{ env.core_url }}

- name: Database setup
run: |
ci_run zkstack dev db setup --prover-url=${{ env.prover_url }} --core-url=${{ env.core_url }}

- name: Lints
run: |
ci_run zk_supervisor fmt --check
ci_run zk_supervisor lint -t md --check
ci_run zk_supervisor lint -t sol --check
ci_run zk_supervisor lint -t js --check
ci_run zk_supervisor lint -t ts --check
ci_run zk_supervisor lint -t rs --check
ci_run zkstack dev fmt --check
ci_run zkstack dev lint -t md --check
ci_run zkstack dev lint -t sol --check
ci_run zkstack dev lint -t js --check
ci_run zkstack dev lint -t ts --check
ci_run zkstack dev lint -t rs --check
ci_run zkstack dev lint -t autocompletion --check

- name: Check Database
run: |
ci_run zk_supervisor database check-sqlx-data --prover-url=${{ env.prover_url }} --core-url=${{ env.core_url }}
ci_run zkstack dev database check-sqlx-data --prover-url=${{ env.prover_url }} --core-url=${{ env.core_url }}
Loading
Loading