Proof server fails to prove one of k=17 circuit

I keeping getting this error when I try calling one of my k=17 circuit, even though the correct circuit params are provided and all the contract artifacts are generated properly.

Public transcript input mismatch idx=13 expected=Some(47bbe8a1fc54f9996bcde7e3a775c25971b947986c88f9a50c0a5c7d87b1c041) computed=Some(8d7cd4255ddb6a17deb3646d05e212b1c779e5171272b667846344e516da7615)

NB: I’m using the prebaked proof-server, and all other circuits works fine.

2 Likes

hey @codeBigInt continuing what we were talking about on Discord:

Just to add current context. These options have already been tried:

  • i). When you compile, do you see only your contract folder or others as well?,

  • ii). In the compilation folder, do you see these folders and the correct files for each circuit: .zkir , .prover , .verifier ?,

  • iii). Change the reference point so that it only compiles the contract, not everything in the contracts/src path. It should be something like contracts/src/mycontract.compact. Check that.

  • vi). Modify your compilation script to delete everything in the compilation folder before running a new compilation. All of this must happen during compilation.


I see that the title of your question is now: Proof server fails to prove one of k=17 circuits. That is different from the other message. The problem may lie more in the security parameters and circuits that come from the proof server.

Try this:

  • i) Use this service for proof-server:
  proof-server:
    # container_name: 'quick-starter-proof-server' ---> Add your container name here
    image: 'midnightnetwork/proof-server:4.0.0'
    entrypoint: ['midnight-proof-server', '--network', 'testnet', '--verbose']
    ports:
      - "6300:6300"
    volumes:
      - ${PWD}/.cache/midnight/zk-params:/.cache/midnight/zk-params
    environment:
      RUST_BACKTRACE: "full"
      RUST_LOG: "trace,actix_web::middleware::logger=trace,actix_web=trace"

Note: this is for testnet. If your case is undeployed, change the name of the flag.

  • ii) In the same folder where your docker .yml file is located. Follow these steps:
# Download the fetch-zk-params.sh script
curl -O https://raw.githubusercontent.com/bricktowers/midnight-proof-server/main/fetch-zk-params.sh

# or
wget https://raw.githubusercontent.com/bricktowers/midnight-proof-server/main/fetch-zk-params.sh

# Give execution permissions
chmod +x fetch-zk-params.sh

# Run the script to download ZK parameters
./fetch-zk-params.sh
  • iii) Now recreate your entire container to apply the changes:
docker compose -f {file.yml} up -d

Apply that and tell me what message it sends back!

2 Likes

@codeBigInt has said he is using “prebaked proof-server” - meaning it’s the one with zk parameters already inside so adding a volume with zk-params wont help.

I believe it must be either inconsistent verifier keys or a bug in compact. I would love to see the code of the circuit to be sure :slight_smile:

1 Like

Okay, trying this now.

1 Like

@sergeykisel the problem is that there is a prebaked image, not using the locally created build (as we mentioned earlier in another discussion). For example, one that failed me before was this one:

  proof-server:
    image: "midnight-proof-server:prebaked"
    command: ["midnight-proof-server", "--network", "undeployed", "--verbose"]
    ports:
      - "6300"
    environment:
      RUST_BACKTRACE: "full"

Not all necessary parameters are taken into account, and as far as I understand, the error is due to the fact that the test server cannot test a circuit for a specific k value (which may refer to a safety parameter or a circuit variant).

But yes, looking at the code would allow for a more thorough investigation!

1 Like

I just remebered it same thing its same as using the prebaked proof server

1 Like

Maybe this image would help

1 Like

1 Like

It’s an organizational repo, so might be kinda impossible

We could find any other means go through the code together

1 Like

@codeBigInt It would be more useful, so I could see it better or even try it directly. If your repository is private you could give access and leave a brief README.md that describes the steps until you see the error!

1 Like