Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

detect different node, same-key signing in aura #7245

Merged
merged 2 commits into from
Dec 15, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ethcore/src/engines/authority_round/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,14 @@ impl Engine<EthereumMachine> for AuthorityRound {
.expect("Header has been verified; qed").into();

let step = self.step.load();

// this is guarded against by `can_propose` unless the block was signed
// on the same step (implies same key) and on a different node.
if parent_step == step.into() {
warn!("Attempted to seal block on the same step as parent. Is this authority sealing with more than one node?");
return Seal::None;
}

let expected_diff = calculate_score(parent_step, step.into());

if header.difficulty() != &expected_diff {
Expand Down