Skip to content

Incorrect right-sibling hash #894

New issue

Have a question about this project? Sign up for a free account to open an issue and contact its maintainers and the community.

By clicking “Sign up for ”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on ? Sign in to your account

Merged
merged 1 commit into from
Aug 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nightfall-deployer/contracts/MerkleTree_Stateless.sol
Original file line numberDiff line numberDiff line change
Expand Up@@ -166,7 +166,7 @@ library MerkleTree_Stateless {
for (uint256 level = slot + 1; level <= treeHeight; level++) {
if (nodeIndex % 2 == 0) {
// even nodeIndex
output = Poseidon.poseidon(uint256(_frontier[level - 1]), 0); // poseidon hash of concatenation of each node
output = Poseidon.poseidon(uint256(_frontier[level - 1]), nodeValue); // poseidon hash of concatenation of each node

nodeValue = output; // the parentValue, but will become the nodeValue of the next level
prevNodeIndex = nodeIndex;
Expand Down