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

DataBus: robust handling of read_counts #821

Closed
ledwards2225 opened this issue Jan 8, 2024 · 0 comments · Fixed by AztecProtocol/aztec-packages#5409
Closed

DataBus: robust handling of read_counts #821

ledwards2225 opened this issue Jan 8, 2024 · 0 comments · Fixed by AztecProtocol/aztec-packages#5409

Comments

@ledwards2225
Copy link
Collaborator

Currently calldata_read_counts must be manually updated simultaneously with each calldata lookup gate. This is error prone. The polynomial calldata_read_counts should be computed all at once either in finalize or in the composer. One way to do this: Iterate through all databus lookup gates (looking for q_busread == 1), extract the read_index (stored in w_r), call get_variable on that index, convert the resulting field element to a size_t or uint32_t, then increment calldata_read_counts at the resulting index.

AztecBot pushed a commit that referenced this issue Mar 24, 2024
Add a `read_calldata` method to clarify and robustify the interface to
calldata. Update the expository DataBus test accordingly.

Closes #821 (I was
proposing something weird in that issue but all I really wanted was for
the updating of read counts to be automated. That's achieved through
simply placing it in read_calldata).
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 a pull request may close this issue.

1 participant