This is not an easy question to answer for multiple reasons. My suggestion is to first go through the other multiple answers on here on how the aura
-> babe
transition goes. You're correct that this requires you to make changes to the import_queue
and the block_import
, in the service.rs
file, make changes to the rpc.rs
file to include BabeDeps
and BabeRpcHandler
like so :
io.extend_with(sc_consensus_babe_rpc::BabeApi::to_delegate(BabeRpcHandler::new(
client.clone(),
shared_epoch_changes.clone(),
keystore,
babe_config,
select_chain,
deny_unsafe,
)));
io.extend_with(sc_finality_grandpa_rpc::GrandpaApi::to_delegate(GrandpaRpcHandler::new(
shared_authority_set.clone(),
shared_voter_state,
justification_stream,
subscription_executor,
finality_provider,
)));
besides having the necessary pallets in the runtime. Also you need to make the adjustments in the GenesisConfig
struct in your chain_spec.rs
.
To get a better feel for this, I would suggest migrating a vanilla substrate-node-template to use babe
. This would give you enough experience to know what exact changes are needed to be made. Then you may do the same with the frontier template as it's almost exactly like the substrate-node-template except it has frontier
integrated into it, and not such a straightforward directory structure as one you'd find on the node-template.
If you're still stuck after doing all this which is unlikely, then I just editing your question to include a repository link where someone might be able to take a look at what you're doing wrong. But I highly recommend trying to troubleshoot it yourself first.