Skip to content
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

Remove need for matching start ranges #1116

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

Nashtare
Copy link
Collaborator

@Nashtare Nashtare commented Jul 6, 2023

Tiny tweak to remove the need for matching start ranges in the AllRecursiveCircuits initialization. Allows to scrap out ~4.6GB of useless data when serializing (out of the ~6.5GB for the empty_txn_list example, i.e. ~72% reduction).
Also fixes some invalid end ranges.

@npwardberkeley
Copy link
Contributor

Hi! Can you explain a bit more about how this works please? How does the constant gate remove the need for matching start ranges?

@Nashtare
Copy link
Collaborator Author

Nashtare commented Jul 13, 2023

Hi @npwardberkeley! That actually comes as some magic trick out of my hat. I was puzzled for a bit as to why we needed all ranges to start at 9 (the lowest, necessary for KeccakSponge), and upon investigation, I noticed that the BlockCircuit creation was complaining about CommonCircuitData mismatch, when using builder.conditionally_verify_cyclic_proof_or_dummy(). The built dummy_circuit will have this ConstantGate but not the provided common_data, which leads to the assertion failure at the end of the dummy_circuit function.

@npwardberkeley
Copy link
Contributor

Oh I see, that makes sense! Thanks!

@npwardberkeley npwardberkeley merged commit 4893a86 into 0xPolygonZero:main Jul 14, 2023
2 checks passed
@Nashtare Nashtare deleted the recursive_ranges branch October 9, 2023 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants