Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
babe: add notes about epoch duration constraints
  • Loading branch information
andresilva committed Jan 5, 2021
commit 0c57c47b9c9b906039040df7a15f3cf4dbbd7b14
5 changes: 5 additions & 0 deletions frame/babe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ pub use equivocation::{BabeEquivocationOffence, EquivocationHandler, HandleEquiv

pub trait Config: pallet_timestamp::Config {
/// The amount of time, in slots, that each epoch should last.
/// NOTE: Currently it is not possible to change the epoch duration after
/// the chain has started. Attempting to do so will brick block production.
type EpochDuration: Get<SlotNumber>;

/// The expected average block time at which BABE should be creating
Expand Down Expand Up @@ -236,6 +238,9 @@ decl_module! {
pub struct Module<T: Config> for enum Call where origin: T::Origin {
/// The number of **slots** that an epoch takes. We couple sessions to
/// epochs, i.e. we start a new session once the new epoch begins.
/// NOTE: Currently it is not possible to change the epoch duration
/// after the chain has started. Attempting to do so will brick block
/// production.
const EpochDuration: u64 = T::EpochDuration::get();

/// The expected average block time at which BABE should be creating
Expand Down