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

babe: remove error fallback from threshold calculation #5764

Merged
merged 6 commits into from
Apr 24, 2020

Conversation

andresilva
Copy link
Contributor

@andresilva andresilva commented Apr 23, 2020

When doing the primary threshold calculation in BABE we default to returning u128::max_value() in case any error happens in intermediary computations. The computations should not fail and instead "proofs" are given in expects.

Fixes #5753.

@andresilva andresilva added A0-please_review Pull request needs code review. M4-core B0-silent Changes should not be mentioned in any release notes labels Apr 23, 2020
@andresilva andresilva requested a review from rphmeier April 23, 2020 17:13
@andresilva andresilva requested a review from Demi-Marie as a code owner April 23, 2020 17:13
@andresilva
Copy link
Contributor Author

We should do a full resync of kusama with this patch to make sure that the given assumptions weren't violated so far.

@gnunicorn
Copy link
Contributor

gnunicorn commented Apr 24, 2020

We should do a full resync of kusama with this patch to make sure that the given assumptions weren't violated so far.

is this pending prior to a merge? I've set the tags accordingly, otherwise feel free to merge.

@gnunicorn gnunicorn added A3-in_progress Pull request is in progress. No review needed at this stage. and removed A0-please_review Pull request needs code review. labels Apr 24, 2020
@andresilva
Copy link
Contributor Author

Just started a Kusama sync with this PR, #5501 and #5514 (Wei had already tested those though). It will still take a while to sync everything from scratch, so if you prefer we can merge this optimistically and revert in case something broke (it shouldn't but I just want to make sure all the invariants actually hold).

@andresilva
Copy link
Contributor Author

Sync completed, no issues.

@rphmeier rphmeier merged commit 688f702 into master Apr 24, 2020
@rphmeier rphmeier deleted the andre/babe-threshold-calc branch April 24, 2020 21:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A3-in_progress Pull request is in progress. No review needed at this stage. B0-silent Changes should not be mentioned in any release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make BABE's calculate_primary_threshold​ test more robust.
6 participants