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

Reduce constraint count of args_hash #7272

Closed
Tracked by #7167
LHerskind opened this issue Jul 2, 2024 · 2 comments · Fixed by #7284
Closed
Tracked by #7167

Reduce constraint count of args_hash #7272

LHerskind opened this issue Jul 2, 2024 · 2 comments · Fixed by #7284
Assignees

Comments

@LHerskind
Copy link
Contributor

LHerskind commented Jul 2, 2024

The current args_hash may contain up till 4096 elements, split in 64 chunks of size 64.

By allowing really big input values, we are currently increasing the cost of every single contract function. I'm not sure how this will be impacted by a databus, @LeilaWang might know?

Nevertheless, if the databus is not making a significant diff here, I think it will be worth it to reduce both constants to 16 instead.

Current cost: ~44K
Cost with 16: ~15K

@LeilaWang
Copy link
Collaborator

My understanding is, with databus, it will be way cheaper to commit to the data (public inputs). So it will allow us to cheaply "pass" the entire args array to a call, instead of hashing it to pass a single agrs_hash.

@LHerskind
Copy link
Contributor Author

My understanding is, with databus, it will be way cheaper to commit to the data (public inputs). So it will allow us to cheaply "pass" the entire args array to a call, instead of hashing it to pass a single agrs_hash.

Sounds cool. Will the databus also be usable for other calls, just from mikes comment on one of the other issues/prs sounded like it was not clear if there was enough room on the bus? Or maybe I misread it. (cannot find the comment right now though 🤔)

@LHerskind LHerskind self-assigned this Jul 3, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in A3 Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants