Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Offchain Worker Api should be optional #11742

Closed
JoshOrndorff opened this issue Jun 25, 2022 · 1 comment
Closed

Offchain Worker Api should be optional #11742

JoshOrndorff opened this issue Jun 25, 2022 · 1 comment

Comments

@JoshOrndorff
Copy link
Contributor

JoshOrndorff commented Jun 25, 2022

Currently the Substrate client requires that every runtime implement the Offchain worker runtime Api. Many (maybe even most?) runtimes do not use offchain workers and have to stub this Api like

impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
	fn offchain_worker(_: &Header) {}
}

While it isn't the hardest thing to paste that code into your runtime, it adds an entire dependency on sp_offchain for runtimes that don't otherwise need it.

I suggest the offchain worker api not be required.

cc @kianenigma

@kianenigma
Copy link
Contributor

Probably has the same answer as #11743, so will close to keep our enormous issue backlog at least one less :D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants