Extract protocol classes into nucypher-core#2802
Merged
KPrasch merged 22 commits intonucypher:mainfrom Oct 16, 2021
Merged
Conversation
fjarri
added a commit
to fjarri/nucypher
that referenced
this pull request
Sep 21, 2021
971565b to
fba7477
Compare
fjarri
added a commit
to fjarri/nucypher
that referenced
this pull request
Sep 22, 2021
edb7a37 to
dd36f24
Compare
68c9dc1 to
ae4214c
Compare
fjarri
added a commit
to fjarri/nucypher
that referenced
this pull request
Sep 29, 2021
45d2c54 to
bd57ad7
Compare
All versioning is contained in the protocol objects now
Contributor
Author
|
Updated the newsfragment; should it be |
Member
Either will do. I say misc. |
derekpierre
reviewed
Oct 16, 2021
| def _collect_internal(self) -> None: | ||
| # info | ||
| base_payload = {'app_version': nucypher.__version__, | ||
| 'teacher_version': str(self.ursula.TEACHER_VERSION), |
Member
There was a problem hiding this comment.
Was this tested with prometheus?
Member
There was a problem hiding this comment.
I guess there is a follow-up PR to come - but want to stress that this should be tested either as part of this PR or the next.
Member
There was a problem hiding this comment.
👍🏻 Agreed. A follow up is already open #2809 - It can be included there. In any case we'll definitely stage these changes before pressing a release.
This was referenced Nov 2, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR attempts to extract protocol logic (that can be used e.g. in a JS implementation of nucypher) into a Rust module.
At first, to speed up the process and get a better idea of the API surface, I will just be extracting stuff to a separate Python module (
nucypher/core.py).Changes:
core.py:MessageKitHRACAuthorizedKeyFragTreasureMap/EncryptedTreasureMapReencryptionRequest/ReencryptionResponseRetrievalKitArrangement(and addedArrangementResponse)RevocationNodeMetadataMetadataRequestandMetadataResponseprotocol objectsInvalidSignatureexception (fromcrypto.signing). The ones fromcryptographyand the internal alias inLearnerare removed.Character.verify_from(). The decrypting part of it is now a method inMessageKit.Character.verify_from()to Learner. Fixes Character and Learner both have a verify_from() method that raises different exceptions with the same name #2203AuthorizedKeyFragABI changes (will need to bump serialized versions):
ArrangementMessageKitwith simple byte constantsMessageKitin the serializedRevocationOrderintoVariableLengthBytestring(same as it is already done inTreasureMap) to get rid of the hardcoded encrypted sizepolicy_encrypting_keyinTreasureMap(fixes Merge policy encrypting key into the treasure map #2792)Versioned, so the corresponding variables (TEACHER_VERSION,LEARNER_VERSION), the related machinery, and tests were removed.Other public changes:
teacher_versioncollector from Prometeus - it is not used in the dashboard. It is possible to addNodeMetadata.version_string()as an equivalent.More ABI changes to be added in #2809.