Skip to content

babe weight #1459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Dec 29, 2022
Merged

babe weight #1459

merged 9 commits into from
Dec 29, 2022

Conversation

turuslan
Copy link
Contributor

Referenced issues

Description of the Change

  • Add primary flag to cached tree.
  • Select best leaf by primary count, then by height.

https://github.com/paritytech/substrate/blob/27e9a1c0fdb200c3736f513f3292b8b954e3d021/client/consensus/babe/src/lib.rs#L1660-L1666
https://github.com/paritytech/substrate/blob/27e9a1c0fdb200c3736f513f3292b8b954e3d021/primitives/consensus/babe/src/digests.rs#L113-L117

Benefits

  • Avoid long forks causing grandpa lag

Possible Drawbacks

Signed-off-by: turuslan <turuslan.devbox@gmail.com>
@turuslan turuslan requested review from xDimon and Harrm December 27, 2022 06:57
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
@turuslan turuslan requested review from CrimeaTop and xDimon and removed request for CrimeaTop December 27, 2022 10:29
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
@turuslan turuslan merged commit a368bd3 into master Dec 29, 2022
@turuslan turuslan deleted the feature/babe-weight branch December 29, 2022 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants