LastCommitment
Storage Map v140 → currentBlock number of the last commitment update for an account on a subnet .
Explore chainQueried by: validatorsdevelopers
The Big Picture
This tracks when each commitment was last updated, enabling freshness checks and rate limiting.
Use Cases
- Check how recently a commitment was updated
- Implement rate limiting logic
Purpose & Usage
Purpose
Track when commitments were last modified for rate limiting and freshness.
Common Query Patterns
- Query to check commitment freshness
- Rate limit calculations
Query Keys
Stored Value
value (u32)
Relationships
Modified By
Related Events
Code Examples
import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";
const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });
// Query LastCommitment storage
const key1 = 0;
const key2 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const result = await api.query
[stringCamelCase("Commitments")]
[stringCamelCase("LastCommitment")](
key1,
key2
);
console.log("LastCommitment:", result.toHuman());On-Chain Activity
Write Frequency
●●●●●○ High 1M–10M est. writes
1M–10M estimated writes
#17 most written storage item
Write Source User Extrinsics
Modified via user-submitted extrinsics
As of block 7,429,232
Runtime Info
View Source- Pallet
- Commitments
- Storage Kind
- Map
- First Version
- v140
- Current Version
- v393