Slash Authorities for irrefutable misbehavior (#84)

* double-commit and prepare misbehavior

* get misbehavior on completion

* collect misbehavior on drop, not only on success

* kill unused transaction_index field

* add primitive misbehavior report type

* add misbehavior report transaction

* store prior session

* fix set_items

* basic checks for misbehavior reports

* crate for substrate bft misbehavior checking

* integrate misbehavior check crate

* fix comment

* new wasm binaries

* fix hash in test

* import misbehavior transactions into queue

* fix test build

* sign on digest and full proposal when proposing

* detect proposal misbehavior

* fix fallout

* restore balance/bondage types
This commit is contained in:
Robert Habermeier
2018-03-13 16:39:27 +01:00
committed by GitHub
parent de6e7e9136
commit 27c9e6de9a
34 changed files with 1188 additions and 222 deletions
+8 -3
View File
@@ -393,11 +393,16 @@ mod tests {
bft::UncheckedJustification {
digest: hash,
signatures: authorities.iter().map(|key| {
bft::sign_message(
bft::generic::Message::Commit(1, hash),
let msg = bft::sign_message(
bft::generic::Vote::Commit(1, hash).into(),
key,
header.parent_hash
).signature
);
match msg {
bft::generic::LocalizedMessage::Vote(vote) => vote.signature,
_ => panic!("signing vote leads to signed vote"),
}
}).collect(),
round_number: 1,
}