You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 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.
The text was updated successfully, but these errors were encountered:
TheFrozenFire
changed the title
JSON committer should commit values individually
JSON committer should commit array values individually
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.
From this discord thread: https://discord.com/channels/974410303255232542/1364680340198658238
tlsn/crates/formats/src/json/commit.rs
Lines 160 to 161 in de7a47d
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.
The text was updated successfully, but these errors were encountered: