-
Notifications
You must be signed in to change notification settings - Fork 295
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
Updated hdkey dependency from v1.1.1 to v2.0.1 #127
Conversation
hm that's not good, 3 tests failing (ci link):
|
I had very similar errors lately. In my case, the problem was that in |
I fixed it upstream. |
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.
The upstream fix has already been published. We should just change the minimum version in the package.json
.
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.
great, passing! ✅
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.
LGTM
great, I'll merge in |
I didn't know that GH prevented merges until reviewers that requested changes approve a PR, sorry about that 😅 |
haha no worries, yeah i think it is a repo setting |
@alcuadrado @ryanio Great guys that you figured this out here, Patricio special thanks for the upstream fix, think these things are always the ones where the ecosystem benefits most at the end! 👍 this we are now really closing in on the |
I will circle in @fanatid here since I wonder if this should this really be the case? And woudn't the root-addressing fix rather be in the |
Hi. Which methods modify buffers? |
Likely @alcuadrado can give an answer (or a hint) here, you'll have to wait for Argentinian time zone morning though! 😄 |
ok, just checked code/readme, probably I'll not need wait morning in Argentinian time zone :D This 4 functions do in-place operations:
I changed these functions for 4.x because Should I make API.md more clear about this? Should I put some dangerous note to README.md? (Not sure how much people read API.md) |
Thanks for the quick check 😄 , I'll nevertheless let an answer open to @alcuadrado since he normally has some deeper rooted opinion than me on questions like these. |
I'd modify this part of API.md "In place operations. Some functions doing in place operations" to include a list of all of them. In general, I'd try to avoid changing the semantics of a function without changing its name and/or type, as people tend to just bump version numbers without much care. |
This can still be done by deprecating the functions with a warning, and expose them with another name. Something like: import * as secp256k1 from "secp256k1";
export function privateKeyTweakAdd(privateKey: Uint8Array, tweak: Uint8Array): Uint8Array {
console.warn("privateKeyTweakAdd is deprecated. Please use privateKeyTweakAddInPlace");
return privateKeyTweakAddInPlace(privateKey, tweak);
}
export function privateKeyTweakAddInPlace(privateKey: Uint8Array, tweak: Uint8Array): Uint8Array {
return secp256k1.privateKeyTweakAddInPlace(privateKey, tweak);
} |
Yes, I would also agree that it is a good suggestion to deprecate the existing functions, otherwise this can easily lead to serious problems if people do their usual upgrading and don't have a close-enough look. |
Eventually I would even be a bit more explicit on the warning message, like:
|
Yay. 😄 🎉