risc0 / risc0-foundry-template

Template for integrating RISC Zero and Ethereum using Foundry
https://risczero.com
107 stars 60 forks source link

publishing new state in local deployment in `deployment-guide.md` gives zkVM version mismatch #115

Closed sashaaldrick closed 5 months ago

sashaaldrick commented 5 months ago

A developer on the Discord ran into this error first (see here, and I reproduced it on my own machine.

Following the deployment guide, and specifically using the local network via anvil once you get to Interact with your local deployment:

  1. Querying state - works perfectly.
  2. Publishing a new state - throws an error saying:
cargo run --bin publisher -- \
    --chain-id=31337 \
    --rpc-url=http://localhost:8545 \
    --contract=${EVEN_NUMBER_ADDRESS:?} \
    --input=12345678

   Compiling methods v0.1.0 (/Users/sasha/Developer/risc0-foundry-template/methods)
guests: Starting build for riscv32im-risc0-zkvm-elfethods(build)
guests:     Finished `release` profile [optimized] target(s) in 0.04s
   Compiling apps v0.1.0 (/Users/sasha/Developer/risc0-foundry-template/apps)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.32s
     Running `target/debug/publisher --chain-id=31337 '--rpc-url=http://localhost:8545' --contract=0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512 --input=12345678`
Error: server error `zkVM version mismatch: Bonsai supports only the risc0-zkvm '0.21.0' version`

I tried downgrading risc0-zkvm as well as other relevant packages but couldn't get it to work.

Environment Details:

cargo risczero --version
cargo-risczero 1.0.1
nategraf commented 5 months ago

@sashaaldrick and @IbrahimSam96, would you mind giving this another try? Bonsai just updated to 1.0 and that should have fixed this issue

IbrahimSam96 commented 5 months ago

@nategraf Look good! Thank you