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

Conversation

rphmeier
Copy link
Contributor

@rphmeier rphmeier commented Dec 8, 2017

To add a helpful warning message after confusing a few of us :)

@rphmeier rphmeier added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. labels Dec 8, 2017
Copy link
Collaborator

@tomusdrw tomusdrw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

@tomusdrw tomusdrw added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Dec 11, 2017
@rphmeier rphmeier added A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. and removed A8-looksgood 🦄 Pull request is reviewed well. labels Dec 11, 2017
@5chdn 5chdn added this to the 1.9 milestone Dec 11, 2017
@tomusdrw tomusdrw closed this Dec 11, 2017
@tomusdrw tomusdrw reopened this Dec 11, 2017
@rphmeier rphmeier added A0-pleasereview 🤓 Pull request needs code review. and removed A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. labels Dec 12, 2017
@5chdn 5chdn merged commit 8f6f6a0 into master Dec 15, 2017
@5chdn 5chdn added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Dec 15, 2017
@5chdn 5chdn deleted the aura-detect-same-step branch December 15, 2017 15:29
5chdn pushed a commit that referenced this pull request Dec 15, 2017
* detect different node, same-key signing in aura

* reduce scope of warning
@5chdn 5chdn mentioned this pull request Dec 15, 2017
tomusdrw pushed a commit that referenced this pull request Dec 28, 2017
* new warp enodes (#7287)

* new warp enodes

* added one more warp enode; replaced spaces with tabs

* Bump beta to 1.8.5

* Update kovan boot nodes

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

* detect different node, same-key signing in aura

* reduce scope of warning

* Fix Cargo.lock

* Updating mainnet bootnodes.

* Update bootnodes (#7363)

* Updating mainnet bootnodes.

* Add additional parity-beta bootnodes.

* Restore old parity bootnodes and update foudation bootnodes
tomusdrw pushed a commit that referenced this pull request Jan 8, 2018
* detect different node, same-key signing in aura

* reduce scope of warning
5chdn pushed a commit that referenced this pull request Jan 8, 2018
* Merge pull request #7368 from paritytech/td-future-blocks

Wait for future blocks in AuRa

* Advance AuRa step as far as we can and prevent invalid blocks. (#7451)

* Advance AuRa step as far as we can.

* Wait for future blocks.

* Problem: AuRa's unsafeties around step duration (#7282)

Firstly, `Step.duration_remaining` casts it to u32, unnecesarily
limiting it to 2^32. While theoretically this is "good enough" (at 3
seconds steps it provides room for a little over 400 years), it is
still a lossy way to calculate the remaining time until the next step.

Secondly, step duration might be zero, triggering division by zero
in `Step.calibrate`

Solution: rework the code around the fact that duration is
typically in single digits and never grows, hence, it can be represented
by a much narrower range (u16) and this highlights the fact that
multiplying u64 by u16 will only result in an overflow in even further
future, at which point we should panic informatively (if anybody's
still around)

Similarly, panic when it is detected that incrementing the step
counter wrapped around on the overflow of usize.

As for the division by zero, prevent it by making zero an invalid
value for step duration. This will make AuRa log the constraint
mismatch and panic (after all, what purpose would zero step duration
serve? it makes no sense within the definition of the protocol,
as finality can only be achieved as per the specification
if messages are received within the step duration, which would violate
the speed of light and other physical laws in this case).

* Fix tests.

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

* detect different node, same-key signing in aura

* reduce scope of warning
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants