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

[keys] Consider assuming a key's point is always non-infinite #7529

Open
nventuro opened this issue Jul 19, 2024 · 1 comment
Open

[keys] Consider assuming a key's point is always non-infinite #7529

nventuro opened this issue Jul 19, 2024 · 1 comment

Comments

@nventuro
Copy link
Contributor

Given #7514 and #7515 we may be able to assume that keys are not infinite. If so, we can reduce the PublicKeys serialization from 12 elements (4 x,y,inf tuples) to 8 (just the x,y coords). This in turn results in a smaller hash, reducing gate counts when reading keys via e.g. #7523.

Simple testing shows a decrease of ~1.4k gates by removing the booleans, so ~2.8k if we're reading keys of two accounts. It may be that these gains are not as big if poseidon performance improves however.

@nventuro
Copy link
Contributor Author

Note that this would also reduce storage costs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant