Skip to content
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

[PoC] Add resync button #12959

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Conversation

Szpoti
Copy link
Collaborator

@Szpoti Szpoti commented Apr 30, 2024

(Messed up my master branch in the last PR)

Fixes #2005

Now the user can press the Resync button under Wallet Settings -> Tools.
It will open a dialog, and if OK is pressed, the Height and TurboSyncHeight will be set to 0, and the wallet will shut down.

Calling ForceTerminate is needed because the open dialog won't let Wasabi to terminate the simple way.
This means that if coinjoin is in critical state, we will terminate whatsoever. This should be changed.

@turbolay
Copy link
Collaborator

Few notes on a Resync Button, not on the implementation:

  • Currently, the resync flow is really really wrong, because it tests an unnecessary number of keys. Fixing this was the point of WIP: Don't test more that MinGapLimit clean keys #12668 but this concept is parked until Clean the Label Chaos #12730, reason being that it's impossible (at least for my skills) to implement this concept without affecting the normal flow. Only way would be to stop relying on the stored state of the KeyManager, but currently it loads the state because of the labels. So by changing how the labels are loaded, we can remove easily the loading of HdPubKey state in the KeyManager. This is the reason why the resync button shouldn't be prioritized, but it's not a reason not to have it anyway.
  • An UI resync workflow must have at least a text box to select the starting Height. At best, we could have a slider for the estimated date of the starting block something like "resync the last 10 days", because resyncing to 0 is almost all the time useless
  • It would be great in the resync workflow to include a text box to change the MinGapLimit. We discussed it yesterday during a RR and it would probably be the best place to put such settings, reason being that it's directly linked to resync.

Copy link
Collaborator

@yahiheb yahiheb left a comment

Choose a reason for hiding this comment

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

cACK

Just few additional notes and nits:

  • I think the resync button should restart Wasabi when used instead of only shutting it down and then the user has to start it manually.
  • Also we should have some separation between the tools. With this it looks like Resync button is part of the recovery wallet verification.
    image

Caption="Signal to rescan the wallet"
EnableBack="{Binding EnableBack}"
EnableCancel="{Binding EnableCancel}"
EnableNext="True" NextContent="Save"
Copy link
Collaborator

Choose a reason for hiding this comment

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

To match the text:

Suggested change
EnableNext="True" NextContent="Save"
EnableNext="True" NextContent="OK"

<InfoMessage>
<DockPanel>
<Button Margin="50 0" Theme="{StaticResource AccentButton}" Command="{Binding SignalWalletResyncCommand}" Content="Resync Wallet" DockPanel.Dock="Right" />
<TextBlock Text="If your funds are missing, you can resynchronize wallet. Once you restart Wasabi, it can take several hours to rescan and find all your funds." />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<TextBlock Text="If your funds are missing, you can resynchronize wallet. Once you restart Wasabi, it can take several hours to rescan and find all your funds." />
<TextBlock Text="If your funds are missing, you can resynchronize your wallet." />

</InfoMessage>
<InfoMessage>
<DockPanel>
<TextBlock Text="Rescanning the wallet could take several hours, based on how many transactions your wallet had." />
Copy link
Collaborator

Choose a reason for hiding this comment

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

that can take some time depending on the size of your wallet (how many transactions it had)

Suggested change
<TextBlock Text="Rescanning the wallet could take several hours, based on how many transactions your wallet had." />
<TextBlock Text="Rescanning the wallet could take some time depending mainly on its size (Number of transactions)." />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resync Wallet Button
3 participants