Feat: Test coverage for merkle related functions and keccak bug fix #39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #35 #37
Keccak bug fix
**Implementation of ByteArray for Keccak Function Input: **
We introduced the ByteArray to concatenate the entries array, which serves as the input for our Keccak function.
** Bug Fix for u64 Span Division and Reversal: **
There was a bug causing information loss for the last element of the array during the division into u64 spans and the subsequent reversal. For instance, given the input 0x111111111111111100111223, the build_u64_array function correctly returned [0x1111111111111111, 0x111223]. However, reversing the endianness of this array resulted in [0x1111111111111111, 0x232111], losing the '00' in the process.
This pull request resolves the issue by considering the last two u64 elements of the initial input and ensuring the size of the reversed output matches the size of the last word plus 8 bytes.
Test coverage
Added additional tests for the merkle tree hook, the keccak computation, and fixing existing bugs with the current tests.
TODO