Skip to content

Remove IndisputableEvidence and related machinery#2699

Merged
cygnusv merged 4 commits intonucypher:mainfrom
fjarri:adjudicator-delenda-est
May 20, 2021
Merged

Remove IndisputableEvidence and related machinery#2699
cygnusv merged 4 commits intonucypher:mainfrom
fjarri:adjudicator-delenda-est

Conversation

@fjarri
Copy link
Copy Markdown
Contributor

@fjarri fjarri commented May 18, 2021

Type of PR:

  • Other

Required reviews:

  • 3

What this does:
Removes IndisputableEvidence, utilities that were only used in it, and tests that check it.

Why it's needed:
Currently IndisputableEvidence can 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 the Adjudicator contract 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:

  • removed IndisputableEvidence
  • removed recover_pubkey_from_signature
  • removed nucypher.types.Evidence
  • Bob._reencrypt() returns a list of offender Ursulas on failure instead of list of evidences
  • removed slashing sections from estimate_gas.py
  • _mock_ursula_reencrypts() returns a PRETask instead of IndisputableEvidence, and does not accept a corrupt_cfrag kwarg
  • removed test_slashing() from test_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 for StakingEscrow.
  • removed get_coordinates_as_bytes() and simplified canonical_address_from_umbral_key()
  • moved get_signature_recovery_value() to the only test where it is used.
  • removed tests:
    • tests/acceptance/blockchain/actors/test_investigator.py
    • tests/acceptance/blockchain/agents/test_adjudicator_agent.py
    • tests/contracts/lib/test_reencryption_validator.py
    • tests/contracts/main/adjudicator (whole folder)
    • tests/unit/crypto/test_coordinates_serialization.py
    • tests/unit/crypto/test_umbral_signatures.py

Note that I kept AdjudicatorAgent in place for now, because it seems to be used in deployment.

fjarri added a commit to fjarri/nucypher that referenced this pull request May 18, 2021
@fjarri fjarri force-pushed the adjudicator-delenda-est branch 2 times, most recently from 76fb3ba to a6f2bd9 Compare May 18, 2021 04:21
@fjarri fjarri added Code Quality 🔧 Pertaining to code quality improvements Slashing Effects slashing and punishment labels May 18, 2021
@fjarri fjarri force-pushed the adjudicator-delenda-est branch 2 times, most recently from 46e8282 to 436189f Compare May 18, 2021 04:59
@fjarri fjarri marked this pull request as ready for review May 18, 2021 05:12
Copy link
Copy Markdown
Member

@KPrasch KPrasch left a comment

Choose a reason for hiding this comment

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

Looks like the changes we discussed in the call.

Let's revisit our approach to slashing soon 🙏🏻

@fjarri fjarri force-pushed the adjudicator-delenda-est branch from 436189f to b52036b Compare May 18, 2021 20:14
Copy link
Copy Markdown
Member

@cygnusv cygnusv left a comment

Choose a reason for hiding this comment

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

Cleanly done. Thanks @fjarri !

Copy link
Copy Markdown
Member

@derekpierre derekpierre left a comment

Choose a reason for hiding this comment

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

🎸

@cygnusv cygnusv merged commit 520a648 into nucypher:main May 20, 2021
@fjarri fjarri deleted the adjudicator-delenda-est branch June 7, 2021 20:45
@fjarri fjarri mentioned this pull request Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Code Quality 🔧 Pertaining to code quality improvements Slashing Effects slashing and punishment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants