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

Split Commitments for structs #328

Open
lydiagarms opened this issue Aug 19, 2024 · 0 comments
Open

Split Commitments for structs #328

lydiagarms opened this issue Aug 19, 2024 · 0 comments

Comments

@lydiagarms
Copy link
Contributor

lydiagarms commented Aug 19, 2024

Currently starlight does not support split commitment for structs.

The main hurdle currently is that the splitCommitments.zok circuit cannot handle structs. The value input (which is the value of the commitment that needs to be split) is a field, but we need it to be a struct.

The solution would be for every struct defined in the contract to create a new splitCommitment circuit. For example if we have the structs defined struct1, struct2, struct3 we would need splitCommitmentsstruct1.zok, splitCommitmentsstruct3.zok, splitCommitmentsstruct3.zok.

Also look into whether we can do the same for joinCommitments. This is complicated by the fact we need to check whether the amount in a struct is high enough for every property.

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

No branches or pull requests

1 participant