There is no any logs and off-chain workers does not work by default. How to specify to enable workers for parachain via command?
1 Answer
Are you using the parachain node template from Cumulus?
According to the help text, it's only enabled for nodes that are authoring new blocks:
./target/release/parachain-template-node --help
--offchain-worker <ENABLED>
Should execute offchain workers on every block.
By default it's only enabled for nodes that are authoring new blocks.
[default: when-authority]
Possible values:
- always:
Always have offchain worker enabled
- never:
Never enable the offchain worker
- when-authority:
Only enable the offchain worker when running as a validator (or collator, if this is a parachain node)
Looks like it is enabled here:
if parachain_config.offchain_worker.enabled {
sc_service::build_offchain_workers(
¶chain_config,
task_manager.spawn_handle(),
client.clone(),
network.clone(),
);
}
So try running your node with the --offchain-worker always
flag.