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

Validate timestamps against relay chain slot #437

Closed
wants to merge 4 commits into from

Conversation

andresilva
Copy link
Contributor

@andresilva andresilva commented May 13, 2021

Fix #422.

Depends on paritytech/polkadot#3022.

/// This data is also absent from the genesis.
#[pallet::storage]
#[pallet::getter(fn relay_slot)]
pub(super) type RelaySlot<T: Config> = StorageValue<_, Slot>;
Copy link
Member

Choose a reason for hiding this comment

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

I don't see any reason to add this here as a storage item.

//! Utility module to validate cumulus-runtime timestamps against the
//! relay chain slot.

use cumulus_primitives_core::{OnValidationData, Slot};
Copy link
Member

Choose a reason for hiding this comment

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

This should be its own pallet. Similar to aura-ext. Maybe timestamp-ext or something.

The idea with using environmental was also a bad idea by me. We should probably store the intermediate data in the storage.

@bkchr
Copy link
Member

bkchr commented Jun 15, 2021

Superseded by #494

@bkchr bkchr closed this Jun 15, 2021
@bkchr bkchr deleted the andre/validate-timestamps branch June 15, 2021 13:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Put relay chain slot number into ParachainInherent
2 participants