offchain_localStorageGet - Bittensor RPC Method
Read a value from the node's offchain local storage on Bittensor.
Reads a value from the node's offchain local storage by key. Offchain local storage is a node-local key-value store used by offchain workers for caching data, tracking state, or communicating between offchain worker runs. This data is not stored on-chain and is specific to each node.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
kind | string | Yes | Storage kind: "PERSISTENT" (survives restarts) or "LOCAL" (cleared on restart). |
key | string | Yes | Hex-encoded key to read from offchain storage. |
Response
| Field | Type | Description |
|---|---|---|
result | string or null | Hex-encoded value if the key exists, or null if not found. |
On public shared RPC nodes, this method may return an error or
nullbecause offchain storage access is typically restricted.
Code Examples
Response Body
ResponseUse Cases
- Offchain worker debugging -- Inspect values stored by offchain workers to verify correct behavior.
- State inspection -- Read cached external data (e.g. oracle prices, API responses) that offchain workers have stored locally.
- Monitoring -- Check whether offchain workers are running and updating their local state.
Notes
- On public RPC endpoints (including Dwellir's shared Bittensor nodes), offchain storage access is usually disabled. Expect
nullor an error. - Offchain storage is local to each node. Two nodes running the same chain will have different offchain storage contents.
- The
PERSISTENTkind survives node restarts;LOCALkind is ephemeral.
Related Methods
offchain_localStorageSet-- Write a value to offchain local storageoffchain_localStorageClear-- Remove a key from offchain local storage