-
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
Tweaks for Alpha 12 #116
Tweaks for Alpha 12 #116
Conversation
…nderlying IEncryptionAuthorizer for a specific ritual. Added tests to ensure result is the same as calling allow list contract directly.
FYI @vzotova , @cygnusv - this is what @KPrasch and I are currently testing with for nucypher/nucypher#3213 as the first stage. These commits are based on the commit before @vzotova 's recent TACoRoot/Child Application changes. |
@@ -401,17 +407,26 @@ contract Coordinator is AccessControlDefaultAdminRules, FlatRateFeeModel { | |||
return getParticipantFromProvider(rituals[ritualId], provider); | |||
} | |||
|
|||
function isEncryptionAuthorized( |
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.
Should the client call this method before attempting to encrypt? Or is it only meant to be called by Ursulas?
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.
It is meant to be called by Ursula. This is convenient so that Ursula does not need to handle call forwarding and interface ABIs.
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.
Just for Ursulas, particularly since one of the parameters is the ciphertext digest, so the encryptor could only call it after the fact. But you're comment is a good one; the encryptor can call this method in the GlobalAllowList contract:
function isAddressAuthorized(uint32 ritualId, address encryptor) public view returns (bool) { | |
return authorizations[lookupKey(ritualId, encryptor)]; | |
} |
Note that this method is specific to GlobalAllowList
, and not to the IEncryptionAuthorizer
interface. I think we probably need something there as well.
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.
Opened #118
@@ -56,6 +56,7 @@ contract Coordinator is AccessControlDefaultAdminRules, FlatRateFeeModel { | |||
} | |||
|
|||
struct Ritual { | |||
// NOTE: changing the order here affects nucypher/nucypher: CoordinatorAgent |
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.
Good call!
This is the first stage of changes - (alpha-12) - which does not include @vzotova 's latest TACoRoot/Child work (alpha-13 already in
main
). That will be done in a separate PR including a rebase overmain
to reduce complexity on thenucypher
side of things.Associated changes based on testing from nucypher/nucypher#3213 work.