Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polkadot Omni Node: Offchain Worker not running #7447

Closed
kianenigma opened this issue Feb 4, 2025 · 0 comments · Fixed by #7479
Closed

Polkadot Omni Node: Offchain Worker not running #7447

kianenigma opened this issue Feb 4, 2025 · 0 comments · Fixed by #7479
Assignees
Labels
I2-bug The node fails to follow expected behavior.

Comments

@kianenigma
Copy link
Contributor

kianenigma commented Feb 4, 2025

Description of bug

It seems like the polkadot omni node is not enabling the offchain workers under any circumstance.

This would also mean that --offchain-worker flag is being ignored.

Fix is likely adding something like this to the service part:

if enable_offchain_worker {
let offchain_workers =
sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions {
runtime_api_provider: client.clone(),
keystore: Some(keystore_container.keystore()),
offchain_db: backend.offchain_storage(),
transaction_pool: Some(OffchainTransactionPoolFactory::new(
transaction_pool.clone(),
)),
network_provider: Arc::new(network.clone()),
is_validator: role.is_authority(),
enable_http_requests: true,
custom_extensions: move |_| {
vec![Box::new(statement_store.clone().as_statement_store_ext()) as Box<_>]
},
})?;
task_manager.spawn_handle().spawn(
"offchain-workers-runner",
"offchain-work",
offchain_workers.run(client.clone(), task_manager.spawn_handle()).boxed(),
);
}

@kianenigma kianenigma added I10-unconfirmed Issue might be valid, but it's not yet known. I2-bug The node fails to follow expected behavior. and removed I10-unconfirmed Issue might be valid, but it's not yet known. labels Feb 4, 2025
@skunert skunert moved this to Milestone 1 in Polkadot Omni Node Feb 4, 2025
github-merge-queue bot pushed a commit that referenced this issue Feb 5, 2025
# Description

Copy pasted the `parachain-template-node` offchain worker setup to
omni-node-lib for both aura and manual seal nodes.

Closes #7447 

## Integration

Enabled offchain workers for both `polkadot-omni-node` and
`polkadot-parachain` nodes. This would allow executing offchain logic in
the runtime and considering it on the node side.

---------

Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I2-bug The node fails to follow expected behavior.
Projects
Status: Milestone 1
Development

Successfully merging a pull request may close this issue.

2 participants