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

Make authoring logic time independent #216

Closed
bkchr opened this issue Sep 14, 2020 · 0 comments
Closed

Make authoring logic time independent #216

bkchr opened this issue Sep 14, 2020 · 0 comments
Labels
E5-needs_substrate_pr This is an issue that needs to be implemented upstream in Substrate.

Comments

@bkchr
Copy link
Member

bkchr commented Sep 14, 2020

Currently all authoring logic in Substrate assumes that we use milliseconds since the Unix epoch. We need to remove this requirement on milliseconds from the authoring logic of Aura/Babe. In case of a parachain we will want to use the relay chain block height as "time source". This is required, because we otherwise can not check the "time" when validating a block of a parachain on the relay chain.

I propose that we start with Aura as this is much simpler than Babe.

Implementation

  1. Check the implementation for any usage of time.
  2. Create some trait that can give you the current time. The trait should have the requirement that the time source is always strictly increasing.
  3. Port Aura/Babe (while this can come later, depending on the complexity) to this new trait.

Required by

Aura for parachains: #115
Babe for parachains: #116

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
E5-needs_substrate_pr This is an issue that needs to be implemented upstream in Substrate.
Projects
None yet
Development

No branches or pull requests

1 participant