Skip to content

Intermode node verification support#1040

Merged
KPrasch merged 1 commit intonucypher:hawksbeardfrom
KPrasch:intermode
Jun 3, 2019
Merged

Intermode node verification support#1040
KPrasch merged 1 commit intonucypher:hawksbeardfrom
KPrasch:intermode

Conversation

@KPrasch
Copy link
Member

@KPrasch KPrasch commented Jun 3, 2019

Adds some careful handling of node verification and staking checks during intermode learning.

@KPrasch KPrasch requested review from cygnusv, michwill and tuxxy and removed request for tuxxy June 3, 2019 20:50
@KPrasch KPrasch marked this pull request as ready for review June 3, 2019 20:56
from constant_sorrow import constants
from cryptography import x509
from cryptography.exceptions import InvalidSignature # TODO: Use nucypher exceptions
from cryptography.exceptions import InvalidSignature
Copy link
Member Author

Choose a reason for hiding this comment

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

Im getting a circular dependency when trying to import from nucypher.crypto.signing - Unsure how to proceed exactly

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmmm, tough one. Can't import it in the spot you want to raise specifically?

Copy link
Contributor

@tuxxy tuxxy left a comment

Choose a reason for hiding this comment

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

👍

version = self.TEACHER_VERSION.to_bytes(2, "big")
interface_info = VariableLengthBytestring(bytes(self.rest_information()[0]))
identity_evidence = VariableLengthBytestring(self._evidence_of_decentralized_identity)
identity_evidence = VariableLengthBytestring(self._identity_evidence)
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

# Offline check of valid stamp signature by worker
try:
self.stamp_is_valid()
self.stamp_is_valid(verify_staking=verify_staking)
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@codecov
Copy link

codecov bot commented Jun 3, 2019

Codecov Report

Merging #1040 into hawksbeard will decrease coverage by 0.22%.
The diff coverage is 82.75%.

Impacted file tree graph

@@              Coverage Diff               @@
##           hawksbeard    #1040      +/-   ##
==============================================
- Coverage        83.2%   82.98%   -0.23%     
==============================================
  Files              67       67              
  Lines            8658     8656       -2     
==============================================
- Hits             7204     7183      -21     
- Misses           1454     1473      +19
Impacted Files Coverage Δ
nucypher/crypto/signing.py 85.71% <ø> (ø) ⬆️
nucypher/cli/config.py 90.21% <ø> (-0.11%) ⬇️
nucypher/crypto/api.py 97.53% <100%> (ø) ⬆️
nucypher/characters/lawful.py 88.27% <100%> (ø) ⬆️
nucypher/config/node.py 82.69% <100%> (-0.06%) ⬇️
nucypher/config/keyring.py 90.28% <100%> (-0.04%) ⬇️
nucypher/network/nodes.py 80.68% <77.27%> (-2.41%) ⬇️
nucypher/characters/unlawful.py 93.1% <0%> (-3.45%) ⬇️
nucypher/keystore/keypairs.py 83.72% <0%> (-1.17%) ⬇️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 775d314...2ab9c30. Read the comment docs.

@KPrasch KPrasch merged commit ef4848b into nucypher:hawksbeard Jun 3, 2019
@KPrasch KPrasch deleted the intermode branch July 21, 2020 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants