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

AURA: Switch to CurrentSlot instead of LastTimestamp #8023

Merged
merged 12 commits into from
Feb 3, 2021

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Feb 2, 2021

This switches AURA to use CurrentSlot instead of LastTimestamp.

Based on: #8020 (so only the last commit is important at the moment)

This switches AURA to use `CurrentSlot` instead of `LastTimestamp`.
@bkchr bkchr added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. labels Feb 2, 2021
Copy link
Member

@andresilva andresilva left a comment

Choose a reason for hiding this comment

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

As discussed on Element we should be able to remove the slot number inherent data (we are reading it from predigest anyway).

@andresilva
Copy link
Member

Added runtimenoteworthy label. Any chain using Aura that does a runtime upgrade with this will need to include the RemoveLastTimestamp migration.

bkchr and others added 3 commits February 2, 2021 16:14
Copy link
Member

@andresilva andresilva left a comment

Choose a reason for hiding this comment

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

https://github.com/paritytech/substrate/blob/master/primitives/consensus/aura/src/inherents.rs#L50

Do you mind adding a comment here saying that this can be removed in the future (maybe with a link to this PR)?

frame/aura/src/lib.rs Show resolved Hide resolved
@andresilva
Copy link
Member

andresilva commented Feb 3, 2021

Runtimes need to remove the inherent for the module.

Missing this one: https://github.com/paritytech/substrate/blob/master/frame/aura/src/mock.rs#L43

Copy link
Contributor

@thiolliere thiolliere left a comment

Choose a reason for hiding this comment

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

LGTM,

I'm also happy to see those ProvideInherent implementation which just check some other pallet calls removed, the logic is more simple now, IMO.

@bkchr bkchr merged commit 840478a into master Feb 3, 2021
@bkchr bkchr deleted the bkchr-aura-swich-to-current-slot branch February 3, 2021 12:47
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. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants