LastPowRegistrationBlock
Storage Map v475 → currentPer hotkey , the work_block of its last accepted pow_register proof.
Explore chainQueried by: minersdevelopers
The Big Picture
Source: pallets/subtensor/src/lib.rs LastPowRegistrationBlock and pallets/subtensor/src/subnets/registration.rs check_pow_registration at v475.
Use Cases
- Pick a valid work_block when registering the same hotkey on a second subnet
- Diagnose an InvalidWorkBlock refusal
From Chain Metadata
Last accepted PoW challenge block per hotkey. Keeping one watermark prevents recent proof replay without an ever-growing used-seal list.
Purpose & Usage
Purpose
A single replay watermark: a new PoW proof for the hotkey must use a strictly later work_block.
Common Query Patterns
- Query before mining a seal to know the earliest work_block the chain will accept for a hotkey
- Absent means the hotkey has never registered by PoW since v475
Notes
- First appears at runtime v475. Keyed by hotkey (Blake2_128Concat), u64 block number, OptionQuery.
- Written only by a successful pow_register. Not scoped by netuid, so one watermark covers the hotkey on every subnet.
- Combined with the 5-block freshness window on work_block, this bounds replay without a growing list of used seals.
Query Keys
| # | Name | Type | Description |
|---|---|---|---|
| 1 | key1 | AccountId [u8; 32] | key1 (AccountId) (hex -> SS58) |
Stored Value
Value in RAO (÷10⁹ for TAO)
RAO -> TAO (/ 10^9)
Default Value
None (absent keys return no value)
Optional storage: querying a key that has never been written returns no value (None) — do not assume a zero default.
Relationships
Modified By
Related Events
Code Examples
import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443
const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);
// Query LastPowRegistrationBlock storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const result = await api.query.SubtensorModule.LastPowRegistrationBlock.getValue(key1);
console.log("LastPowRegistrationBlock:", result);On-Chain Activity
Write Frequency
●●○○○○ Minimal <10K est. writes
Fewer than 10K writes
#285 most written storage item
Write Source User Extrinsics
Modified via user-submitted extrinsics
As of block 9,385,000
Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v475
- Current Version
- v490