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

Simplify hashToGroup #1546

Merged
merged 5 commits into from
Apr 16, 2024
Merged

Simplify hashToGroup #1546

merged 5 commits into from
Apr 16, 2024

Conversation

mitschabaude
Copy link
Collaborator

@mitschabaude mitschabaude commented Apr 9, 2024

This simplifies Poseidon.hashToGroup(), and makes it less easy to misuse, by already asserting the result has an even y coordinate in-circuit, and not leaving that to the caller.

The API also becomes simpler: it just returns a Group

We also add Poseidon.Unsafe.hashToGroup() with a non-deterministic result, for callers who want to optimize in a custom way

bindings: o1-labs/o1js-bindings#264

@garwalsh garwalsh added the v1 Prerequisite for o1js v1.0 label Apr 9, 2024
Base automatically changed from feature/no-shifted-scale to main April 16, 2024 08:49
@mitschabaude mitschabaude marked this pull request as ready for review April 16, 2024 09:11
@mitschabaude mitschabaude merged commit 932d282 into main Apr 16, 2024
12 checks passed
@mitschabaude mitschabaude deleted the feature/simple-group-hash branch April 16, 2024 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1 Prerequisite for o1js v1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants