-
Notifications
You must be signed in to change notification settings - Fork 40
#1084 follow up: verifier check on dynamic init table #1223
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: master
Are you sure you want to change the base?
Conversation
…/ceno into feat/dynamic_heap_hint_check
| "HeapTable" | ||
| } | ||
|
|
||
| fn max_len(params: &ProgramParams) -> usize { |
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.
no logic change, just make function impl order follow trait
| "HintsTable" | ||
| } | ||
|
|
||
| fn max_len(params: &ProgramParams) -> usize { |
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.
no logic change, just make function impl order follow trait
| name_fn: N, | ||
| assert_zero_expr: Expression<E>, | ||
| ) -> Result<(), CircuitBuilderError> { | ||
| assert!( |
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.
To check assert_eq(public_value[i], public_value[j]) within constrain, both are scalar thus degree is 0
| let chip_proofs = | ||
| builder.get(&zkvm_proof_input.chip_proofs, num_chips_verified.get_var()); | ||
|
|
||
| let chip_proofs_len = chip_proofs.len(); |
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.
Soundness fix: this logic present in rust verifier but not in recursion verifier
| .then(|builder| { | ||
| builder.assert_usize_eq(chip_proofs_len.clone(), Usize::from(1)); | ||
| }); | ||
| } else if circuit_vk.get_cs().with_omc_init_dyn() { |
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.
dynamic init table only allow 1 chip proof per shard
97f5680 to
d87ea19
Compare
To address #1212 (Follow up on #1084)
change highlights
assert_eq(pi[num_instances], pi[mem_length]). Also makenum_instancecould be query from public_values.heap,hintwithinRV32imMemStateConfig, for those terms are tightly couple with riv32im. This design keep the door open to support other ISA.sum_num_instances,log_num_instancefromnum_instances, avoid hint mismatched for malicious manipulationassert_eq!(chip_proofs.len(), 1)assert_eq!(chip_proofs.len(), 0)assert_eq!(chip_proofs.len(), 0 or 1)heapto lower address space to assure "2 * heap.end < Babybear Prime"benchmark
it shows a negligible overhead in
23817600e2e