56 releases (37 major breaking)

40.0.0 Sep 26, 2024
39.0.0 Jul 18, 2024
37.0.0 Jul 12, 2024
36.0.0 Jun 24, 2024
2.0.0-alpha.5 Mar 24, 2020

#4 in #extrinsic

Download history 1805/week @ 2024-08-26 1945/week @ 2024-09-02 2187/week @ 2024-09-09 2367/week @ 2024-09-16 3073/week @ 2024-09-23 3031/week @ 2024-09-30 1736/week @ 2024-10-07 2306/week @ 2024-10-14 3139/week @ 2024-10-21 2883/week @ 2024-10-28 2489/week @ 2024-11-04 1827/week @ 2024-11-11 2754/week @ 2024-11-18 2912/week @ 2024-11-25 3360/week @ 2024-12-02 4372/week @ 2024-12-09

13,690 downloads per month
Used in 24 crates (6 directly)

GPL-3.0-or-later…

2MB
43K 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:

  1. Challenge period for incorrect computations
  2. Majority voting for results
  3. 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:

  1. Challenge period for incorrect computations
  2. Majority voting for results
  3. etc

Dependencies

~77–115MB
~2M SLoC