-
Notifications
You must be signed in to change notification settings - Fork 39
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
Shield fixes #354
Shield fixes #354
Conversation
✅ Deploy Preview for cheery-moxie-4f1121 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
A quick middle-of-testing suggestion: Given the one-time param loading is now at the beginning of a Shield spend: the first Shield Tx is obviously very slow and sticks at the start of the progress bar for a long time. Perhaps we should add this loading stage to the text section of the progress bar, then flip back to |
After the latest commits, the progress bar seems non-functional now - but other than that, this is perfect and the params text is also great to have. After this is fixed, getting my tACK. I tested that it doesn't progress anymore by creating 10x 1-PIV SHIELD notes sent from Public, ensuring there were plenty of notes to process, then spent all of them back to Public: the progress bar sat at 0 for a full minute, then bounced to 100% without any granularity. |
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.
Unlocking the wallet is very slow with this PR.
Apart from that everything works fine and the bug is indeed solved
@@ -116,9 +116,15 @@ getEventEmitter().on('shield-sync-status-update', (str, finished) => { | |||
getEventEmitter().on( | |||
'shield-transaction-creation-update', | |||
async (percentage, finished) => { | |||
if (percentage === 0.0 && !finished) { |
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.
In this way at each shield tx it displays "loading shield parameters".
I guess for the moment it's fine since it is only a log to the user, in the future it can be improved
scripts/wallet.js
Outdated
@@ -1063,7 +1063,7 @@ export class Wallet { | |||
} | |||
|
|||
const periodicFunction = setInterval(async () => { | |||
const percentage = 5 + (await this.#shield.getTxStatus()) * 95; | |||
const percentage = await this.#shield.getTxStatus(); |
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.
why did you change this line? It was so to make the loading look faster
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.
tACK 37c7ffc
Only note is the noticeably slower first-unlock during a Shield Tx, which is dependent on internet speed during the .wasm
loading and thus blocks the UI for considerable time - perhaps in a new PR though, merging this is more urgent atm.
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.
tACK 37c7ffc, agree that other changes can be done in another PR
Abstract
Various shield related fixes/improvements.
First commit: Remove sapling prover loading when syncing. It will be downloaded as needed (when creating a shield tx). Add target to getShieldUTXOs, this considerably speeds up shielding when using big wallets
Second commit: Throw directly instead of recreating the error
Third commit: Fix error when restoring wallet when doing a shield tx. Introduced by #325
Testing