-
Notifications
You must be signed in to change notification settings - Fork 775
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
Util: Signature ecsign / ecrecover functionality #1961
Comments
|
I think we should still tackle, however too short-termed for Beta 1 so we should rather target Beta 2. Open to be picked up. Side note, had another closer look, for this to work (so: add Correct me if I am wrong here anybody. 😋 |
We have a function 'should fail on an invalid signature (v = 29)' |
Have also removed the "urgent" label here and transformed this into a "normal" issue. 🙂 If this get's any feeling of "rush", in doubt rather leave. |
(we can also add this in a non-breaking way later on by just making the |
#2051 Has been hanging out for a while. I've been picking at it, adding tests and removing extraneous code to improve the |
Yes, sure. Will have a look soon. |
Some last minute thinking about the signature functionality for the breaking releases we now have in signature.ts in
Util
, especially regarding the role of thev
andrecovery
value.This was a bit triggered by stumbling upon #1597 which mentions the
ecsign()
function, which we haven't touched yet (regarding the aspect from above) during the up-till-now refactoring work.So the thing is
v
is still returning the calculated values (so e.g. "+27" for legacy, "+ chainId + additional stuff" for typed tx), and people might or might not need rather therecovery
value.I wondered in a first round if it would make sense to just add plain
recovery
to theECDSASignature
interface and just return the plainrecovery
value in addition to what we return asv
at the moment. Then people can choose what to use depending on their needs?I have to admit though that I am still not 100% saddle-proof on the semantics of names, so on the very correct usage of
v
(that one in particular),recovery
andyParity
.My current assumptions are:
v
: Legacy -> the "recovery + 27" stuff, Typed: the "recovery + chainId + stuff" stuff (is/can this still called v?)recovery
==yParity
(is this also 100% correct?)Will circle in @jonathansmirnoff (from the issue above) here, everyone else welcome to join as well.
My current assumption is still that the suggestion from above (adding
recovery
to the interface) would help and would be very easy to be added (still breaking, so worth to do now).The text was updated successfully, but these errors were encountered: