Skip to content
Snippets Groups Projects
Unverified Commit d5539aa6 authored by Sebastian Kunert's avatar Sebastian Kunert Committed by GitHub
Browse files

Parachains: Use relay chain slot for velocity measurement (#6825)


closes #3967 

## Changes
We now use relay chain slots to measure velocity on chain. Previously we
were storing the current parachain slot. Then in `on_state_proof` of the
`ConsensusHook` we were checking how many blocks were athored in the
current parachain slot. This works well when the parachain slot time and
relay chain slot time is the same. With elastic scaling, we can have
parachain slot times lower than that of the relay chain. In these cases
we want to measure velocity in relation to the relay chain. This PR
adjusts that.


##  Migration
This PR includes a migration. Storage item `SlotInfo` of pallet
`aura-ext` is renamed to `RelaySlotInfo` to better reflect its new
content. A migration has been added that just kills the old storage
item. `RelaySlotInfo` will be `None` initially but its value will be
adjusted after one new relay chain slot arrives.

---------

Co-authored-by: command-bot <>
Co-authored-by: default avatarBastian Köcher <git@kchr.de>
parent 5f391db8
No related merge requests found
Pipeline #511720 waiting for manual action with stages
in 1 hour, 8 minutes, and 59 seconds
Showing
with 502 additions and 61 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment