Sudid
Event v123 → v127, v133 → v148, v149 → v165, v195 → v219, v233 → v247, v252 → v265, v273 → v277, v290 → v315, v320 → v402, v411 → current Changed in v411 #48Emitted when a sudo operation is executed.
View events on chainThe Big Picture
Sudo operations are privileged administrative actions performed by the network's sudo key holder. These can include parameter changes, upgrades, emergency actions, and other sensitive operations. This event signals that an admin action was executed - important for governance transparency.
Why This Matters
Sudo actions can significantly affect the network - changing parameters, executing emergency measures, or performing other privileged operations. Tracking these events helps you understand what administrative actions are happening on the network.
Example Scenario
The sudo key holder needs to update a critical network parameter. They execute a sudo call. Sudid fires, logging that an administrative action occurred. The accompanying events show what specific changes were made.
Common Questions
- Who holds the sudo key?
- The sudo key is controlled by network governance - typically the core development team or a multisig council. Check network documentation for current sudo key holders.
- Are sudo actions always legitimate?
- They should be, but it's why monitoring matters. Unexpected sudo actions warrant investigation. Legitimate uses are usually announced or follow governance processes.
- Can the sudo key be changed?
- Yes, via governance mechanisms. Sudo key rotation is a security practice. Watch for sudo key change events to track who has admin power.
Use Cases
- Track administrative actions on the network
- Monitor governance and admin activity
- Audit privileged operations
- Build admin activity dashboards
How to Use This Event
- → Monitor for admin activity on the network
- → Build governance audit trails
- → Track when parameters are administratively changed
From Chain Metadata
a sudo call is done.
Triggers
Preconditions
- Caller is sudo key holder
Effects
Postconditions
- Privileged operation executed
Side Effects
- Varies based on sudo call
Event Data
| # | Name | Type | Description |
|---|---|---|---|
| 0 | arg0 | Result DispatchResult | Event field #0 (Result) |
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);
// Subscribe to Sudid events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.SubtensorModule.Sudid.get(block.hash);
for (const evt of events) {
console.log("Sudid:", evt.payload);
}
});Version History
Runtime Info
View Source- Pallet Index
- 7
- Event Index
- 48
- First Version
- v123
- Current Version
- v411