-
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 Support #244
Shield Support #244
Conversation
✅ Deploy Preview for cheery-moxie-4f1121 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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 bf2f8f4
Happy with the stability of Shield at this point, with various random transactions it's appearing fairly fast for my hardware and also synchronising the balances accurately (even if a little slow, but this is largely due to Blockbook from my inspection).
UX enhancement will be done in a future PR as soon as this one is merged, LGTM as-is.
tACK bf2f8f4 The shielding system seems to work really well from my testing on multiple browsers and system. With UX being worked on a different PR, I think this is ready to go |
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 bf2f8f4
testing has gone very well, i believe we are ready for the polishing up stages
Abstract
This PR adds Shield capabilities to MPW.
When a user imports a seedphrase, a new spending key is generated, following the zip32 protocol.
Using the key, the user is able to view the balance, receive and spend Shield PIVs, including shielding and deshielding to self.
Limitations:
Currently, they're being hosted over on https://duddino.com/sapling-spend.params and https://duddino.com/sapling-output.params.
The parameters can be cached so that they will be downloaded only once per device.
This sync time can be shortened by the use of checkpoints; However, only checkpoints older than the wallet creation time can be safely used, otherwise the wallet might miss some notes/nullifiers, missing some funds at best, or making it unusable at worst.
Currently, this is not a big deal, because we can assume that the latest checkpoint is good, since it has been created before MPW had the capability of making shield transactions, however this might become a problem in the future, as more blocks are created.
This is a limitation of web assembly. Multithreaded support was added, however for it to work, HTTP headers must be set to the following values:
They have been enabled on netlify and the dev server.
If these headers are set to different values, the UI thread will be blocked and the loading bar will not work.
Privacy implications
This can be mitigated by self hosting, or randomly choosing an explorer when syncing.
It's important to note that the more requests an explorer gets, the harder it is to "fingerprint" the requests.
Only selected explorers are whitelisted to be used on the official instance of MPW, and it's unlikely that any of them are logging information, however if a user needs absolute privacy, it's best if they self host. In the near future, a docker image will be provided with each release to make self hosting easy.
Things not covered in this PR:
Testing
Use Shield inputs
in the Send menu).Tests are not passing due to a missing key in the
pivx-shield
package.json
.To make them pass locally, add
"main": "pivx_shield.js"
tonode_modules/pivx-shield/package.json
after runningnpm ci
.This will be fixed next release.
Coauthored with @panleone