snarkVM
snarkVM copied to clipboard
Hashes - ARC-81
Motivation
This pull request introduces changes to the Hash instructions in the synthesizer/program/src/logic/instruction/operation/hash.rs file. The main focus is on improving the handling of destination types and adding support for additional array types in hashing operations (sha3 and keccak).
It is a step forward for the implementation of ARC-81.
Test Plan
Let me know how you prefer to test this
Thanks @anstylian for taking an attempt at ARC-81! I think this approach will need careful consideration before we move forward. Specifically we'd like to:
- Ensure the approach is consistent in design. In particular, I'd like to be certain that the bespoke variants don't create confusion for users and tech debt in the future.
- Ensure the circuits are sufficiently constrained.
- Thoroughly test the implementation. One property that needs testing is that the output arrays are correctly constructed. I imagine there are more.
@d0cd, do you have any suggestions for testing?
- Should we consider adding the result of the hash in arrays of u128?
- Should we consider a specific type for hash results?