-
Notifications
You must be signed in to change notification settings - Fork 778
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
SettingsWallet: Update scan transaction for changes to behavior in monero repo PR 8566 #4051
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Patch looks ok, why is this necessary now?
Assume a user receives tx0 then tx1. Assume the wallet has already scanned both txs. The user then calls First the wallet will remove tx1 and tx0, then re-process tx0 then tx1 in order. In monero-project/monero#8566, when the wallet re-processes tx1, I chose to ignore the The GUI updates the displayed balance inside this callback: Lines 770 to 779 in 62878a0
So without this PR here, and with the new PR in the Monero repo, the balance the GUI displays after calling This PR makes sure to update the balance after Alternatively I could have re-fired the callback for all txs but that's weird in the CLI, since it will indicate feedback to the user that they received both tx0 and tx1 which is confusing to the user because the user only requested to scan tx0. This PR wasn't necessary before my Monero repo PR because the balance wouldn't change at all when re-scanning a tx before. |
pages/settings/SettingsWallet.qml
Outdated
console.error("Error: ", currentWallet.errorString); | ||
if (currentWallet.errorString == "The wallet has already seen 1 or more recent transactions than the scanned tx") { | ||
informationPopup.title = qsTr("Error") + translationManager.emptyString; | ||
informationPopup.text = currentWallet.errorString + ".\n\nIn order to rescan the transaction, you can re-sync your wallet by resetting the wallet restore height in the Settings > Info page. Make sure to use a restore height from before your wallet's earliest transaction." + translationManager.emptyString; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qsTr() missing
Edit: Or wait, since we don't have translated error strings for the first message it might make sense to keep in in English.
Spotted by @plowsof: the GUI unexpectedly assumes simple mode daemons are trusted. Updated to ensure they do not. I don't see any issues with this today -- features that would be harmful when connected to an untrusted daemon are already not available in simple mode (rescanning spents, key image sync). However, without this change, and with the change to scan transaction in the monero repo, simple mode users would be left at added risk using the scan transaction feature, which is supposed to error out as in the screenshot above and described here. |
568eff6
to
1215a6e
Compare
@selsta advised me on what specific things should be tested. The new changes/fixes work perfectly now,
Thank you! my test script |
@selsta raised a valid point to me that bootstrap mode wallets don't need to be considered trusted when the user's daemon is fully synced. I don't see a particularly clean way to guarantee this behavior and figure it's safer to default assume the daemon is untrusted for bootstrap mode wallets |
EDIT: also ensures GUI simple mode and bootstrap mode users default to "untrusted" daemon
scanTransaction
in order to reflect correct balance along with wallet2: fix rescanning tx via scan_tx [release] monero#8566