-
Notifications
You must be signed in to change notification settings - Fork 391
feat(proof-aggregator): support zisk zkvm #2228
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
base: staging
Are you sure you want to change the base?
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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