Skip to content
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

Merged
merged 7 commits into from
Sep 13, 2023
Merged

Conversation

derekpierre
Copy link
Member

@derekpierre derekpierre commented Sep 7, 2023

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 over main to reduce complexity on the nucypher side of things.

Associated changes based on testing from nucypher/nucypher#3213 work.

@derekpierre derekpierre self-assigned this Sep 7, 2023
…nderlying IEncryptionAuthorizer for a specific ritual.

Added tests to ensure result is the same as calling allow list contract directly.
@derekpierre
Copy link
Member Author

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.

@derekpierre derekpierre changed the base branch from main to alpha-13-support September 12, 2023 16:50
@derekpierre derekpierre marked this pull request as ready for review September 12, 2023 16:51
@derekpierre derekpierre changed the title [WIP] Tweaks for Alpha 12 Tweaks for Alpha 12 Sep 12, 2023
@@ -401,17 +407,26 @@ contract Coordinator is AccessControlDefaultAdminRules, FlatRateFeeModel {
return getParticipantFromProvider(rituals[ritualId], provider);
}

function isEncryptionAuthorized(
Copy link
Contributor

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?

Copy link
Member

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.

Copy link
Member

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.

Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call!

@KPrasch KPrasch merged commit a96b83b into nucypher:alpha-13-support Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

4 participants