feat(proof-aggregator): support zisk zkvm#2228
Open
MarcosNicolau wants to merge 37 commits intostagingfrom
Open
feat(proof-aggregator): support zisk zkvm#2228MarcosNicolau wants to merge 37 commits intostagingfrom
MarcosNicolau wants to merge 37 commits intostagingfrom
Conversation
…rogram in zisk chunk aggregator
Changes to gas cost
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
| .db | ||
| .insert_task( | ||
| &recovered_address, | ||
| AggregationModeProvingSystem::ZISK.as_u16() as i32, |
Contributor
There was a problem hiding this comment.
Every time we use the as_u16 method, we end up casting the result to i32. Why do we convert it to u16 in the first place?
| let mut merkle_root = [0u8; 32]; | ||
| for (idx, word) in publics.iter().enumerate() { | ||
| let start = idx * 4; | ||
| merkle_root[start..start + 4].copy_from_slice(&( *word as u32).to_le_bytes()); |
Contributor
There was a problem hiding this comment.
This cast from u64 to u32 can silently truncate if the value exceeds the u32 maximum value. I think it may be worth ensuring that this cannot happen here.
| } | ||
|
|
||
| // Next entry is the number of public inputs set by the program with 'ziskos::set_output' | ||
| // we should end up with a vector of length 4 as the public input is a 256 bits digest |
Contributor
There was a problem hiding this comment.
If the vector is length 4 and each element of the vector is processed to a u32, then with the processing, we will end up with a 16-byte output, not a 32-byte one.
…ry machine + redeploy contracts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds zisk in aggregation mode.
How to test
For proving
Setup:
feature/bn128branch:cargo build --release # Or with gpu proving cargo build --release --features gpuoption 2: Building from source, see here.provingkeyandprovingKeySnarkinto~/.zisk/.Running
Type of change
Please delete options that are not relevant.
Checklist
testnet, everything else tostaging