WIP: for transactions in the "stable" block range, do not remove their mined-height information in truncation.#2274
Draft
WIP: for transactions in the "stable" block range, do not remove their mined-height information in truncation.#2274
Conversation
…r mined-height information in truncation. Also, never truncate the note commitment tree to greater than the stable depth.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Also, never truncate the note commitment tree to greater than the stable depth.
This work-in-progress will be modified to also set a flag on the wallet's notes once the shard fragment after the note has been fully scanned and the end of that scan range is within the stable block range; this flag will then supersede the scan-queue based determination for spendability for notes received within the stable block range. For notes received within the unstable range, we still need to consult the scan queue, but since that's only 100 blocks we can dispense with that quickly.
These changes will mean that notes that have been previously determined to be spendable (in terms of our ability to construct witnesses) will remain spendable so long as the 100 blocks at the chain tip have been scanned.
Note that we should also make sure that spentness determinations based on discovered nullifiers also be considered final for spending transactions within the stable range as part of this effort.