Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Make branches updatable with sibling node value #27

Merged
merged 15 commits into from
Mar 15, 2021

Conversation

adlerjohn
Copy link
Member

@adlerjohn adlerjohn commented Mar 10, 2021

Fixes #25.

Add sibling node value to proofs if an updatable proof is requested. This allows leaves added via AddBranch with updatable proofs to be deleted.

@adlerjohn adlerjohn added the bug Something isn't working label Mar 10, 2021
@adlerjohn adlerjohn self-assigned this Mar 10, 2021
@adlerjohn
Copy link
Member Author

Waiting on #21 (comment) to fix CI, but if you run tests manually they pass now.

@musalbas
Copy link
Member

Is this a draft or is it complete? I don't see "oldSiblingData" actually being used by anything, it's just being passed around.

@adlerjohn
Copy link
Member Author

adlerjohn commented Mar 10, 2021

Is this a draft or is it complete? I don't see "oldSiblingData" actually being used by anything, it's just being passed around.

It's complete. oldSiblingData is actually not needed in UpdateForRoot or even deleteWithSideNodes, good catch. Fixed on 8a60137.

deepsubtree.go Outdated Show resolved Hide resolved
proofs.go Outdated Show resolved Hide resolved
smt.go Show resolved Hide resolved
@adlerjohn adlerjohn marked this pull request as draft March 10, 2021 23:17
@adlerjohn adlerjohn marked this pull request as ready for review March 11, 2021 17:42
@adlerjohn adlerjohn requested a review from musalbas March 11, 2021 17:42
Copy link
Member

@tzdybal tzdybal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments and suggestions. Marked as "Request changes" because of missing test cases covering new code.

smt.go Show resolved Hide resolved
proofs.go Show resolved Hide resolved
smt.go Outdated Show resolved Hide resolved
smt.go Outdated Show resolved Hide resolved
@adlerjohn adlerjohn requested a review from tzdybal March 12, 2021 22:34
@adlerjohn adlerjohn merged commit c616a41 into master Mar 15, 2021
@adlerjohn adlerjohn deleted the adlerjohn-add_sibling_node branch March 15, 2021 13:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Delete incorrectly tries to read side nodes
3 participants