-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Hello! I work on a Substrate-based chain with a custom consensus engine and as suggested in
try-runtime-cli/core/src/common/empty_block/inherents/providers.rs
Lines 96 to 98 in b45be7d
| /// If it does not work for your Substrate-based chain, [please open an issue](https://github.com/paritytech/try-runtime-cli/issues) | |
| /// and we will look into supporting it. | |
| struct SmartInherentProvider { |
SmartInherentProvider doesn't work for me.
Currently, providers.rs only accounts for BABE and AURA when constructing the digest for the empty block. In my case for QF Network's blockchain node QuantumFusion-network/qf-solochain we are developing a custom consensus engine called SPIN with its own engine ID SPIN_ENGINE_ID. Because of this there is no slot with the expected engine ID in the empty block and the slot number validation fails during try-runtime usage.
It is easy to add custom engine ID in a fork project like:
// core/src/common/empty_block/inherents/providers.rs#L128
let digest = vec![
DigestItem::PreRuntime(
BABE_ENGINE_ID,
PreDigest::SecondaryPlain(SecondaryPlainPreDigest {
slot,
authority_index: 0,
})
.encode(),
),
DigestItem::PreRuntime(AURA_ENGINE_ID, slot.encode()),
DigestItem::PreRuntime(*b"spin", slot.encode()),
];But perhaps there are some recommendations on how to properly support custom engine IDs in the digest? Thank you.