-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Companion PR for substrate PR 8072 - Add a config field to babe epochs #2467
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is the initial EpochConfig
being passed to BabeGenesisConfig
? We can't just use the default value since this is currently configured with non-default values.
polkadot/runtime/polkadot/src/lib.rs
Lines 1236 to 1243 in 0409d12
babe_primitives::BabeGenesisConfiguration { | |
slot_duration: Babe::slot_duration(), | |
epoch_length: EpochDuration::get(), | |
c: PRIMARY_PROBABILITY, | |
genesis_authorities: Babe::authorities(), | |
randomness: Babe::randomness(), | |
allowed_slots: babe_primitives::AllowedSlots::PrimaryAndSecondaryVRFSlots, | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This requires a runtime migration for the BABE pallet.
genesis_authorities: Babe::authorities(), | ||
randomness: Babe::randomness(), | ||
allowed_slots: babe_primitives::AllowedSlots::PrimaryAndSecondaryVRFSlots, | ||
allowed_slots: BABE_GENESIS_EPOCH_CONFIG.allowed_slots, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is only called at genesis?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's fine. The migration has the correct value PrimaryAndSecondaryPlainSlots
.
Waiting for commit status. |
Checks failed; merge aborted. |
…adot into ashley-change-babe-epoch
bot merge |
Waiting for commit status. |
Checks failed; merge aborted. |
bot merge |
Waiting for commit status. |
Companion PR for paritytech/substrate#8072.