Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Allow submitting offences from root #11352

@kianenigma

Description

@kianenigma

Would be very helpful for testing if there was a way for root e.g. sudo in a dev-chain to create an offence. This would help you test all sorts of things around the slashing and offence code.

Ideally, this transaction would only accept one parameters: offenders: Vec<(T::AccountId, Perbill)>, and slash each of them with that fraction.

One way to do this would be to add this transaction to the offences pallet. But it won't be able to work with the api above (offences pallet needs FullIdentification), and it would also pollute all runtime with this pallet.

An alternative is to build a custom, minimal pallet that only does this.

This new pallet should strictly depend on pallet-session, pallet-staking, and pallet-offences in its trait Config.

Having all 3 of the above, realizing the interface offenders: Vec<(T::AccountId, Perbill)> should also be possible.

Metadata

Metadata

Assignees

Labels

Z2-mediumCan be fixed by a coder with good Rust knowledge but little knowledge of the codebase.Z6-mentorAn easy task where a mentor is available. Please indicate in the issue who the mentor could be.

Type

No type

Projects

Status

✅ Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions