Add slasher broadcast (#2079)

## Issue Addressed

Closes #2048

## Proposed Changes

* Broadcast slashings when the `--slasher-broadcast` flag is provided.
* In the process of implementing this I refactored the slasher service into its own crate so that it could access the network code without creating a circular dependency. I moved the responsibility for putting slashings into the op pool into the service as well, as it makes sense for it to handle the whole slashing lifecycle.
This commit is contained in:
Michael Sproul
2020-12-16 03:44:01 +00:00
parent 63eeb14a81
commit 0c529b8d52
18 changed files with 414 additions and 193 deletions

View File

@@ -434,6 +434,13 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
.requires("slasher")
.takes_value(true)
)
.arg(
Arg::with_name("slasher-broadcast")
.long("slasher-broadcast")
.help("Broadcast slashings found by the slasher to the rest of the network \
[disabled by default].")
.requires("slasher")
)
.arg(
Arg::with_name("wss-checkpoint")
.long("wss-checkpoint")