Skip to content

JSON committer should commit array values individually #807

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

Open
TheFrozenFire opened this issue Apr 23, 2025 · 1 comment · May be fixed by #808
Open

JSON committer should commit array values individually #807

TheFrozenFire opened this issue Apr 23, 2025 · 1 comment · May be fixed by #808
Assignees
Milestone

Comments

@TheFrozenFire
Copy link
Contributor

From this discord thread: https://discord.com/channels/974410303255232542/1364680340198658238

// TODO: Commit each value separately, but we need a strategy for handling
// separators.

JsonCommit::commit_array currently commits the whole array only, preventing selective disclosures.

The sensible logic here is to take the rangeset of the array, and the union of the rangesets of the elements, and compute their difference. Then, commit to each range in the difference individually. This should result in commits for the open and close of the array, as well as each separator, with whitespace.

Each element of the array should then be committed to recursively through commit_value.

This should permit a set of reveals to be computed that selectively discloses the values. Further work would be in computing the set of ranges that would reveal a valid JSON array, including separators, for some given subset of array elements.

@TheFrozenFire TheFrozenFire changed the title JSON committer should commit values individually JSON committer should commit array values individually Apr 23, 2025
@sinui0 sinui0 added this to the alpha.11 milestone Apr 23, 2025
@sinui0
Copy link
Member

sinui0 commented Apr 23, 2025

We probably want to put some sort of bound on the number of elements we will commit to individually. This could be presented as a configuration option on the DefaultJsonCommitter.

@TheFrozenFire TheFrozenFire linked a pull request Apr 23, 2025 that will close this issue
@yuroitaki yuroitaki assigned TheFrozenFire and unassigned yuroitaki Apr 24, 2025
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.

3 participants