Skip to content
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

Meet EOF error when verifying the proof #32

Open
ZhouYuxuan97 opened this issue Jul 13, 2023 · 0 comments
Open

Meet EOF error when verifying the proof #32

ZhouYuxuan97 opened this issue Jul 13, 2023 · 0 comments

Comments

@ZhouYuxuan97
Copy link

When executing the following command,
giza verify --proof=output.bin

it shows EOF error,

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: UnexpectedEOF', cli/src/cmd/verify.rs:38:83
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

There are might be a bug when parsing the proof(output.bin) in giza/air/src/lib.rs file. Sometimes "source" has already been parsed to the end, it can't "read_u64" anymore.

let builtins = match source.read_u64()? {
             1 => vec![Builtin::Output(0)],
             _ => vec![],
         };

I try to add a condition to find out if it reaches the end before parsing, like this

let mut builtins = vec![];
      
if source.has_more_bytes(){
  builtins = match source.read_u64()? {
    1 => vec![Builtin::Output(0)],
    _ => vec![],
  };
}

It works for me now, but I am not sure it's a correct or appropriate debugging(I am new to Stark proving and Rust language)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant