-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add NodeMetadataPayload::derive_worker_address()
#2
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 12 12
Lines 369 416 +47
======================================
- Misses 369 416 +47
Continue to review full report at Codecov.
|
I think this is the only place where we use it, so IMHO that would make sense. And I don't think there is a scenario where we need to worry about getting this information ourselves and not trusting whatever we have on our hands at the moment.
From the perspective of the library user more verbose error messages would be helpful (I imagine "signature format fail" would be useful for detecting incompatibility etc.). Splitting evidence verification doesn't help me with readability, personally.
At which stage should we be fixing that? In NuCypher's TransactingPower.sign_message()?
A random idea: What do you think about returning recovery bytes in addition to returning the signature, and making a decision based on the contents of those bytes in |
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 🎉
I left a response to your questions. Please consider re-adding me to review if anything comes up.
bfb7f54
to
225d71d
Compare
NodeMetadata::verify()
NodeMetadataPayload::derive_worker_address()
Yes, for now I settled on that variant (see nucypher/nucypher#2850). The result still passes our
I am not sure I follow, returning from where? |
From Rust side to Python side. |
And support Option<[u8; N]> in arrays_as_bytes
1d0e693
to
bda67c8
Compare
bda67c8
to
78e2f0b
Compare
NodeMetadatPayload.decentralized_identity_evidence
a fixed size array (instead of a boxed slice)NodeMetadataPayload::derive_worker_address()
method to derive the worker address from the evidencepyo3
-generated wrapper code)PyResult
being returned fromto_bytes()
(it is infallible)NodeMetadataPayload.canonical_address
andRevocationOrder.ursula_address
were renamed tostaker_address
.For reviewers:
eth_account.messages.encode_defunct()
), which is marked as deprecated. Here's our chance to possibly change it to something more recent? (pinging @cygnusv)TransactingPower.sign_message()
?