Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Use blockstack.js W3C crypto #1966
This PR drastically speeds up the user registration and restoration process, by using the native Web Crypto operations in
Some sample benchmarks using a Pixel 3 XL, on both Chrome and Firefox:
Additional performance testing is needed with lower-end Android phones, and regression testing is needed on all platforms.
This PR has an absurd changeset from the process of trying to debug errors while getting this working. Notably, all the synchronous code that needed to be refactored into asynchronous.
Debugging capabilities essentially were non-existent -- like readable stack traces, breakpoints in mocha tests, breakpoints within Chrome, etc.
Some of these notable tangental changes are:
Now that the material code that actually needs changed is known, it is possible to cherrypick out only those changes. Let me know if we want to try that.
hstove left a comment
Overall these are fantastic changes. I was a bit intimidated by the number of files changed, but the vast majority are simple changes due to removing Flow and
The actual crypto code looks sound to me, and is familiar since I had to do some similar migration away from the
I am curious about where exactly we're getting the W3C crypto polyfill. Is it because of the Babel changes, which include
I am impressed and grateful for this PR. I haven't finished a full functional QA yet, but there are tons of QOL improvements in this code.
Functional QA I'm doing:
Signing in with my magic recovery code still seems kind of slow and UI blocking - though not completely. Might have just been a one-off. Signing up was quick and definitely not blocking.
Github social proofs didn't work, but they're probably already broken? I know we changed the
I'm seeing a weird issue with sending a BTC payment. I have $30 USD in my wallet, about 0.004 BTC, and no matter how much I try and send, I get "Not enough coin to fund fees transaction fees. Fees would be 5824, specified spend is 10". I see this comes from
The W3C crypto usage comes from blockstack.js, in this PR blockstack/blockstack.js#737
It's not really a