Remove IndisputableEvidence and related machinery#2699
Merged
cygnusv merged 4 commits intonucypher:mainfrom May 20, 2021
Merged
Remove IndisputableEvidence and related machinery#2699cygnusv merged 4 commits intonucypher:mainfrom
cygnusv merged 4 commits intonucypher:mainfrom
Conversation
fjarri
added a commit
to fjarri/nucypher
that referenced
this pull request
May 18, 2021
76fb3ba to
a6f2bd9
Compare
46e8282 to
436189f
Compare
KPrasch
reviewed
May 18, 2021
KPrasch
approved these changes
May 18, 2021
Member
KPrasch
left a comment
There was a problem hiding this comment.
Looks like the changes we discussed in the call.
Let's revisit our approach to slashing soon 🙏🏻
436189f to
b52036b
Compare
Merged
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.
Type of PR:
Required reviews:
What this does:
Removes
IndisputableEvidence, utilities that were only used in it, and tests that check it.Why it's needed:
Currently
IndisputableEvidencecan only lead to the slashing of an Ursula if she signs an incorrect cfrag and sends it to Bob. A minimally competent malicious Ursula won't expose herself that way, so it is not particularly useful.Additionally, it is discarded after creation in the current codebase - it is not even sent out if the cfrag is invalid.
As discussed on a meeting, we remove
IndisputableEvidence(to help with the adoption of the new Umbral), but keep theAdjudicatorcontract for now because of additional actions required to change the deployment process. But eventually it needs to be updated to do something useful. See #305.List of changes:
IndisputableEvidencerecover_pubkey_from_signaturenucypher.types.EvidenceBob._reencrypt()returns a list of offender Ursulas on failure instead of list of evidencesestimate_gas.py_mock_ursula_reencrypts()returns aPRETaskinstead ofIndisputableEvidence, and does not accept acorrupt_cfragkwargtest_slashing()fromtest_intercontract_integration.py(note that I had to add the commitments from this tests to the next one,test_withdraw()). There's already a slashing test forStakingEscrow.get_coordinates_as_bytes()and simplifiedcanonical_address_from_umbral_key()get_signature_recovery_value()to the only test where it is used.tests/acceptance/blockchain/actors/test_investigator.pytests/acceptance/blockchain/agents/test_adjudicator_agent.pytests/contracts/lib/test_reencryption_validator.pytests/contracts/main/adjudicator(whole folder)tests/unit/crypto/test_coordinates_serialization.pytests/unit/crypto/test_umbral_signatures.pyNote that I kept
AdjudicatorAgentin place for now, because it seems to be used in deployment.