BEEFY: implement equivocations detection, reporting and slashing
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
PR is now complete and ready for review
bot rebase
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.
@andresilva both client-side and frame tests added, PR is ready for review.
bot merge
Error: "Check reviews" status is not passing for https://github.com/paritytech/polkadot/pull/6593
bot merge