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

more accurate row usage estimation in capacity checker #165

Open
lispc opened this issue Jul 18, 2023 · 0 comments
Open

more accurate row usage estimation in capacity checker #165

lispc opened this issue Jul 18, 2023 · 0 comments

Comments

@lispc
Copy link
Collaborator

lispc commented Jul 18, 2023

currently the algorithm is for each tx, we build an witness block, then calculate row usage of each subcircuit of this tx, then add the usage vector and find max inside the acc vector.

This algorithm will count some data redundantly. For example, if 2 tx shares same bytecode, then the len of bytecode circuit is counted twice. Overestimated.

We may impl a function "acc_witness_block += tx_witness_block"? Inside this function we do some basic de-duplicate and make more accurate estimation.

Pricinple: row estimation should be fast, a bit over estimation is allowd. Under estimation is seen as bug and should be avoided.

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

No branches or pull requests

1 participant