-
Notifications
You must be signed in to change notification settings - Fork 623
[Feat] Staff for running zkvm prover #1666
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: develop
Are you sure you want to change the base?
Changes from all commits
7a2a750
6bd4e74
3307f5c
e3f393a
7482ca5
671c6bb
e89934d
959e424
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
[workspace] | ||
members = [ | ||
"common/libzkp/impl", | ||
"zkvm-prover", | ||
] | ||
|
||
resolver = "2" | ||
|
||
[workspace.package] | ||
authors = ["Scroll developers"] | ||
edition = "2021" | ||
homepage = "https://scroll.io" | ||
readme = "README.md" | ||
repository = "https://github.com/scroll-tech/scroll" | ||
version = "4.5.8" | ||
|
||
[workspace.dependencies] | ||
scroll-zkvm-prover-euclid = { git = "https://github.com/scroll-tech/zkvm-prover", branch = "feat/sep_types", package = "scroll-zkvm-prover" } | ||
scroll-zkvm-verifier-euclid = { git = "https://github.com/scroll-tech/zkvm-prover", branch = "feat/sep_types", package = "scroll-zkvm-verifier" } | ||
|
||
sbv-primitives = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "zkvm/euclid-upgrade", features = ["scroll"] } | ||
|
||
metrics = "0.23.0" | ||
metrics-util = "0.17" | ||
metrics-tracing-context = "0.16.0" | ||
|
||
anyhow = "1.0" | ||
alloy = { version = "0.11", default-features = false } | ||
alloy-primitives = { version = "0.8", default-features = false } | ||
# also use this to trigger "serde" feature for primitives | ||
alloy-serde = { version = "0.8", default-features = false } | ||
|
||
rkyv = "0.8" | ||
serde = { version = "1", default-features = false, features = ["derive"] } | ||
serde_json = { version = "1.0" } | ||
serde_derive = "1.0" | ||
serde_with = "3.11.0" | ||
itertools = "0.14" | ||
tiny-keccak = "2.0" | ||
tracing = "0.1" | ||
eyre = "0.6" | ||
bincode_v1 = { version = "1.3", package = "bincode"} | ||
snark-verifier-sdk = { version = "0.2.0", default-features = false, features = [ | ||
"loader_halo2", | ||
"halo2-axiom", | ||
"display", | ||
] } | ||
once_cell = "1.20" | ||
base64 = "0.22" | ||
|
||
#TODO: upgrade | ||
vm-zstd = { git = "https://github.com/scroll-tech/rust-zstd-decompressor.git", tag = "v0.1.1" } | ||
|
||
[patch.crates-io] | ||
alloy-primitives = { git = "https://github.com/scroll-tech/alloy-core", branch = "v0.8.18-euclid-upgrade" } | ||
ruint = { git = "https://github.com/scroll-tech/uint.git", branch = "v1.12.3" } | ||
tiny-keccak = { git = "https://github.com/scroll-tech/tiny-keccak", branch = "scroll-patch-v2.0.2-euclid-upgrade" } | ||
|
||
[profile.maxperf] | ||
inherits = "release" | ||
lto = "fat" | ||
codegen-units = 1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[toolchain] | ||
channel = "nightly-2025-02-14" | ||
targets = ["riscv32im-unknown-none-elf", "x86_64-unknown-linux-gnu"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.vmexe |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[app_fri_params.fri_params] | ||
log_blowup = 1 | ||
log_final_poly_len = 0 | ||
num_queries = 100 | ||
proof_of_work_bits = 16 | ||
|
||
[app_vm_config.rv32i] | ||
|
||
[app_vm_config.rv32m] | ||
|
||
[app_vm_config.io] | ||
|
||
[app_vm_config.keccak] | ||
|
||
[app_vm_config.castf] | ||
|
||
[app_vm_config.modular] | ||
supported_modulus = [ | ||
"4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787", | ||
"52435875175126190479447740508185965837690552500527637822603658699938581184513", | ||
] | ||
[app_vm_config.native] | ||
[app_vm_config.pairing] | ||
supported_curves = ["Bls12_381"] | ||
[app_vm_config.sha256] | ||
[app_vm_config.fp2] | ||
supported_modulus = [ | ||
"4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787", | ||
] | ||
[[app_vm_config.ecc.supported_curves]] | ||
modulus = "4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787" | ||
scalar = "52435875175126190479447740508185965837690552500527637822603658699938581184513" | ||
a = "0" | ||
b = "4" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[app_fri_params.fri_params] | ||
log_blowup = 1 | ||
log_final_poly_len = 0 | ||
num_queries = 100 | ||
proof_of_work_bits = 16 | ||
|
||
[app_vm_config.rv32i] | ||
|
||
[app_vm_config.rv32m] | ||
|
||
[app_vm_config.io] | ||
|
||
[app_vm_config.keccak] | ||
|
||
[app_vm_config.castf] | ||
|
||
[app_vm_config.native] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
[app_fri_params.fri_params] | ||
log_blowup = 1 | ||
log_final_poly_len = 0 | ||
num_queries = 100 | ||
proof_of_work_bits = 16 | ||
|
||
[app_vm_config.rv32i] | ||
|
||
[app_vm_config.io] | ||
|
||
[app_vm_config.keccak] | ||
|
||
[app_vm_config.rv32m] | ||
range_tuple_checker_sizes = [256, 8192] | ||
|
||
[app_vm_config.bigint] | ||
range_tuple_checker_sizes = [256, 8192] | ||
|
||
[app_vm_config.modular] | ||
supported_modulus = [ | ||
"21888242871839275222246405745257275088696311157297823662689037894645226208583", | ||
"21888242871839275222246405745257275088548364400416034343698204186575808495617", | ||
"115792089237316195423570985008687907853269984665640564039457584007908834671663", | ||
"115792089237316195423570985008687907852837564279074904382605163141518161494337", | ||
"115792089210356248762697446949407573530086143415290314195533631308867097853951", | ||
"115792089210356248762697446949407573529996955224135760342422259061068512044369" | ||
] | ||
|
||
[app_vm_config.fp2] | ||
supported_modulus = ["21888242871839275222246405745257275088696311157297823662689037894645226208583"] | ||
|
||
[app_vm_config.pairing] | ||
supported_curves = ["Bn254"] | ||
|
||
[app_vm_config.sha256] | ||
|
||
[[app_vm_config.ecc.supported_curves]] | ||
modulus = "115792089237316195423570985008687907853269984665640564039457584007908834671663" | ||
scalar = "115792089237316195423570985008687907852837564279074904382605163141518161494337" | ||
a = "0" | ||
b = "7" | ||
|
||
[[app_vm_config.ecc.supported_curves]] | ||
modulus = "115792089210356248762697446949407573530086143415290314195533631308867097853951" | ||
scalar = "115792089210356248762697446949407573529996955224135760342422259061068512044369" | ||
a = "115792089210356248762697446949407573530086143415290314195533631308867097853948" | ||
b = "41058363725152142129326129780047268409114441015993725554835256314039467401291" | ||
|
||
[[app_vm_config.ecc.supported_curves]] | ||
modulus = "21888242871839275222246405745257275088696311157297823662689037894645226208583" | ||
scalar = "21888242871839275222246405745257275088548364400416034343698204186575808495617" | ||
a = "0" | ||
b = "3" |
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,20 @@ | ||||||||||||||||
#!/bin/bash | ||||||||||||||||
|
||||||||||||||||
# release version | ||||||||||||||||
if [ -z "${SCROLL_ZKVM_VERSION}" ]; then | ||||||||||||||||
SCROLL_ZKVM_VERSION=$($SHELL ./print_high_zkvm_version.sh | cut -d' ' -f1|cut -c2-) | ||||||||||||||||
fi | ||||||||||||||||
Comment on lines
+4
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Simplify and harden version detection Avoid using - if [ -z "${SCROLL_ZKVM_VERSION}" ]; then
- SCROLL_ZKVM_VERSION=$($SHELL ./print_high_zkvm_version.sh | cut -d' ' -f1 | cut -c2-)
- fi
+ if [ -z "${SCROLL_ZKVM_VERSION:-}" ]; then
+ SCROLL_ZKVM_VERSION=$(./print_high_zkvm_version.sh 2>/dev/null | awk '{print substr($1,2)}') \
+ || { echo "Failed to determine SCROLL_ZKVM_VERSION"; exit 1; }
+ fi 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||
|
||||||||||||||||
echo $SCROLL_ZKVM_VERSION | ||||||||||||||||
|
||||||||||||||||
# chunk-circuit exe | ||||||||||||||||
wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/chunk/app.vmexe -O .work/chunk/app.vmexe | ||||||||||||||||
Comment on lines
+10
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure target directories exist before download The script writes to + mkdir -p .work/chunk before the 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||
|
||||||||||||||||
# batch-circuit exe | ||||||||||||||||
wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/batch/app.vmexe -O .work/batch/app.vmexe | ||||||||||||||||
|
||||||||||||||||
# bundle-circuit exe | ||||||||||||||||
wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/bundle/app.vmexe -O .work/bundle/app.vmexe | ||||||||||||||||
|
||||||||||||||||
# bundle-circuit exe, legacy version, may not exist | ||||||||||||||||
wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/bundle/app_euclidv1.vmexe -O .work/bundle/app_euclidv1.vmexe || echo "legacy app not exist for $SCROLL_ZKVM_VERSION" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add strict mode to the script
Enable robust error handling by adding:
+ set -euo pipefail
immediately after the shebang.
📝 Committable suggestion
🤖 Prompt for AI Agents