HerodotusDev / integrity

Cairo STARK proof verifier for Starknet
Apache License 2.0
67 stars 20 forks source link

optimize the auto-generated of starknet layout #149

Closed swift-hl closed 6 days ago

Okm165 commented 2 months ago

Can u tell me what is the step drop and compiled size drop with the composition array calculations approach only. I don't think the opt of removing trace_generator is smth we want coz it limits the verification to the certain trace size.

swift-hl commented 2 months ago

Can u tell me what is the step drop and compiled size drop with the composition array calculations approach only. I don't think the opt of removing trace_generator is smth we want coz it limits the verification to the certain trace size.

The size of fact_registry_FactRegistry.contract_class.json has decreased from 10,298,372 to 3,961,140.

fmkra commented 6 days ago

In latest version of integrity, we implemented splitting of autogenerated which fixes this issue. The new python script for parsing cairo0 autogenerated and outputting split cairo1 code implements similar optimizations as you did. Most cairo layouts including starknet and starknet_with_keccak are now deployed so I'm closing this pull request.