calculate MainPod id in a dynamic-friendly way (#241)
* calculate MainPod id in a dynamic-friendly way The MainPod id is now calculated with front padding and a fixed size independent of max_public_statements so that introduction gadgets can be verified by a MainPod while paying only for the number of statements they use. This is because with front padding of none-statements we can precompute the poseidon state corresponding to absorbing all the padding statements and only pay constraints for the non-padding statements. The id is calculated as follows: `id = hash(serialize(reverse(statements || none-statements)))` * fix test
This commit is contained in:
parent
82481e88d7
commit
d3fef8392e
6 changed files with 245 additions and 26 deletions
|
|
@ -940,7 +940,7 @@ pub mod tests {
|
|||
|
||||
#[test]
|
||||
fn test_front_great_boy() -> Result<()> {
|
||||
let great_boy = great_boy_pod_full_flow()?;
|
||||
let (_, great_boy) = great_boy_pod_full_flow()?;
|
||||
println!("{}", great_boy);
|
||||
|
||||
// TODO: prove great_boy with MockProver and print it
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue