Implemented zkvm-pico host and guest programs#386
Conversation
| # bls12_381 = { git = 'https://github.com/grandinetech/universal-precompiles.git', tag = 'bls12_381-6bb9695-up.0' } | ||
| # For Brevis Pico | ||
| bls12_381 = { git = "https://github.com/jimmychu0807/brevis-bls12_381.git", branch = "jc/dev" } |
There was a problem hiding this comment.
This change breaks all other zkvms, so need to be sorted out before merging into develop
There was a problem hiding this comment.
This is what I'm not sure of. Brevis Pico has their own tweak of bls12_381 and sha2. How can I make these crates compatible with other zkvms? (Actually each zkvm seems to have their own tweak on these two libs)
| sha2 = { git = 'https://github.com/grandinetech/universal-precompiles.git', tag = 'sha2-v0.10.9-up.0', features = ['compress'] } | ||
| # sha2 = { git = 'https://github.com/grandinetech/universal-precompiles.git', tag = 'sha2-v0.10.9-up.0', features = ['compress'] } | ||
| # For Brevis Pico | ||
| sha2 = { git = 'https://github.com/brevis-network/hashes.git', branch = 'sha2-0.10.8-v1.0.0', features = ['compress'] } |
There was a problem hiding this comment.
Pointed to
git = 'https://github.com/jimmychu0807/grandine-universal-precompiles.git', branch = 'RustCrypto-hashes/sha2-v0.10.9' now.
Once grandinetech/universal-precompiles#3 is merged, I will point back to grandine/universal-precompiles.git.
| rand_chacha = { workspace = true } | ||
|
|
||
| [features] | ||
| zkvm-pico = [] |
There was a problem hiding this comment.
Better not to have special features for zkvms, but to detect them with target, e.g. for risc0:
#[cfg(target_os = "zkvm", target_vendor = "risc0")]There was a problem hiding this comment.
I thought so at the beginning. For pico, the target value they use is riscv32im-risc0-zkvm-elf, which is very similar to r0vm.
| #[cfg(feature = "zkvm-pico")] | ||
| let h = <G2Projective as HashToCurve<ExpandMsgXmd<Sha256>>>::hash_to_curve( | ||
| message.as_ref(), | ||
| DOMAIN_SEPARATION_TAG, | ||
| ); | ||
|
|
There was a problem hiding this comment.
I believe that it is old zkcrypto API, that was in last published version 0.8.0, but grandine is using newer one, from master branch. So you have to update precompiles to latest version (like with risc0, sp1 and ziren in grandinetech/universal-precompiles repo).
Also, since bls12_381 is currently set into Cargo.toml, does main grandine binary compile now?
There was a problem hiding this comment.
It passed all CI tests: https://github.com/jimmychu0807/grandine/actions/runs/18261651253
There was a problem hiding this comment.
This is still not fixed, there should be single api for hash_to_curve, not dependent on the backend
| # channel = 'stable-2025-06-26' | ||
| # Need nightly rust toolchain to build zkvm_host with `pico` feature | ||
| channel = 'nightly-2025-08-04' |
There was a problem hiding this comment.
I personally don't think this is a good idea, but @povi & @sauliusgrigaitis know better, maybe they're okay with that.
However, is it possible to avoid somehow? Maybe we can put pico host code into separate crate, outside of main workspace, and compile it separately, with separate toolchain?
There was a problem hiding this comment.
How about I keep the stable version line, and add a comment below for those who want to compile zkvm pico? Essentially:
channel = 'stable-2025-06-26'
# To buld zkvm_host with `pico` feature, comment the above and use the following nighly version.
# channel = 'nightly-2025-08-04'There was a problem hiding this comment.
That works too, but adds some tedious work to run tests, which can be automated. Also, one more idea just came into my mind: you can use cargo +nightly build to build zkvm host with nightly version. So you can add target to makefile, to avoid manually commenting lines
There was a problem hiding this comment.
Fixed, by restoring back to stable version. Added lines in Makefile with cargo +nightly-<version> build to build zkvm-pico host and guest code.
|
|
||
| if actual > maximum { | ||
| // Note: ignore the check `actual > maximum` when maximum == 0. Is this proper? | ||
| if maximum > 0 && actual > maximum { |
There was a problem hiding this comment.
I see this as very dangerous check (as it is essentially skipping check). Would be better to find exact place where List has max length of zero, and see what's happening there?
Still this place needs to be reviewed by someone who works with ssz more closely, maybe @povi can consult here?
There was a problem hiding this comment.
@povi would like to add more context here. Without this fix (maximum > 0 and also below), even the simplest test consensus spec tests mainnet electra empty block transition will fail inside the guest code on the line:
BeaconState::<P>::from_ssz_at_phase(phase, &state_ssz)The list maximum passed in is 0, but there are content inside.
After reading this comment, if you also think there is a better approach, let me know and I will revert this fix in this PR and let you send a proper fix to ssz crate.
There was a problem hiding this comment.
No, don't remove the check. If the maximum is 0, that most likely means that BeaconState is from the different phase than it tries to decode from. Please re-check from which phase is BeaconState and what is the phase parameter that is being used in from_ssz_at_phase
There was a problem hiding this comment.
I will restore this file to its previous state. When this PR is completed & merged, I will try to look into this ssz issue.
There was a problem hiding this comment.
This line is remaining here, so the zkvm test could pass. Let me know if you feel it is better left off. I will revert the fix.
|
|
||
| const GUEST_PROGRAM: &str = "zkvm-guest-pico.elf"; | ||
|
|
||
| pub fn build_program(path: &str) -> Result<()> { |
There was a problem hiding this comment.
Why this helper lives in its own crate? Maybe you can move it to backend/pico?
There was a problem hiding this comment.
Sure. Can move this in backend/pico.
There was a problem hiding this comment.
Done. Moved the function to backend/pico/build_helper.rs.
|
|
||
| let proof_set = prover | ||
| .prove(stdin_builder) | ||
| .expect("Failed to generate proof"); |
There was a problem hiding this comment.
It is better to not panic here, but return error
| anyhow!(format!( | ||
| "Failed to load ELF file from {}: {}", | ||
| zkvm_guest_path.display(), | ||
| err | ||
| )) |
There was a problem hiding this comment.
I believe this may be simplified with anyhow's context feature? It should keep original error, while providing new error message (like saying "Failed to load ELF file from {some path}", and then showing e.g. "File not found" error below)
|
latest CI result can be seen here: |
| # bls12_381 = { git = 'https://github.com/grandinetech/universal-precompiles.git', tag = 'bls12_381-6bb9695-up.0' } | ||
| bls12_381 = { git = "https://github.com/jimmychu0807/grandine-universal-precompiles.git", branch = "zkcrypto/bls12_381" } |
There was a problem hiding this comment.
Once grandinetech/universal-precompiles#4 is merged, modify to
| # bls12_381 = { git = 'https://github.com/grandinetech/universal-precompiles.git', tag = 'bls12_381-6bb9695-up.0' } | |
| bls12_381 = { git = "https://github.com/jimmychu0807/grandine-universal-precompiles.git", branch = "zkcrypto/bls12_381" } | |
| bls12_381 = { git = "https://github.com/grandine/universal-precompiles.git", branch = "zkcrypto/bls12_381" } |
| # bls12_381 = { git = 'https://github.com/grandinetech/universal-precompiles.git', tag = 'bls12_381-6bb9695-up.0' } | ||
| bls12_381 = { git = 'https://github.com/jimmychu0807/grandine-universal-precompiles.git', branch = 'zkcrypto/bls12_381' } |
There was a problem hiding this comment.
Once grandinetech/universal-precompiles#4 is merged, modify to
| # bls12_381 = { git = 'https://github.com/grandinetech/universal-precompiles.git', tag = 'bls12_381-6bb9695-up.0' } | |
| bls12_381 = { git = 'https://github.com/jimmychu0807/grandine-universal-precompiles.git', branch = 'zkcrypto/bls12_381' } | |
| bls12_381 = { git = "https://github.com/grandine/universal-precompiles.git", branch = "zkcrypto/bls12_381" } |
| # sha2 = { git = 'https://github.com/grandinetech/universal-precompiles.git', tag = 'sha2-v0.10.9-up.0', features = ['compress'] } | ||
| sha2 = { git = 'https://github.com/jimmychu0807/grandine-universal-precompiles.git', branch = 'RustCrypto-hashes/sha2-v0.10.9', features = ['compress'] } |
There was a problem hiding this comment.
Once grandinetech/universal-precompiles#3 is merged, modify to
| # sha2 = { git = 'https://github.com/grandinetech/universal-precompiles.git', tag = 'sha2-v0.10.9-up.0', features = ['compress'] } | |
| sha2 = { git = 'https://github.com/jimmychu0807/grandine-universal-precompiles.git', branch = 'RustCrypto-hashes/sha2-v0.10.9', features = ['compress'] } | |
| sha2 = { git = "https://github.com/grandine/universal-precompiles.git", branch = "RustCrypto-hashes/sha2-v0.10.9" } |
| # sha2 = { git = 'https://github.com/grandinetech/universal-precompiles.git', tag = 'sha2-v0.10.9-up.0' } | ||
| sha2 = { git = 'https://github.com/jimmychu0807/grandine-universal-precompiles.git', branch = 'RustCrypto-hashes/sha2-v0.10.9' } |
There was a problem hiding this comment.
Once grandinetech/universal-precompiles#3 is merged, modify to
| # sha2 = { git = 'https://github.com/grandinetech/universal-precompiles.git', tag = 'sha2-v0.10.9-up.0' } | |
| sha2 = { git = 'https://github.com/jimmychu0807/grandine-universal-precompiles.git', branch = 'RustCrypto-hashes/sha2-v0.10.9' } | |
| sha2 = { git = "https://github.com/grandine/universal-precompiles.git", branch = "RustCrypto-hashes/sha2-v0.10.9" } |
f27cbc0 to
75d4991
Compare
|
@jimmychu0807, I see build fails (jimmychu0807@afb0dac). Please make sure CI checks pass |
| #[cfg(feature = "zkvm-pico")] | ||
| let h = <G2Projective as HashToCurve<ExpandMsgXmd<Sha256>>>::hash_to_curve( | ||
| message.as_ref(), | ||
| DOMAIN_SEPARATION_TAG, | ||
| ); | ||
|
|
There was a problem hiding this comment.
This is still not fixed, there should be single api for hash_to_curve, not dependent on the backend
| // Note: ignore the check `actual > maximum` when maximum == 0. Is this proper? | ||
| if maximum > 0 && actual > maximum { |
There was a problem hiding this comment.
This should be removed, maximum check is required - error is caused because state gets deserialized with incorrect phase
I believe the PR is now good for review. Thanks. |
| with: | ||
| root-reserve-mb: 2048 | ||
| # Leaving 20 GB for rust crates download and installation under `/tmp` | ||
| root-reserve-mb: 20480 |
There was a problem hiding this comment.
I encountered running out of space error because rust crates are downloaded under /tmp dir for installation. So here, we increase the space reserved for root dir.
ArtiomTr
left a comment
There was a problem hiding this comment.
Also please add documentation in zkvm/README.md on how to run pico tests.
| anonymous_parameters = 'warn' | ||
| deprecated_in_future = 'warn' | ||
| deprecated_safe = 'warn' | ||
| deprecated_safe = { level = 'warn', priority = -1 } |
| [patch.'https://github.com/zkcrypto/bls12_381.git'] | ||
| bls12_381 = { git = 'https://github.com/grandinetech/universal-precompiles.git', tag = 'bls12_381-6bb9695-up.0' } | ||
|
|
There was a problem hiding this comment.
We don't need this line to compile the guest, as shown in the workflows/zkvm-test.yml
There was a problem hiding this comment.
ah yes, because of feature thing, okay
|
|
||
| [patch.crates-io] | ||
| sha2 = { git = 'https://github.com/grandinetech/universal-precompiles.git', tag = 'sha2-v0.10.9-up.0' } | ||
|
|
||
| [patch.'https://github.com/zkcrypto/bls12_381.git'] | ||
| bls12_381 = { git = 'https://github.com/grandinetech/universal-precompiles.git', tag = 'bls12_381-6bb9695-up.0' } |
There was a problem hiding this comment.
The guest compiles fine without these two lines
There was a problem hiding this comment.
yes, but guest also compiles without any patch at all - the point of patches is not to provide functionality that otherwise is unavailable, but to speed up existing crates. By removing these sections, performance should degrade.
|
|
||
| [build-dependencies] | ||
| sp1-helper = { workspace = true, optional = true } | ||
| anyhow = { workspace = true, optional = true } |
There was a problem hiding this comment.
why anyhow in build dependencies?
| test_case: [ | ||
| # These two test cases can be completed in a reasonably short time | ||
| "consensus spec tests mainnet electra empty block transition", | ||
| "pectra-devnet-6 without epoch transition" | ||
| ] |
There was a problem hiding this comment.
I think it is better to structure pipeline the other way - by doing matrix on "backend", not on test case. Then you won't need to install each backend twice.
There was a problem hiding this comment.
also, after thinking a bit more about this, maybe this job should be put inside ./.github/workflows/zkvm-test.yml workflow, rather than separate one? I believe two jobs - default lint/build/format CI and zkvm testing - should run at the same events, so we can colocate them properly
There was a problem hiding this comment.
./.github/workflows/zkvm-test.yml
Do you intent to mean ./.github/workflows/ci.yml? It is now in zkvm-test.yml.
There was a problem hiding this comment.
I think it will be better to have all zkVM related build/tests separated from the main ones, the ci.yml build/tests.
There was a problem hiding this comment.
yeah, sorry, meant ci.yaml. I proposed to keep them joint, as that is still CI, checking if code works, not separate pipeline. They both need to run at the same time, so don't see a reason to keep them separate
There was a problem hiding this comment.
I think it is better to structure pipeline the other way - by doing matrix on "backend", not on test case. Then you won't need to install each backend twice.
I agree this can be structured to parallelize run for different zkVMs.
| - name: Installing r0vm | ||
| run: | | ||
| curl -L https://risczero.com/install | bash | ||
| ls -lah $HOME |
| /home/runner/.risc0/bin/rzup install rust 1.88.0 | ||
| /home/runner/.risc0/bin/rzup install cpp 2024.1.5 | ||
| /home/runner/.risc0/bin/rzup install r0vm 3.0.1 | ||
| /home/runner/.risc0/bin/rzup install cargo-risczero 3.0.1 |
There was a problem hiding this comment.
shouldn't it work by providing not whole path, but just executable name rzup?
There was a problem hiding this comment.
Refer to docs:
https://dev.risczero.com/api/zkvm/install#using-rzup-in-ci
There was a problem hiding this comment.
still doesn't answer my question, why you use /home/runner/.risc0/bin/rzup instead of simple rzup? Docs you pointed also show rzup usage, not full path
There was a problem hiding this comment.
It couldn't find rzup (not in the path). Shown here:
https://github.com/jimmychu0807/grandine/actions/runs/19332684742/job/55299564273#step:2:41
So using the full path here.
Updated: at the end I added an export PATH... command so we can run rzup directly. But it is not in the default PATH even after sourcing ~/.bashrc.
| pushd ./ | ||
| cd .. | ||
| git clone https://github.com/brevis-network/pico pico | ||
| cd pico/sdk/cli | ||
| cargo install --locked --force --path . | ||
| cargo pico --version | ||
| popd |
There was a problem hiding this comment.
I believe all of this can be simplified to
cargo +nightly-2025-08-04 install --git https://github.com/brevis-network/pico pico-cli
as mentioned in their docs
| exclude = [ | ||
| # Excluding the zkvm guest library will make the compiled guest code size a lot smaller, from | ||
| # ~200 MB -> 2.3 MB. | ||
| 'zkvm/guest/pico' | ||
| ] |
There was a problem hiding this comment.
cool, is it default exclude flag value? If so, we can simplify our makefile by putting excludes here:
Line 1 in e53a535
There was a problem hiding this comment.
Since 'zkvm/guest/pico' is already excluded from workspace, there is no zkvm_guest_pico from the "workspace" perspective. Isn't it?
There was a problem hiding this comment.
okay then I have zero clue what's going here - how you exclude package from workspace, that isn't there in the first place? https://doc.rust-lang.org/cargo/reference/workspaces.html#the-members-and-exclude-fields
There was a problem hiding this comment.
The exclude inside the Cargo.toml is excluding the specified child path to be included as a package.
The EXCLUDES that we set in Makefile is excluding whatever packages already recognized by the workspace, thus using the crate name.
There was a problem hiding this comment.
okay, I checked locally, and found some things:
- The comment is misleading, as this exclude required because otherwise it will error out, as guest code believes that it lives in workspace:
thread 'main' panicked at sdk/cli/src/build/build.rs:140:10: cargo metadata command failed: CargoMetadata { stderr: "error: current package believes it's in a workspace when it's not:\ncurrent: /home/necolt/workspace/grandine/zkvm/guest/pico/Cargo.toml\nworkspace: /home/necolt/workspace/grandine/Cargo.toml\n\nthis may be fixable by adding `zkvm/guest/pico` to the `workspace.members` array of the manifest located at: /home/necolt/workspace/grandine/Cargo.toml\nAlternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.\n" } note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace - As suggested by error, two things can be done: either adding an exclude to workspace cargo.toml, or adding
[workspace]section to guest's cargo.toml. - The same issue was with SP1's guest code, and it was solved by adding empty
[workspace]section. - For the sake of consistency, please remove these excludes and add empty workspace section to pico's Cargo.toml.
- Double check guest code size: if empty
[workspace]section produces larger guest code, than[excludes]field, then remove empty workspace sections in both sp1 and pico guest code.
There was a problem hiding this comment.
added an empty [workspace] and removed the [excludes] field. The output elf file size is the same.
|
Also, can you please squash all commits into one, to keep history clean? Thank you |
bd4fd02 to
e4104c4
Compare
| cargo check --features default-networks $(EXCLUDES) | ||
|
|
||
| build: | ||
| cargo build --release --bin grandine --features default-networks --workspace --exclude zkvm_host --exclude zkvm_guest_risc0 |
There was a problem hiding this comment.
I believe this line not needed
| risc0-test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| # Checkout code first to access local github action below | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/setup | ||
| with: | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Installing r0vm | ||
| # Refer to docs: | ||
| # https://dev.risczero.com/api/zkvm/install#using-rzup-in-ci | ||
| run: | | ||
| curl -L https://risczero.com/install | bash | ||
| source /home/runner/.bashrc | ||
| export PATH="/home/runner/.risc0/bin:$PATH" | ||
| rzup install rust 1.88.0 | ||
| rzup install cpp 2024.1.5 | ||
| rzup install r0vm 3.0.1 | ||
| rzup install cargo-risczero 3.0.1 | ||
| cargo risczero --version | ||
|
|
||
| - name: Running r0vm test | ||
| run: | | ||
| IFS=$'\n' | ||
| for TEST in $TEST_CASES; do | ||
| echo "Running test: $TEST" | ||
| RUST_LOG=info RISC0_DEV_MODE=1 cargo run -p zkvm_host --features risc0 --release -- --test "$TEST" execute | ||
| done | ||
|
|
||
| # zkVM test - SP1 implementation | ||
| sp1-test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/setup | ||
| with: | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Installing SP1 | ||
| run: | | ||
| curl -L https://sp1up.succinct.xyz | bash | ||
| /home/runner/.sp1/bin/sp1up -v 5.2.1 -- token ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Running SP1 test | ||
| run: | | ||
| IFS=$'\n' | ||
| for TEST in $TEST_CASES; do | ||
| echo "Running test: $TEST" | ||
| RUST_LOG=info cargo run -p zkvm_host --features sp1 --release -- --test "$TEST" execute | ||
| done | ||
|
|
||
| # zkVM test - Brevis Pico implementation | ||
| pico-test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/setup | ||
| with: | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Installing Brevis Pico | ||
| run: | | ||
| rustup install nightly-2025-08-04 | ||
| rustup component add rust-src --toolchain nightly-2025-08-04 | ||
| cargo +nightly-2025-08-04 install --git https://github.com/brevis-network/pico pico-cli | ||
|
|
||
| - name: Running Brevis Pico test | ||
| run: | | ||
| IFS=$'\n' | ||
| for TEST in $TEST_CASES; do | ||
| echo "Running test: $TEST" | ||
| RUST_LOG=info cargo +nightly-2025-08-04 run -p zkvm_host --features pico --release -- --test "$TEST" execute | ||
| done |
There was a problem hiding this comment.
still believe this all can be done more cleanly with matrix strategy, something like:
matrix:
backend: [risc0, sp1, pico]
include:
- backend: risc0
install: |
curl -L https://risczero.com/install | bash
source /home/runner/.bashrc
export PATH="/home/runner/.risc0/bin:$PATH"
rzup install rust 1.88.0
rzup install cpp 2024.1.5
rzup install r0vm 3.0.1
rzup install cargo-risczero 3.0.1
cargo risczero --version
execute: RUST_LOG=info RISC0_DEV_MODE=1 cargo run -p zkvm_host --features risc0 --release -- --test "$TEST" execute
- backend: sp1
install: ...
execute: ...
- backend: pico
install: ...
execute: ...
steps:
# preparation steps here
- name: Installing ${{ matrix.backend }} zkvm
run: ${{ matrix.install }}
- name: Running ${{ matrix.backend }} tests
run: |
IFS=$'\n'
for TEST in $TEST_CASES; do
echo "Running test: $TEST"
${{ matrix.execute }}
doneThen no need for setup phase in separate file - everything can be in one place. Also, simplifies adding new zkvm
| exclude = [ | ||
| # Excluding the zkvm guest library will make the compiled guest code size a lot smaller, from | ||
| # ~200 MB -> 2.3 MB. | ||
| 'zkvm/guest/pico' | ||
| ] |
There was a problem hiding this comment.
okay, I checked locally, and found some things:
- The comment is misleading, as this exclude required because otherwise it will error out, as guest code believes that it lives in workspace:
thread 'main' panicked at sdk/cli/src/build/build.rs:140:10: cargo metadata command failed: CargoMetadata { stderr: "error: current package believes it's in a workspace when it's not:\ncurrent: /home/necolt/workspace/grandine/zkvm/guest/pico/Cargo.toml\nworkspace: /home/necolt/workspace/grandine/Cargo.toml\n\nthis may be fixable by adding `zkvm/guest/pico` to the `workspace.members` array of the manifest located at: /home/necolt/workspace/grandine/Cargo.toml\nAlternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.\n" } note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace - As suggested by error, two things can be done: either adding an exclude to workspace cargo.toml, or adding
[workspace]section to guest's cargo.toml. - The same issue was with SP1's guest code, and it was solved by adding empty
[workspace]section. - For the sake of consistency, please remove these excludes and add empty workspace section to pico's Cargo.toml.
- Double check guest code size: if empty
[workspace]section produces larger guest code, than[excludes]field, then remove empty workspace sections in both sp1 and pico guest code.
| ``` | ||
| Again, replace `<test_case>` with one of the four test cases mentioned above. | ||
|
|
||
| ## Adding new zkvm |
There was a problem hiding this comment.
Can you please also mention in Adding new zkvm section, that you need to add new ZKVM to ci.yaml workflow?
e078ba1 to
4a974a6
Compare
|
I didn't change the disk-space-freer. I tried So sticking with See if the PR is good to merge. Thanks. |
That's because it uninstalls too much, and now required dependencies for grandine must be installed back: - name: Install system dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo DEBIAN_FRONTEND='noninteractive' apt-get install \
--no-install-recommends -yq \
ca-certificates \
libssl-dev \
clang \
cmake \
unzip \
protobuf-compiler \
libz-dev
The flaky CI issue is quite a big deal, needs to be sorted out before merging this PR. |
|
But this CI has been used in Grandine since I started working on this. I'm not sure I still have time to work on this CI issue. If not, I would suggest fixing this in another PR. It passes (this time): |
afb175b to
892991b
Compare
|
@ArtiomTr, I have updated The CI is running fine for the last push: |
|
@ArtiomTr see if this PR is good to merge. Thanks. |
|
Hi @povi, this is the integration of Brevis Pico in the Grandine zkvm crate (both host and guest). Please see if you have time to review and get it merged to the |
b600b51 to
d3cf303
Compare
In addition to the zkvm-pico host and guest code, there are a few notable issues worth to be reviewed and discussed in this PR, summarized below.
cargo build -p zkvm_host --features pico) will also compile the zkvm-guest pico program.zkvm-picofeature to support running pico library that take a different parameter type onhash_to_curve()function in secret_key.rs and signature.rs.nightly-2025-08-04nightly version. This is necessary to compile pico-sdk for the host and guest program. Need to discuss further.cc @povi author of the ssz-reading optimization code - please check if the fix is actually proper 🙏, @Dyslex7c
This PR updates rust-toolchain from stable to nightly version. If this is too drastic to the main branch, I can comment out the nightly version line and add a comment that compiling zkvm-pico requires switching from stable rust toolchain to nightly.
@ArtiomTr, @povi please have a look on this PR when you have time. Thanks.