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

Hyperchain da removal #259

Merged
merged 30 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b8d4424
fix(tee-prover): passthrough env vars to the SGX enclave (#2824)
pbeza Sep 7, 2024
0a9e096
feat(zk_toolbox): Add setup keys step to prover init (#2811)
matias-gonz Sep 9, 2024
bcb176b
feat(zk_toolbox): Allow running docker images for provers (#2800)
Artemka374 Sep 10, 2024
b8925dd
chore: Add README for verified sources fetcher (#2829)
perekopskiy Sep 10, 2024
fb57d05
chore(ci): Limit tokio/rayon pools for zk_toolbox CI (#2828)
popzxc Sep 10, 2024
92dde03
feat: attester committees data extractor (BFT-434) (#2684)
pompon0 Sep 10, 2024
4cff529
test: Improve revert integration test (#2822)
slowli Sep 10, 2024
fe08677
test: Fix "missing revert data" error; fix / debug integration tests …
slowli Sep 10, 2024
6009499
refactor(api): Extract oneshot VM executor to executor crate (#2806)
slowli Sep 10, 2024
52f4f76
fix(en): Fix connection starvation during snapshot recovery (#2836)
slowli Sep 10, 2024
2d71c74
fix: handling of HTTP 403 thrown by proxyd (#2835)
pompon0 Sep 10, 2024
101a685
chore: log the whole error message when the task fails (#2834)
pompon0 Sep 10, 2024
57f56fb
feat: allow specifying what tests to run with zks (#2841)
joonazan Sep 10, 2024
946877f
chore: clean up dependencies (#2839)
perekopskiy Sep 10, 2024
d256092
feat(utils): Rework locate_workspace, introduce Workspace type (#2830)
popzxc Sep 11, 2024
3506731
feat(zk_toolbox): `zk_supervisor prover` subcommand (#2820)
Artemka374 Sep 11, 2024
89fcb3a
fix(zk-toolbox): Make token multiplier optional (#2843)
Deniallugo Sep 11, 2024
ffb3838
feat: Smaller zk_environment image (#1920)
mm-zk Sep 11, 2024
3b5e4a6
fix(zk_toolbox): secrets path, artifacts path (#2850)
Artemka374 Sep 12, 2024
527b5ab
ci: fix using cargo nextest (#2855)
perekopskiy Sep 12, 2024
9218612
feat: add da clients (#2743)
dimazhornyk Sep 12, 2024
93b4e08
feat(zk_toolbox): deploy legacy bridge (#2837)
Deniallugo Sep 12, 2024
4a10d7d
feat(zk_toolbox): Add external_node consensus support (#2821)
matias-gonz Sep 12, 2024
b359b08
feat: Selector generator tool (#2844)
mm-zk Sep 12, 2024
19887ef
feat(prover): Optimize setup keys loading (#2847)
popzxc Sep 12, 2024
a5ffaf1
feat: Bump crypto and protocol deps (#2825)
popzxc Sep 12, 2024
934634b
feat(prover): Refactor WitnessGenerator (#2845)
Artemka374 Sep 12, 2024
ef999fc
Merge branch 'main' into hyperchain-da-removal
gianbelinche Sep 12, 2024
164ecdf
Move hyperchain-da to zksync-era
gianbelinche Sep 12, 2024
5ad83bb
Uncomment validium config checks
gianbelinche Sep 13, 2024
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
16 changes: 8 additions & 8 deletions .github/workflows/build-docker-from-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ concurrency: docker-build
jobs:
setup:
name: Setup
runs-on: [ubuntu-latest]
runs-on: [ ubuntu-latest ]
outputs:
image_tag_suffix: ${{ steps.set.outputs.image_tag_suffix }}
prover_fri_gpu_key_id: ${{ steps.extract-prover-fri-setup-key-ids.outputs.gpu_short_commit_sha }}
Expand All @@ -48,7 +48,7 @@ jobs:

build-push-core-images:
name: Build and push image
needs: [setup]
needs: [ setup ]
uses: ./.github/workflows/build-core-template.yml
if: contains(github.ref_name, 'core')
secrets:
Expand All @@ -60,7 +60,7 @@ jobs:

build-push-tee-prover-images:
name: Build and push images
needs: [setup]
needs: [ setup ]
uses: ./.github/workflows/build-tee-prover-template.yml
if: contains(github.ref_name, 'core')
secrets:
Expand All @@ -72,7 +72,7 @@ jobs:

build-push-contract-verifier:
name: Build and push image
needs: [setup]
needs: [ setup ]
uses: ./.github/workflows/build-contract-verifier-template.yml
if: contains(github.ref_name, 'contract_verifier')
secrets:
Expand All @@ -83,20 +83,20 @@ jobs:

build-push-prover-images:
name: Build and push image
needs: [setup]
needs: [ setup ]
uses: ./.github/workflows/build-prover-template.yml
if: contains(github.ref_name, 'prover')
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
ERA_BELLMAN_CUDA_RELEASE: ${{ vars.ERA_BELLMAN_CUDA_RELEASE }}
CUDA_ARCH: "60;70;75;89"
CUDA_ARCH: "60;70;75;80;89"
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

build-push-witness-generator-image-avx512:
name: Build and push image
needs: [setup]
needs: [ setup ]
uses: ./.github/workflows/build-witness-generator-template.yml
if: contains(github.ref_name, 'prover')
with:
Expand All @@ -110,7 +110,7 @@ jobs:

build-gar-prover-fri-gpu:
name: Build GAR prover FRI GPU
needs: [setup, build-push-prover-images]
needs: [ setup, build-push-prover-images ]
uses: ./.github/workflows/build-prover-fri-gpu-gar.yml
if: contains(github.ref_name, 'prover')
with:
Expand Down
52 changes: 33 additions & 19 deletions .github/workflows/ci-core-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
strategy:
fail-fast: false
matrix:
vm_mode: [ "old", "new" ]
vm_mode: [ "OLD", "NEW" ]

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
Expand All @@ -87,13 +87,12 @@ jobs:

- name: Loadtest configuration
run: |
echo EXPECTED_TX_COUNT=${{ matrix.vm_mode == 'new' && 21000 || 16000 }} >> .env
echo EXPECTED_TX_COUNT=${{ matrix.vm_mode == 'NEW' && 21000 || 16000 }} >> .env
echo ACCOUNTS_AMOUNT="100" >> .env
echo MAX_INFLIGHT_TXS="10" >> .env
echo SYNC_API_REQUESTS_LIMIT="15" >> .env
echo FAIL_FAST=true >> .env
echo IN_DOCKER=1 >> .env
echo DATABASE_MERKLE_TREE_MODE=lightweight >> .env

- name: Start services
run: |
Expand All @@ -107,23 +106,34 @@ 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 zk
ci_run zk init --local-legacy-bridge-testing
ci_run ./bin/zkt
ci_run zk_inception chain create \
--chain-name legacy \
--chain-id sequential \
--prover-mode no-proofs \
--wallet-creation localhost \
--l1-batch-commit-data-generator-mode rollup \
--base-token-address 0x0000000000000000000000000000000000000001 \
--base-token-price-nominator 1 \
--base-token-price-denominator 1 \
--set-as-default false \
--ignore-prerequisites \
--legacy-bridge

ci_run zk_inception ecosystem init --dev --verbose
ci_run zk_supervisor contracts --test-contracts

# `sleep 60` because we need to wait until server added all the tokens
- name: Run server
run: |
EXPERIMENTAL_VM_STATE_KEEPER_FAST_VM_MODE=${{ matrix.vm_mode }} \
CHAIN_MEMPOOL_DELAY_INTERVAL=50 \
PASSED_ENV_VARS="EXPERIMENTAL_VM_STATE_KEEPER_FAST_VM_MODE,CHAIN_MEMPOOL_DELAY_INTERVAL" \
ci_run zk server --uring --components api,tree,eth,state_keeper,housekeeper,commitment_generator,vm_runner_protective_reads &>server.log &
ci_run sed -i -e 's/mode: FULL/mode: LIGHTWEIGHT/' chains/legacy/configs/general.yaml
ci_run sed -i -e 's/state_keeper_fast_vm_mode:.*/state_keeper_fast_vm_mode: ${{ matrix.vm_mode }}/' chains/legacy/configs/general.yaml
ci_run sed -i -e 's/delay_interval:.*/delay_interval: 50/' chains/legacy/configs/general.yaml
ci_run zk_inception server --uring --chain=legacy --components api,tree,eth,state_keeper,housekeeper,commitment_generator,vm_runner_protective_reads &>server.log &
ci_run sleep 60

- name: Deploy legacy era contracts
run: ci_run zk contract setup-legacy-bridge-era

- name: Perform loadtest
run: ci_run zk run loadtest
run: ci_run zk_supervisor t loadtest -v --chain=legacy

- name: Show server.log logs
if: always()
Expand Down Expand Up @@ -293,7 +303,7 @@ jobs:

- name: Show revert.log logs
if: always()
run: ci_run cat core/tests/revert-test/revert.log || true
run: ci_run cat logs/revert/default/server.log || true

- name: Show upgrade.log logs
if: always()
Expand Down Expand Up @@ -382,7 +392,11 @@ jobs:

- name: Run revert test
run: |
ENABLE_CONSENSUS=${{ matrix.consensus }} DEPLOYMENT_MODE=${{ matrix.deployment_mode }} PASSED_ENV_VARS="ENABLE_CONSENSUS,DEPLOYMENT_MODE" ci_run zk test i revert-en
ENABLE_CONSENSUS=${{ matrix.consensus }} \
DEPLOYMENT_MODE=${{ matrix.deployment_mode }} \
PASSED_ENV_VARS="ENABLE_CONSENSUS,DEPLOYMENT_MODE" \
ci_run zk test i revert-en

# test terminates the nodes, so we restart them.
if [[ "${{ matrix.deployment_mode }}" == "Rollup" ]]; then
ZKSYNC_ENV=docker ci_run zk server --components=$SERVER_COMPONENTS &>>server.log &
Expand Down Expand Up @@ -414,13 +428,13 @@ jobs:
if: always()
run: ci_run cat ext-node.log || true

- name: Show revert_main.log logs
- name: Show revert logs (main node)
if: always()
run: ci_run cat core/tests/revert-test/revert_main.log || true
run: ci_run cat logs/revert/en/default/server.log || true

- name: Show revert_ext.log logs
- name: Show revert logs (EN)
if: always()
run: ci_run cat core/tests/revert-test/revert_ext.log || true
run: ci_run cat logs/revert/en/default/external_node.log || true

- name: Show upgrade.log logs
if: always()
Expand Down
60 changes: 59 additions & 1 deletion .github/workflows/ci-zk-toolbox-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@ on:

env:
CLICOLOR: 1
# We run multiple binaries in parallel, and by default they will try to utilize all the
# available CPUs. In tests, there is not much CPU-intensive work (rayon), but a lot of
# async work (tokio), so we prioritize tokio.
TOKIO_WORKER_THREADS: 4
RAYON_NUM_THREADS: 2

jobs:
lint:
name: lint
uses: ./.github/workflows/ci-core-lint-reusable.yml

tests:
runs-on: [ matterlabs-ci-runner ]
runs-on: [ matterlabs-ci-runner-ultra-performance ]
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
Expand Down Expand Up @@ -127,6 +132,30 @@ jobs:
--prover-db-name=zksync_prover_localhost_custom_token \
--port-offset 3000 \
--chain custom_token

- name: Create and initialize Consensus chain
run: |
ci_run zk_inception chain create \
--chain-name consensus \
--chain-id sequential \
--prover-mode no-proofs \
--wallet-creation localhost \
--l1-batch-commit-data-generator-mode validium \
--base-token-address ${{ env.address }} \
--base-token-price-nominator 3 \
--base-token-price-denominator 2 \
--set-as-default false \
--ignore-prerequisites

ci_run zk_inception chain init \
--deploy-paymaster \
--l1-rpc-url=http://localhost:8545 \
--server-db-url=postgres://postgres:notsecurepassword@localhost:5432 \
--server-db-name=zksync_server_localhost_consensus \
--prover-db-url=postgres://postgres:notsecurepassword@localhost:5432 \
--prover-db-name=zksync_prover_localhost_consensus \
--port-offset 4000 \
--chain consensus

- name: Build test dependencies
run: |
Expand All @@ -137,6 +166,10 @@ jobs:
ci_run zk_inception server --ignore-prerequisites --chain era &> ${{ env.SERVER_LOGS_DIR }}/rollup.log &
ci_run zk_inception server --ignore-prerequisites --chain validium &> ${{ env.SERVER_LOGS_DIR }}/validium.log &
ci_run zk_inception server --ignore-prerequisites --chain custom_token &> ${{ env.SERVER_LOGS_DIR }}/custom_token.log &
ci_run zk_inception server --ignore-prerequisites --chain consensus \
--components=api,tree,eth,state_keeper,housekeeper,commitment_generator,vm_runner_protective_reads,vm_runner_bwip,vm_playground,da_dispatcher,consensus \
&> ${{ env.SERVER_LOGS_DIR }}/consensus.log &

ci_run sleep 5

- name: Run integration tests
Expand All @@ -150,9 +183,13 @@ jobs:
ci_run zk_supervisor test integration --no-deps --ignore-prerequisites --chain custom_token &> ${{ env.INTEGRATION_TESTS_LOGS_DIR }}/custom_token.log &
PID3=$!

ci_run zk_supervisor test integration --no-deps --ignore-prerequisites --chain consensus &> ${{ env.INTEGRATION_TESTS_LOGS_DIR }}/consensus.log &
PID4=$!

wait $PID1
wait $PID2
wait $PID3
wait $PID4

- name: Init external nodes
run: |
Expand All @@ -168,6 +205,10 @@ jobs:
--db-name=zksync_en_localhost_era_custom_token --l1-rpc-url=http://localhost:8545 --chain custom_token
ci_run zk_inception external-node init --ignore-prerequisites --chain custom_token

ci_run zk_inception external-node configs --db-url=postgres://postgres:notsecurepassword@localhost:5432 \
--db-name=zksync_en_localhost_era_consensus --l1-rpc-url=http://localhost:8545 --chain consensus
ci_run zk_inception external-node init --ignore-prerequisites --chain consensus

- name: Run recovery tests (from snapshot)
run: |

Expand All @@ -180,9 +221,13 @@ jobs:
ci_run zk_supervisor test recovery --snapshot --no-deps --ignore-prerequisites --verbose --chain custom_token &> ${{ env.SNAPSHOT_RECOVERY_LOGS_DIR }}//custom_token.log &
PID3=$!

ci_run zk_supervisor test recovery --snapshot --no-deps --ignore-prerequisites --verbose --chain consensus &> ${{ env.SNAPSHOT_RECOVERY_LOGS_DIR }}//consensus.log &
PID4=$!

wait $PID1
wait $PID2
wait $PID3
wait $PID4

- name: Run recovery tests (from genesis)
run: |
Expand All @@ -195,15 +240,20 @@ jobs:
ci_run zk_supervisor test recovery --no-deps --no-kill --ignore-prerequisites --verbose --chain custom_token &> ${{ env.GENESIS_RECOVERY_LOGS_DIR }}/custom_token.log &
PID3=$!

ci_run zk_supervisor test recovery --no-deps --no-kill --ignore-prerequisites --verbose --chain consensus &> ${{ env.GENESIS_RECOVERY_LOGS_DIR }}/consensus.log &
PID4=$!

wait $PID1
wait $PID2
wait $PID3
wait $PID4

- name: Run external node server
run: |
ci_run zk_inception external-node run --ignore-prerequisites --chain era &> ${{ env.EXTERNAL_NODE_LOGS_DIR }}/rollup.log &
ci_run zk_inception external-node run --ignore-prerequisites --chain validium &> ${{ env.EXTERNAL_NODE_LOGS_DIR }}/validium.log &
ci_run zk_inception external-node run --ignore-prerequisites --chain custom_token &> ${{ env.EXTERNAL_NODE_LOGS_DIR }}/custom_token.log &
ci_run zk_inception external-node run --ignore-prerequisites --chain consensus --enable-consensus &> ${{ env.EXTERNAL_NODE_LOGS_DIR }}/consensus.log &
ci_run sleep 5

- name: Run integration tests en
Expand All @@ -217,9 +267,13 @@ jobs:
ci_run zk_supervisor test integration --no-deps --ignore-prerequisites --external-node --chain custom_token &> ${{ env.INTEGRATION_TESTS_EN_LOGS_DIR }}/custom_token.log &
PID3=$!

ci_run zk_supervisor test integration --no-deps --ignore-prerequisites --external-node --chain consensus &> ${{ env.INTEGRATION_TESTS_EN_LOGS_DIR }}/consensus.log &
PID4=$!

wait $PID1
wait $PID2
wait $PID3
wait $PID4

- name: Run revert tests
run: |
Expand All @@ -234,10 +288,14 @@ jobs:

ci_run zk_supervisor test revert --no-deps --external-node --no-kill --ignore-prerequisites --chain custom_token &> ${{ env.REVERT_LOGS_DIR }}/custom_token.log &
PID3=$!

ci_run zk_supervisor test revert --no-deps --external-node --no-kill --ignore-prerequisites --chain consensus &> ${{ env.REVERT_LOGS_DIR }}/consensus.log &
PID4=$!

wait $PID1
wait $PID2
wait $PID3
wait $PID4


# Upgrade tests should run last, because as soon as they
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
- 'etc/**'
- 'contracts/**'
- 'infrastructure/zk/**'
- 'docker/zk-environment/**'
- '!**/*.md'
- '!**/*.MD'

Expand Down
Loading
Loading