-
Notifications
You must be signed in to change notification settings - Fork 622
[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
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## Prover | ||
|
||
A runnable zkvm prover which can communicate with coordinator, receving proving task and generate proof | ||
|
||
## Testing | ||
|
||
+ Get the url of the endpoint of coordinator and a rpc endpoint response to the cooresponding chain | ||
|
||
+ Build a `config.json` file with previous knowledge from the template in current directory | ||
|
||
+ Call `make test_run` |
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