[untested] wallet: persist dest addrs when updating to FCMP++ wallet#106
Draft
j-berman wants to merge 1 commit intoseraphis-migration:fcmp++-stagefrom
Draft
[untested] wallet: persist dest addrs when updating to FCMP++ wallet#106j-berman wants to merge 1 commit intoseraphis-migration:fcmp++-stagefrom
j-berman wants to merge 1 commit intoseraphis-migration:fcmp++-stagefrom
Conversation
29f12ff to
7bfffa9
Compare
fd9782f to
257b1aa
Compare
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.
Untested, wanted to get your feedback on this approach.
Context: when a user opens a pre-FCMP++ wallet using the updated wallet software, their wallet will need to re-sync from the wallet's restore height in order sync the FCMP++ tree and identify received output paths in the tree.
I trigger a re-sync by calling
clear_softwhen such a wallet first loads. Notably,clear_softdoes not delete any tx keys.For such a wallet, this PR saves destination addrs from confirmed/unconfirmed txs to a separate data store in the wallet cache called
m_recoverable_destsbefore soft clearing. Then upon completingrefresh(), the wallet recovers destinations back into any identified confirmed/unconfirmed txs.I persist
m_recoverable_deststo the wallet cache in case refresh does not execute to completion after the wallet state is cleared, and before the wallet is closed.