Skip to content

Tweaks for Alpha 12#116

Merged
KPrasch merged 7 commits intonucypher:alpha-13-supportfrom
derekpierre:alpha-tweaks
Sep 13, 2023
Merged

Tweaks for Alpha 12#116
KPrasch merged 7 commits intonucypher:alpha-13-supportfrom
derekpierre:alpha-tweaks

Conversation

@derekpierre
Copy link
Copy Markdown
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
Copy Markdown
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
return getParticipantFromProvider(rituals[ritualId], provider);
}

function isEncryptionAuthorized(
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

Choose a reason for hiding this comment

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

Opened #118

}

struct Ritual {
// NOTE: changing the order here affects nucypher/nucypher: CoordinatorAgent
Copy link
Copy Markdown
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