set_max_space
Call v257 → current #2Sets the maximum commitment space per account (sudo only).
View calls on chainCall Workflow
Click items to navigate. Pan and zoom to explore.
The Big Picture
Network administrators can tune commitment storage limits based on network capacity and usage patterns. Higher limits allow more data but increase chain storage requirements.
Why This Matters
If the default space limit is too restrictive for legitimate use cases, this call allows network governance to increase it. Conversely, if spam is an issue, limits can be tightened.
Example Scenario
The network observes that miners need larger commitments for their serving metadata. A sudo call to set_max_space(new_limit=8192) doubles the allowed bytes per account.
Common Questions
- Does this affect existing commitments?
- No, existing commitments remain. The new limit only applies to future set_commitment calls.
- What happens if limit is reduced below current usage?
- Existing commitments stay, but the account can't add more until their usage drops below the new limit after the rate limit window resets.
Use Cases
- Adjust network capacity for commitment storage
- Increase limits for special use cases
- Decrease limits to reduce chain bloat
From Chain Metadata
Sudo-set MaxSpace
Input Parameters
| # | Name | Type | Description |
|---|---|---|---|
| 0 | new_limit | u32 | new_limit (u32) |
Permissions
Permission data inferred from metadata. May be incomplete.
Requirements
- Caller has root/sudo privileges
Effects
Storage Modified
Postconditions
- MaxSpace value is updated for all future commitments
Side Effects
- May affect ability of accounts to store new commitments
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 });
// Build set_max_space call
const new_limit = 0;
const call = api.tx[stringCamelCase("Commitments")][stringCamelCase("set_max_space")](
new_limit
);On-Chain Activity
Infrequent
#47 most used call
Under 5% succeed — vast majority fail due to competition
As of block 7,429,232
Runtime Info
View Source- Pallet Index
- 18
- Call Index
- 2
- First Version
- v257
- Current Version
- v393