57 releases (major breaking)
new 42.0.0 | Jan 14, 2025 |
---|---|
40.0.0 | Sep 26, 2024 |
39.0.0 | Jul 18, 2024 |
37.0.0 | Jul 12, 2024 |
2.0.0-alpha.5 | Mar 24, 2020 |
#2 in #extrinsic
11,980 downloads per month
Used in 24 crates
(5 directly)
2.5MB
45K
SLoC
Substrate offchain workers.
The offchain workers is a special function of the runtime that gets executed after block is imported. During execution it's able to asynchronously submit extrinsics that will either be propagated to other nodes or added to the next block produced by the node as unsigned transactions.
Offchain workers can be used for computation-heavy tasks that are not feasible for execution during regular block processing. It can either be tasks that no consensus is required for, or some form of consensus over the data can be built on-chain for instance via:
- Challenge period for incorrect computations
- Majority voting for results
- etc
License: GPL-3.0-or-later WITH Classpath-exception-2.0
Release
Polkadot SDK stable2409
lib.rs
:
Substrate offchain workers.
The offchain workers is a special function of the runtime that gets executed after block is imported. During execution it's able to asynchronously submit extrinsics that will either be propagated to other nodes or added to the next block produced by the node as unsigned transactions.
Offchain workers can be used for computation-heavy tasks that are not feasible for execution during regular block processing. It can either be tasks that no consensus is required for, or some form of consensus over the data can be built on-chain for instance via:
- Challenge period for incorrect computations
- Majority voting for results
- etc
Dependencies
~79–120MB
~2M SLoC