Skip to content
This repository was archived by the owner on Aug 27, 2024. It is now read-only.

Commit f0db1ab

Browse files
committed
Links and nitpicks
1 parent f4e9ac4 commit f0db1ab

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

docs/knowledgebase/learn-substrate/off-chain-features.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,21 @@ easily access on-chain state for their computations.
3939

4040
Off-chain workers have access to extended APIs for communicating with the external world:
4141

42-
- Ability to submit transactions (either signed or unsigned) to the chain to publish computation
43-
results.
42+
- Ability to
43+
[submit transactions](https://substrate.dev/rustdocs/v2.0.0/sp_runtime/offchain/trait.TransactionPool.html)
44+
(either signed or unsigned) to the chain to publish computation results.
4445
- A fully-featured HTTP client allowing the worker to access and fetch data from external services.
4546
- Access to the local keystore to sign and verify statements or transactions.
46-
- An additional, local key-value database shared between all off-chain workers.
47+
- An additional, local
48+
[key-value database](https://substrate.dev/rustdocs/v2.0.0/sp_runtime/offchain/trait.OffchainStorage.html)
49+
shared between all off-chain workers.
4750
- A secure, local entropy source for random number generation.
48-
- Access to the node's precise local time and the ability to sleep and resume work.
51+
- Access to the node's precise
52+
[local time](https://substrate.dev/rustdocs/v2.0.0/sp_runtime/offchain/struct.Timestamp.html).
53+
- The ability to sleep and resume work.
4954

5055
OCWs can be initiated from within a special function in your runtime implementation,
51-
`fn offchain_worker(block: T::BlockNumber)`. The function is executed after each block import. To
56+
[`fn offchain_worker(block: T::BlockNumber)`](https://substrate.dev/rustdocs/v2.0.0/frame_support/traits/trait.OffchainWorker.html).
5257
communicate results back to the chain, off-chain workers can submit signed or unsigned transactions
5358
to be included in subsequent blocks.
5459

@@ -64,7 +69,7 @@ please refer to our [Development Guide](../runtime/off-chain-workers).
6469
As its name indicated, the storage is not stored on-chain. It can be accessed by off-chain worker
6570
threads (both read and write access) and on-chain logic (write only, refer to off-chain indexing
6671
below). This storage is not populated among the blockchain network and does not need to have
67-
consensus computation over.
72+
consensus computation over it.
6873

6974
As an off-chain worker thread is being spawned off during each block import, there could be more
7075
than one off-chain worker thread running at any given time. So, similar to any multi-threaded
@@ -91,3 +96,6 @@ off-chain storage independently from OCWs. Nodes have to opt-in for persistency
9196
Unlike OCWs, which are not executed during initial blockchain synchronization, off-chain indexing is
9297
populating the storage every time a block is processed, so the data is always consistent and will
9398
be exactly the same for every node with indexing enabled.
99+
## Learn More
100+
101+
- [Off-Chain Workers Development Guide](../runtime/off-chain-workers)

docs/knowledgebase/runtime/off-chain-workers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ using an external library to parse the JSON result in a `no_std` environment.
401401

402402
### Learn More
403403

404+
- [Off-Chain Features Conceptual Guide](../learn-substrate/off-chain-features#off-chain-workers)
404405
- [Signed Transactions](../learn-substrate/extrinsics#signed-transactions)
405406
- [Unsigned Transactions](../learn-substrate/extrinsics#unsigned-transactions)
406407

0 commit comments

Comments
 (0)