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

Conversation

@andresilva
Copy link
Contributor

The median calculation that is done to figure out at what time the current slot should start (i.e. offset) is currently not properly implemented. Since it is currently unused I have removed the call from verify to it to avoid any issues. I have also fixed an issue that caused it to panic.

Fixes #3248.

@andresilva andresilva added A0-please_review Pull request needs code review. A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). M4-core labels Jul 30, 2019
@andresilva andresilva requested a review from bkchr July 30, 2019 11:29
@andresilva
Copy link
Contributor Author

I have also removed annoying forbid/deny clauses.

Copy link
Contributor

@marcio-diaz marcio-diaz left a comment

Choose a reason for hiding this comment

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

lgtm

@andresilva
Copy link
Contributor Author

Reverted removal of forbid/deny clauses to avoid conflicting with #3213.

//!
//! BABE (Blind Assignment for Blockchain Extension) consensus in Substrate.
#![forbid(unsafe_code, missing_docs, unused_must_use, unused_imports, unused_variables)]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
#![forbid(unsafe_code, missing_docs, unused_must_use, unused_imports, unused_variables)]
#![forbid(unsafe_code, missing_docs)]

Copy link
Contributor Author

@andresilva andresilva Jul 30, 2019

Choose a reason for hiding this comment

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

Originally I removed all forbid/deny but since Gav did the same in #3213 I reverted to avoid conflicts. The only thing I removed was forbid(dead_code) which was necessary to make this PR compile.

Copy link
Contributor

@Demi-Marie Demi-Marie left a comment

Choose a reason for hiding this comment

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

This looks good, although I would like to know what was wrong with the median algorithm.

@andresilva
Copy link
Contributor Author

@demimarie-parity a180365 (see #3248 as well).

@andresilva andresilva merged commit 21dc1fd into master Jul 30, 2019
@Demi-Marie Demi-Marie deleted the andre/babe-fixes branch August 1, 2019 20:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A0-please_review Pull request needs code review. A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

the node crashed during block produce

6 participants