You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think we may have overlooked the impact of FINALIZE covenants on locked coins balances in the wallet. They are unusual because it is the only case where locked coins leave the wallet. Meaning someone else's locked coin balance goes up. The current txdb functions lockBalances() and unlockBalances() process covenants received into the wallet, however in this case we must also catch FINALIZE as it is being sent, since our own locked coin balance goes down (along with the total balance - name and coins get transferred)
TODO:
Evaluate the impact of this change on exiting wallets in use. Do we need another wallet DB migration?
Will some users have to completely restore wallet from seed and rescan like the claim-to-register issue?
Let's make sure REVOKE and TRANSFER aren't lingering issues as well
According to my covenant statistics script, at this time there are 14 FINALIZE covenants confirmed on the blockchain, for a total value of 3,700.500000 HNS. Both the sender and receiver of these names will have inaccurate locked coin balances, that may end up throwing an assertion error depending on future wallet activity.
Similar PRs recently merged affecting txdb locked coins computation:
Good idea. I also think that like the change migration bug, we should evaluate and merge this fix ASAP to prevent new wallet corruption in the community, but then we need to figure out if another migration is necessary for wallets that have already been corrupted.
Ok after sitting on this for a long time, I think we should merge as is. I tried to play with a migration fix this morning but I think the best method will be a Deep Rescan and again we'll just have to explain in the CHANGELOG
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
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.
I think we may have overlooked the impact of FINALIZE covenants on locked coins balances in the wallet. They are unusual because it is the only case where locked coins leave the wallet. Meaning someone else's locked coin balance goes up. The current txdb functions
lockBalances()andunlockBalances()process covenants received into the wallet, however in this case we must also catch FINALIZE as it is being sent, since our own locked coin balance goes down (along with the total balance - name and coins get transferred)TODO:
According to my covenant statistics script, at this time there are 14
FINALIZEcovenants confirmed on the blockchain, for a total value of 3,700.500000 HNS. Both the sender and receiver of these names will have inaccurate locked coin balances, that may end up throwing an assertion error depending on future wallet activity.Similar PRs recently merged affecting txdb locked coins computation:
#438
#387
#262