Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Timber updates sibling paths using incoming leaves. #584

Merged
merged 5 commits into from
Apr 4, 2022

Conversation

IlyasRidhuan
Copy link
Contributor

This closes #581 and is proof that #540 can be solved statelessly. Activating this functionality across client, optimist and wallet is sufficiently large and complex to warrant another PR.

This PR allows Timber to statelessly update a sibling path for a leaf index to account for the insertion of new leaves. This removes the restriction that spending commitments must reference the block these commitments were "mined" in.

Unit/Property tests (Check Sibling Path Increment) are included and can be run using
npx mocha --timeout 0 --bail --exit test/timber.test.mjs

Note There is duplication as the common-files update must also happen in the wallet directory. These can't share the same timber file due to a restriction in create-react-app including files outside of wallet/src

@IlyasRidhuan IlyasRidhuan temporarily deployed to AWS March 17, 2022 17:33 Inactive
@IlyasRidhuan IlyasRidhuan temporarily deployed to AWS March 20, 2022 22:18 Inactive
@Westlad Westlad merged commit 3e4ef59 into master Apr 4, 2022
@Westlad Westlad deleted the ilyas/move-siblingPath branch April 4, 2022 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the Timber class statelessly update siblingPaths
3 participants