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

backports to beta #7434

Merged
merged 16 commits into from
Jan 9, 2018
Merged

backports to beta #7434

merged 16 commits into from
Jan 9, 2018

Conversation

debris
Copy link
Collaborator

@debris debris commented Jan 3, 2018

debris and others added 3 commits January 3, 2018 12:06
The error is "PoW too low to compete with other messages"

This has been previously reported in #7144

Solution: prevent the move semantics

The source of the error is in PoolHandle.relay
implementation for NetPoolHandle.

Because of the move semantics, `res` variable is in fact
copied (as it implements Copy) into the closure and for
that reason, the returned result is always `false.
@debris debris added A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. A8-backport 🕸 Pull request is already reviewed well in another branch. labels Jan 3, 2018
debris and others added 2 commits January 3, 2018 12:27
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).
@5chdn 5chdn added this to the Patch milestone Jan 3, 2018
@5chdn 5chdn added the P2-asap 🌊 No need to stop dead in your tracks, however issue should be addressed as soon as possible. label Jan 3, 2018
@5chdn 5chdn added A0-pleasereview 🤓 Pull request needs code review. and removed A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. labels Jan 3, 2018
@5chdn
Copy link
Contributor

5chdn commented Jan 3, 2018

We might want to hold on removing expanse for a second. Let's discuss this tomorrow.

@5chdn 5chdn added the A1-onice 🌨 Pull request is reviewed well, but should not yet be merged. label Jan 4, 2018
@5chdn
Copy link
Contributor

5chdn commented Jan 5, 2018

To be backported after review:

@5chdn 5chdn removed the A1-onice 🌨 Pull request is reviewed well, but should not yet be merged. label Jan 5, 2018
5chdn and others added 3 commits January 8, 2018 11:37
…ivisor (#7463)

* Byzantium Update for Expanse

Here the changes go. Hope I didnt miss anything.

* expip2 changes - update duration limit

* Fix missing EXPIP-2 fields

* Format numbers as hex

* Fix compilation errors

* Group expanse chain spec fields together

* Set metropolisDifficultyIncrementDivisor for Expanse

* Revert #7437

* Add Expanse block 900_000 hash checkpoint
* Advance AuRa step as far as we can.

* Wait for future blocks.
@5chdn
Copy link
Contributor

5chdn commented Jan 8, 2018

Now only #7476 missing

* Update Parity Mainnet Bootnodes

* Replace the Azure HDD bootnodes with the new ones :)
@debris
Copy link
Collaborator Author

debris commented Jan 8, 2018

@5chdn done

@5chdn
Copy link
Contributor

5chdn commented Jan 8, 2018

Aaaand #7497 :)

@5chdn
Copy link
Contributor

5chdn commented Jan 9, 2018

And maybe #7503 ?

Use https when connecting to etherscan.io API for price-info
* Expose gas price percentile.

* Fix light eth_call.

* fix gas_price in light client
@5chdn 5chdn merged commit a257827 into beta Jan 9, 2018
@5chdn 5chdn deleted the beta-backport branch January 9, 2018 12:55
@andresilva
Copy link
Contributor

LGTM!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-pleasereview 🤓 Pull request needs code review. A8-backport 🕸 Pull request is already reviewed well in another branch. P2-asap 🌊 No need to stop dead in your tracks, however issue should be addressed as soon as possible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants