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

Change Prover/Verifier in FRI query phase to do a smaller amount of hashes #100

Open
feltroidprime opened this issue Jun 23, 2023 · 0 comments

Comments

@feltroidprime
Copy link
Contributor

feltroidprime commented Jun 23, 2023

Currently to get the iotas, in :
https://github.com/lambdaclass/lambdaworks_cairo_prover/blob/d358406a7b1307822fc18351ff8397324e867ae5/src/starks/verifier.rs#L170-L174

We are calling the function transcript_to_usize
air.options().fri_number_of_queries amount of times, and cutting usize bits of the hash to get each iota.
https://github.com/lambdaclass/lambdaworks_cairo_prover/blob/d358406a7b1307822fc18351ff8397324e867ae5/src/starks/transcript.rs#L45-L51

However, we could count the number of bits in usize and in the hash, to get more iotas per transcript round.

For example with sha-3/keccak and usize of 64 bits, we could get 4 iotas per transcript, dividing up to 4 the amount of hashes needed for this part in the verifier, which would improve on-chain verification costs.

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