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

Spawn multiple offchain workers per block #49

Open
xlc opened this issue Apr 27, 2022 · 1 comment
Open

Spawn multiple offchain workers per block #49

xlc opened this issue Apr 27, 2022 · 1 comment
Labels
I5-enhancement An additional feature request. T1-FRAME This PR/Issue is related to core FRAME, the framework.

Comments

@xlc
Copy link
Contributor

xlc commented Apr 27, 2022

To my understanding, currently we have one offchain worker per block which executes the offchain_worker hook of all the pallets sequentially.

It will be great if we can opt-in to have offchain worker for each pallet or some API to spawn new runtime thread from offchain worker.

This should allow offchain workers to be executed concurrently to leverage multi threaded machines.

We already support concurrent offchain workers (spawned from different blocks) and have synchronize primitives available so I don't see too much additional considerations.

@bkchr
Copy link
Member

bkchr commented Apr 28, 2022

We could probably leverage the current runtime tasks feature for this, but that is currently highly experimental and also doesn't support writing at the moment AFAIK.

@the-right-joyce the-right-joyce transferred this issue from paritytech/substrate Aug 24, 2023
@the-right-joyce the-right-joyce added I5-enhancement An additional feature request. T1-FRAME This PR/Issue is related to core FRAME, the framework. and removed J0-enhancement labels Aug 25, 2023
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
jonathanudd pushed a commit to jonathanudd/polkadot-sdk that referenced this issue Apr 10, 2024
liuchengxu added a commit to subcoin-project/polkadot-sdk that referenced this issue Sep 20, 2024
* Upgrade polkadot-sdk

* Refactor SyncRequest

* Revert SyncRequest refactoring

* Nit

* Skip syncing peer update if the latency is already super low
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I5-enhancement An additional feature request. T1-FRAME This PR/Issue is related to core FRAME, the framework.
Projects
Status: Draft
Status: Backlog
Status: backlog
Development

No branches or pull requests

4 participants