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

ENH: Rollup Pedersen Commitments #42

Open
thomas-quadratic opened this issue Oct 6, 2023 · 0 comments · May be fixed by #45
Open

ENH: Rollup Pedersen Commitments #42

thomas-quadratic opened this issue Oct 6, 2023 · 0 comments · May be fixed by #45

Comments

@thomas-quadratic
Copy link
Member

Pedersen Commitments at the moment in the nativelib does not implement map_to_field.

Commitments are Bandersnatch group elements. There are two reasons why we need to serialise this value:

1. To roll commitments up the trie recursively: we commit to scalar field elements. To use commitments as values of another commitment, we need a map element -> scalar field. This is not to_bytes(), but is map_to_field(). It uses x/y in extended coordinates, and converts base field to scalar field via integer reprs.
2. To  save the commitment in the trie: in this case, we need full and correct ser/des. Actually, to_bytes() seems good enough, as with the x affine coordinate, we can retrieve an equivalent point. This is implemented in from_bytes().

We need to deal with rolling-up commitments.

@agnxsh agnxsh linked a pull request Oct 13, 2023 that will close this issue
8 tasks
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