substrate icon indicating copy to clipboard operation
substrate copied to clipboard

BEEFY: implement equivocations detection, reporting and slashing

Open acatangiu opened this issue 2 years ago • 3 comments

BEEFY must deal with equivocations. This includes at least:

  • detect equivocations
  • report equivocations
  • initiate slashing

Fixes https://github.com/paritytech/substrate/issues/12692

Polkadot companion: https://github.com/paritytech/polkadot/pull/6593

acatangiu avatar Jan 10 '23 18:01 acatangiu

PR is now complete and ready for review

acatangiu avatar Jan 19 '23 08:01 acatangiu

bot rebase

acatangiu avatar Jan 19 '23 16:01 acatangiu

Rebased

Once https://github.com/paritytech/substrate/pull/13215 goes in (which also adds customizable test runtime api to integration tests), we can also write a test for worker reporting equivocations.

We can "trick" the gadget to equivocate by messing with its PayloadProvider and its persisted state: restart it and have it vote for the same block using a different payload; check that some other test node detects and reports the equivocation.

acatangiu avatar Jan 31 '23 15:01 acatangiu

@andresilva both client-side and frame tests added, PR is ready for review.

acatangiu avatar Feb 13 '23 12:02 acatangiu

bot merge

acatangiu avatar Feb 16 '23 11:02 acatangiu

Error: "Check reviews" status is not passing for https://github.com/paritytech/polkadot/pull/6593

bot merge

acatangiu avatar Feb 17 '23 09:02 acatangiu