Implement a function commit_sparse that computes commitment on a few values.
Its inputs should correspond to 2 parallel arrays, values: Bytes32[], indices: int[].
It returns the commitment of the given values at the positions given by indices.
Rationale: when dealing with LeafNode extensions, we need to split a value into lower and upper parts and commit thus two values.
Currently, we would need to left pad with zeroes to be able to use commit, which is not optimal.
The commit_sparse is inspired by a similar functionality in rust-verkle library.
Implement a function commit_sparse that computes commitment on a few values. Its inputs should correspond to 2 parallel arrays, values: Bytes32[], indices: int[]. It returns the commitment of the given values at the positions given by indices.
Rationale: when dealing with LeafNode extensions, we need to split a value into lower and upper parts and commit thus two values. Currently, we would need to left pad with zeroes to be able to use commit, which is not optimal. The commit_sparse is inspired by a similar functionality in rust-verkle library.