Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.phala.com/llms.txt

Use this file to discover all available pages before exploring further.

Governance Operations

Every governance action — registering measurements, revoking access, upgrading contracts — follows the same pattern: propose, collect signatures, wait for timelock, execute. This page walks through that pattern step by step.

Prerequisites

Creating a Governance Proposal

All governance changes start as a transaction submitted to the GovernanceSafe.

Via Safe Web Interface

  1. Go to https://app.safe.global and connect your signer wallet
  2. Select your governance Safe
  3. Click “New Transaction”
  4. Choose the transaction type:
    • Contract interaction — Call a function on DstackKms, DstackApp, or other contracts
    • Transfer — Send funds (if needed for gas or contract operations)
    • Raw transaction — For complex multi-call transactions

Common Governance Actions

ActionContractFunction
Register new measurementDstackKmsaddOsImageHash(bytes32)
Revoke measurementDstackKmsremoveOsImageHash(bytes32)
Update admin roleDstackKmssetAdmin(address)
Update KMS referenceDstackAppsetKms(address)
Upgrade contract implementationProxyupgradeTo(address)

Example: Register a New Measurement

  1. New TransactionContract interaction
  2. Select DstackKms contract
  3. Select addMeasurement(bytes32) function
  4. Enter the measurement hash: 0x1234abcd...
  5. Click “Create”
  6. The transaction enters the Safe queue

Multisig Signing and Approval

After a transaction is created, it must be approved by enough signers to meet the threshold.

Approving a Transaction

  1. Each signer connects to the Safe web interface
  2. Opens the pending transaction
  3. Reviews:
    • Target contract address
    • Function name and parameters
    • Simulation result (if available)
  4. Clicks “Confirm” (signs with their wallet)

Tracking Approval Progress

The Safe interface shows:
  • Number of confirmations collected
  • Required threshold (e.g., “3 of 5 confirmations”)
  • Status: Pending / Awaiting execution / Executed

Rejecting a Transaction

If a signer disagrees with a proposal, they should:
  1. Not sign the transaction
  2. Communicate concerns to other signers
  3. If the transaction has already been approved, wait for the timelock — there is no “cancel” after execution

Timelock

After the required number of signatures is collected, the transaction enters the Timelock queue.

How It Works

  1. The transaction is queued with a mandatory delay
  2. No one can execute the transaction until the delay expires
  3. During the delay, anyone can review the transaction on-chain
  4. After the delay, any authorized address (typically a signer) can execute it

Timelock Duration

EnvironmentTypical Duration
Testnet1-4 hours
Staging4-24 hours
Production24-72 hours

Monitoring the Timelock

  • Safe web interface: Shows the queue position and remaining time
  • Block explorer: Look for the Timelock contract’s QueuedTransactions event

Execution

After the timelock expires:
  1. Open the Safe web interface
  2. Find the transaction (status: “Ready to execute”)
  3. Click “Execute”
  4. Confirm the transaction in your wallet
  5. The transaction is submitted on-chain
After execution, the change takes effect immediately. KMS syncs the latest on-chain state on its next query.

Emergency Operations

Revoke a Compromised Measurement

If you discover that a measurement is compromised:
  1. Draft a transaction to call DstackKms.removeOsImageHash(bytes32) with the compromised hash
  2. Submit to the Safe for priority approval
  3. Collect signatures as quickly as possible
  4. Wait for the timelock — this cannot be bypassed
  5. Execute after the delay
Important: The timelock cannot be skipped, even in emergencies. This is by design — it prevents covert changes. Plan your incident response to account for the delay.

Replace a Signer

If a signer key is compromised or a signer needs to be replaced:
  1. Draft a transaction to call Safe.addOwner(address) and Safe.removeOwner(address, address)
  2. Submit for multisig approval
  3. Wait for timelock
  4. Execute
The replacement signer should use a hardware wallet.

Governance Health Check

Periodically verify the health of your governance setup:
CheckHow
All signers are reachableContact each signer; confirm they have access to their wallet
Signer keys are secureVerify signers are using hardware wallets
Threshold is appropriateReview the threshold against the number of active signers
Timelock duration is appropriateAdjust if the threat landscape has changed
No stale transactions in queueReview and cancel any outdated proposals
Contract ownership is correctVerify DstackKms and DstackApp owners point to the Safe

Common Issues

IssueSolution
Transaction not appearing in queueEnsure the transaction was submitted correctly. Check the nonce. Verify gas is sufficient.
Signer cannot confirmEnsure the signer is connected to the correct network. Check that the wallet has ETH for gas.
Timelock delay seems too longAdjust the Timelock parameters through a governance action (which itself goes through the current timelock).
Transaction execution revertsCheck the contract state. The transaction may depend on state that changed during the timelock period. Simulate the transaction before executing.
Lost signer keyImmediately add a new signer and remove the lost one through governance. Use the remaining signers to approve.

Next Steps