-
Notifications
You must be signed in to change notification settings - Fork 312
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
[Bundle Size][Encryption] Use noble-secp256k1 to replace elliptic dependency #1200
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/blockstack/stacks-js/HBxwbMz2Wn6KyTeDrr9NGzhsV1i7 |
Codecov Report
@@ Coverage Diff @@
## master #1200 +/- ##
==========================================
+ Coverage 64.83% 65.07% +0.24%
==========================================
Files 122 122
Lines 8385 8442 +57
Branches 1542 1548 +6
==========================================
+ Hits 5436 5494 +58
+ Misses 2841 2840 -1
Partials 108 108
Continue to review full report at Codecov.
|
27ad130
to
fec8061
Compare
fec8061
to
05bf889
Compare
@janniks Any further thought's on this PR. Can this be merged or need any further changes.🙏 |
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.
Looks good in general, I will go over the existing tests once I have a moment. The added tests compare equality of elliptic to noble (which we might want to keep just to be sure they are compatible) but is a bit different to testing equality of previous to new implementation. But maybe the remaining tests were already robust enough. I will just double-check...
05bf889
to
fdc7ab0
Compare
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.
This LGTM!
Description
This PR replaces the
elliptic
dependency with@noble/secp256k1
in enryption package.Most of the bundle size is comming from
elliptic
library around130kb
.Reference: https://bundlephobia.com/package/elliptic@6.5.4
@noble/secp256k1
is fast and small in size: https://bundlephobia.com/package/@noble/secp256k1@1.5.5For details refer to issue #1192
Type of Change
Does this introduce a breaking change?
No
Are documentation updates required?
No
Testing information
npm run test
Checklist
npm run test
passes