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

Decrypting wallet takes time visually, when it actually doesn't practically #46

Open
Aleoami opened this issue Oct 28, 2024 · 4 comments

Comments

@Aleoami
Copy link

Aleoami commented Oct 28, 2024

I have a wallet with pretty many UTXOs since I'm mining on TN-11, and with the corresponding number of transactions. Not millions, since I compound them every now and then, but still there are tens, maybe sometimes hundreds thousand of it. The issue is: when I enter password, desktop KNG keep rotating that ring under "Decrypting wallet..." line for indefinitely long, I never had enough patience to wait until the very end. I can estimate though that it takes more than 10 minutes, maybe somewhere around 15 (at i5 [email protected] GHz, 64 GB RAM, NVME SSD and a locally launched TN-11 node - it's "external" to KNG itself but is running on the same PC). But: if I enter the password, see that "Decrypting wallet..." line, and quickly switch to some other tab (i.e. "Metrics") and then immediately back to the "Wallet" tab, I found it already responsive, showing my balance, its pending UTXOs and so on. Looks like something's off with the logic of deciding when the decryption is actually done, from the "Wallet" tab perspective.

@Aleoami Aleoami changed the title Decrypting wallet takes time visuallly, when it actually doesn't practically Decrypting wallet takes time visually, when it actually doesn't practically Oct 28, 2024
@aspect
Copy link
Contributor

aspect commented Oct 28, 2024

Can you do me a favor, create another local wallet (different name) and import your mnemonic into it. Let me know if that shows the same behaviour.

Also, can you please download a version from here https://github.com/aspectron/kaspa-ng/actions/runs/11279696742 (it's in the bottom of the page under Artifacts) and test your local wallet with this version.

@Aleoami
Copy link
Author

Aleoami commented Oct 28, 2024

  1. Created; nope is does not, it decrypts in 2.7 seconds.

  2. This new version acts just the same (plus, unlike my existing version, it hangs when I close it while it's decrypting the wallet. Or, rather, its window does not disappear unlike the previous version's, since, I just checked, both versions continue running and consuming a whole CPU core - it's just that the previous one hides its window beforehand).

@aspect
Copy link
Contributor

aspect commented Oct 28, 2024

ok, thanks. i am currently travelling so earliest i will be able to get to take a look at this is in a week or two.

the problem comes from the tx history. need to think how to handle this properly. probably need to make a custom databas for this.

due to multi-platform compatibility (the need for the framework to access history from native OS and from NodeJs) the history is stored as files and the huge amount of transactions takes a very long time to read them.

this doesn't affect regular users on mainnet as due to decentralization people don't receive such a huge amount of transactions.

nevertheless i'll explore and see how this can be addressed. maybe by using some sort of a database (last time i explored, there was nothing available) or creating our own small db.

to mitigate this immediately, you can find .kaspa folder in your home folder (might be hidden) explore it and you will see a huge list of files in one. if you delete the files, you will delete the history but the wallet open process will start working normally.

@Aleoami
Copy link
Author

Aleoami commented Oct 28, 2024

Thank you. Not that it bothers me in any way, especially since I can switch to another tab and back. Maybe it would worth "simulating" such a kind of user activity and just insert it right after the wallet is actually decrypted but before files start to analyze.

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

No branches or pull requests

2 participants