Sudid
Event Re-added v123 → v127, v133 → v148, v149 → v165, v195 → v219, v233 → v247, v252 → v265, v273 → v277, v290 → v315, v320 → current #47Emitted 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 | Event field #0 (Result) |
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 });
// Subscribe to Sudid events
api.query.system.events((events) => {
events
.filter(({ event }) =>
event.section === stringCamelCase("SubtensorModule") &&
event.method === "Sudid"
)
.forEach(({ event }) => {
console.log("Sudid:", event.data.toHuman());
});
});Version History
Runtime Info
View Source- Pallet Index
- 7
- Event Index
- 47
- First Version
- v123
- Current Version
- v393