Docs

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

ParameterTypeRequiredDescription
kindstringYesStorage kind: "PERSISTENT" (survives restarts) or "LOCAL" (cleared on restart).
keystringYesHex-encoded key to read from offchain storage.

Response

FieldTypeDescription
resultstring or nullHex-encoded value if the key exists, or null if not found.

On public shared RPC nodes, this method may return an error or null because offchain storage access is typically restricted.

Code Examples

Response Body

Response

Use 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 null or an error.
  • Offchain storage is local to each node. Two nodes running the same chain will have different offchain storage contents.
  • The PERSISTENT kind survives node restarts; LOCAL kind is ephemeral.