snarkVM
snarkVM copied to clipboard
[Feature] Introduce the AleoLocator on value commitments
🚀 Feature
The following are remaining todos to complete the value balance sprint:
- Introduce n AleoLocator for value commitment and value balance commitment
- Remove
#[ignore]ontest_block_serde_json,test_transaction_serde_json,test_transactions_serde_json,test_transition_serde_json -
please review my Network changes carefully. In particular, I still am not confident on the window sizes. Note that changing from (4, 350) -> (8, 125) doesn't seem to work despite the same size.
After some investigation, I found that the homomorphic properties of our Pedersen commitments don't seem to hold if the WINDOW_SIZE is less than SCALAR_BITS which in this case is 253.
I believe it has to do with this operation:
// Compute h^r.
let scalar_bits = BitIteratorLE::new(randomness.to_repr());
for (bit, power) in scalar_bits.into_iter().zip(&self.random_base) {
if bit {
output += power
}
}
where the zip may terminate early because self.random_base.len() = WINDOW_SIZE and scalar_bits.len() = 253. This has me curious about if this operation is implemented correctly since those last bits are simply disregarded.