Docs

offchain_localStorageClear - Bittensor RPC Method

Clear an offchain local storage key on the node. Administrative method, not available on public RPC.

Removes a key from the node's offchain local storage. Offchain local storage is a node-local key-value store used by offchain workers and is not shared across the network or stored on-chain. This is an administrative method that requires the node to be running with --rpc-methods unsafe and is not available on public shared RPC endpoints.

Parameters

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

Response

FieldTypeDescription
resultnullConfirms the key has been cleared (or was already absent).

Code Examples

Response Body

Response

Use Cases

  • Offchain worker reset -- Clear cached or stale offchain data that an offchain worker relies on, forcing it to re-fetch from external sources.
  • Development and testing -- Reset offchain state during development or debugging of offchain worker logic.
  • Storage cleanup -- Remove obsolete entries from offchain storage on a self-hosted Bittensor node.

Notes

  • This is an unsafe/administrative method. It is disabled on public RPC endpoints including Dwellir's shared Bittensor nodes.
  • Offchain storage is local to each node and is not part of the blockchain state.
  • The PERSISTENT kind survives node restarts; LOCAL kind is cleared when the node restarts.