Open jannikluhn opened 5 years ago
Oh, and we probably need a method to create such a signature. Maybe PrivateKey.sign_non_recoverable
?
At the highest level I'm :-1: on this.
Wondering if we could segregate this into two classes so that rather than having APIs that might raise an error, you instead decide what type of signature you are working with and don't have to do any value checking.
Signature
-> RecoverableSignature
We can figure out how to deal with names and the existing signature class if we like this approach.
Agreed, two classes sound like the safer approach (probably with a shared base class).
What was wrong?
The v4 identity scheme defined in the ENR spec uses signatures consisting of only
r
ands
, notv
.eth-keys
currently does not allow verification of signatures withoutv
.How can it be fixed?
Suggested approach:
ecdsa_recover
Signature
with an(r, s)
tuple and/or a 64 byte signature. All recover methods should raise some kind of exception (ValidationError
?) ifv
is not set.