-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[WIP] Zksync os integration #4121
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
base: main
Are you sure you want to change the base?
Conversation
## What ❔ Use main branch of zk_ee and fixes to make it works. ## Why ❔ to integrate newest zk_ee changes ## Checklist - [ ] 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 `zkstack dev fmt` and `zkstack dev lint`.
## What ❔ * Updated dependencies to airbender 0.3.3 & zkos-wrapper 0.3.3 * updated keys * I did NOT update the app.bin - it still uses 'older' 0.0.4 version from zksync-os
## What ❔ <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- The `Why` has to be clear to non-Matter Labs entities running their own ZK Chain --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Is this a breaking change? - [ ] Yes - [ ] No ## Operational changes <!-- Any config changes? Any new flags? Any changes to any scripts? --> <!-- Please add anything that non-Matter Labs entities running their own ZK Chain may need to know --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] 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 `zkstack dev fmt` and `zkstack dev lint`. --------- Signed-off-by: Danil <[email protected]> Co-authored-by: Rodion Sabodash <[email protected]> Co-authored-by: zksync-admin-bot2 <[email protected]> Co-authored-by: mm <[email protected]>
name: Build and push images | ||
needs: [ setup, changed_files ] | ||
uses: ./.github/workflows/build-zksync-os-prover-template.yml | ||
if: needs.changed_files.outputs.prover == 'true' || needs.changed_files.outputs.all == 'true' | ||
with: | ||
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }} | ||
action: "push" | ||
secrets: | ||
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }} | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
|
||
regenerate-keys: |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
name: Regenerate keys | ||
needs: [ setup, changed_files ] | ||
if: needs.changed_files.outputs.execution_environment == 'true' | ||
uses: ./.github/workflows/update-verification-keys.yml |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
name: Generate verification keys and create PR | ||
runs-on: [ matterlabs-ci-runner-high-performance ] | ||
steps: | ||
- name: Checkout Repo A (with submodules) | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_PUBLIC_TOKEN }} | ||
|
||
- name: Setup environment | ||
run: | | ||
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV | ||
echo $(pwd)/bin >> $GITHUB_PATH | ||
echo IN_DOCKER=1 >> .env | ||
echo "SCCACHE_GCS_BUCKET=matterlabs-infra-sccache-storage" >> .env | ||
echo "SCCACHE_GCS_SERVICE_ACCOUNT=gha-ci-runners@matterlabs-infra.iam.gserviceaccount.com" >> .env | ||
echo "SCCACHE_GCS_RW_MODE=READ_WRITE" >> .env | ||
echo "RUSTC_WRAPPER=sccache" >> .env | ||
echo "CONTRACTS_STABLE_BRANCH=zksync-os-stable" >> $GITHUB_ENV | ||
|
||
- name: Git config | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "zksync-admin-bot2" | ||
|
||
- name: Start services | ||
run: | | ||
ci_localnet_up | ||
|
||
- name: git config for cloning private repos | ||
run: | | ||
ci_run git config --global --add url."https://${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}:[email protected]/".insteadOf ssh://[email protected]/ | ||
ci_run git config --global --add url."https://${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}:[email protected]/".insteadOf https://github.com/ | ||
|
||
- name: Install zkstack | ||
run: | | ||
ci_run ./zkstack_cli/zkstackup/install -g --path ./zkstack_cli/zkstackup/zkstackup | ||
ci_run zkstackup -g --local | ||
|
||
- name: Generate verification keys | ||
run: | | ||
ci_run zkstack prover generate-snark-keys -v | ||
|
||
|
||
- name: Make changes in submodule | ||
run: | | ||
cd contracts | ||
git checkout ${{ env.CONTRACTS_STABLE_BRANCH }} | ||
git add . | ||
git commit -m "Update Verification keys" || echo "No changes" | ||
git push origin ${{ env.CONTRACTS_STABLE_BRANCH }} | ||
|
||
- name: Update submodule | ||
run: | | ||
git add contracts | ||
git commit -m "Update verification keys" || echo "No changes" | ||
git push origin HEAD |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
## What ❔ * also fix commitments - set the proper hash there too.
## What ❔ <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- The `Why` has to be clear to non-Matter Labs entities running their own ZK Chain --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Is this a breaking change? - [ ] Yes - [ ] No ## Operational changes <!-- Any config changes? Any new flags? Any changes to any scripts? --> <!-- Please add anything that non-Matter Labs entities running their own ZK Chain may need to know --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] 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 `zkstack dev fmt` and `zkstack dev lint`. --------- Signed-off-by: Danil <[email protected]>
## What ❔ <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- The `Why` has to be clear to non-Matter Labs entities running their own ZK Chain --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Is this a breaking change? - [ ] Yes - [ ] No ## Operational changes <!-- Any config changes? Any new flags? Any changes to any scripts? --> <!-- Please add anything that non-Matter Labs entities running their own ZK Chain may need to know --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] 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 `zkstack dev fmt` and `zkstack dev lint`. --------- Signed-off-by: Danil <[email protected]> Co-authored-by: Danil <[email protected]>
## What ❔ <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- The `Why` has to be clear to non-Matter Labs entities running their own ZK Chain --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Is this a breaking change? - [ ] Yes - [ ] No ## Operational changes <!-- Any config changes? Any new flags? Any changes to any scripts? --> <!-- Please add anything that non-Matter Labs entities running their own ZK Chain may need to know --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] 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 `zkstack dev fmt` and `zkstack dev lint`. --------- Signed-off-by: Danil <[email protected]>
} | ||
} | ||
try { | ||
await promisify(exec)(`killall -q -${signal} zksync_external_node`); |
Check warning
Code scanning / CodeQL
Unsafe shell command constructed from library input Medium test
library input
shell command
versionSelector.addEventListener("change", function () { | ||
const selectedVersion = versionSelector.value; | ||
// Redirect to the selected version URL | ||
window.location.href = "/zksync-era/core" + selectedVersion; |
Check warning
Code scanning / CodeQL
DOM text reinterpreted as HTML Medium documentation
DOM text
}); | ||
command = command.replace(/\n/g, " "); | ||
console.log(`+ ${command}`); | ||
const child = _spawn(command, { stdio: "inherit", shell: true }); |
Check failure
Code scanning / CodeQL
Uncontrolled command line Critical
user-provided value
versionSelector.addEventListener("change", function () { | ||
const selectedVersion = versionSelector.value; | ||
// Redirect to the selected version URL | ||
window.location.href = "/zksync-era/prover" + selectedVersion; |
Check warning
Code scanning / CodeQL
DOM text reinterpreted as HTML Medium documentation
DOM text
## What ❔ <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- The `Why` has to be clear to non-Matter Labs entities running their own ZK Chain --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Is this a breaking change? - [ ] Yes - [ ] No ## Operational changes <!-- Any config changes? Any new flags? Any changes to any scripts? --> <!-- Please add anything that non-Matter Labs entities running their own ZK Chain may need to know --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] 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 `zkstack dev fmt` and `zkstack dev lint`. Signed-off-by: Danil <[email protected]>
Signed-off-by: Danil <[email protected]>
Signed-off-by: Danil <[email protected]>
Signed-off-by: Danil <[email protected]>
Signed-off-by: Danil <[email protected]>
## What ❔ <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- The `Why` has to be clear to non-Matter Labs entities running their own ZK Chain --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Is this a breaking change? - [ ] Yes - [ ] No ## Operational changes <!-- Any config changes? Any new flags? Any changes to any scripts? --> <!-- Please add anything that non-Matter Labs entities running their own ZK Chain may need to know --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] 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 `zkstack dev fmt` and `zkstack dev lint`. Signed-off-by: Danil <[email protected]>
README for notes on updating the app.bin. .dockerignore so docker build succeeds
## What ❔ Install cmake for snark prover, set CUDA ARCH. <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ To fix snark prover build. <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- The `Why` has to be clear to non-Matter Labs entities running their own ZK Chain --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Is this a breaking change? - [ ] Yes - [ ] No ## Operational changes <!-- Any config changes? Any new flags? Any changes to any scripts? --> <!-- Please add anything that non-Matter Labs entities running their own ZK Chain may need to know --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [x] 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 `zkstack dev fmt` and `zkstack dev lint`. ref ZKD-2889
## What ❔ <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- The `Why` has to be clear to non-Matter Labs entities running their own ZK Chain --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Is this a breaking change? - [ ] Yes - [ ] No ## Operational changes <!-- Any config changes? Any new flags? Any changes to any scripts? --> <!-- Please add anything that non-Matter Labs entities running their own ZK Chain may need to know --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] 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 `zkstack dev fmt` and `zkstack dev lint`.
69a9ff8
to
b5f7e0e
Compare
fd700b6
to
84373c9
Compare
## What ❔ * Added mock verifier
## What ❔ add fri prover lib and update app ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- The `Why` has to be clear to non-Matter Labs entities running their own ZK Chain --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Is this a breaking change? - [ ] Yes - [ ] No ## Operational changes <!-- Any config changes? Any new flags? Any changes to any scripts? --> <!-- Please add anything that non-Matter Labs entities running their own ZK Chain may need to know --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] 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 `zkstack dev fmt` and `zkstack dev lint`. --------- Co-authored-by: Daniyar Itegulov <[email protected]>
What ❔
Why ❔
Is this a breaking change?
Operational changes
Checklist
zkstack dev fmt
andzkstack dev lint
.