Overview
Starting from the v1.6.0 upgrade, validators can participate in the DKG (Distributed Key Generation) committee. Participation requires running story-kernel, a TEE client that executes inside an Intel SGX enclave alongside your validator node. DKG participation is optional. You can continue running a validator without joining the DKG committee by keepingdkg.enable = false in your story.toml.
What to know before joining:
- SGX hardware required: your machine must have Intel SGX support
- Self-undelegation is blocked while you are an active DKG committee member. You cannot unstake your own delegation until the current DKG round ends (~7 days with production parameters). Other delegators are not affected.
- If your kernel goes down, your validator continues producing blocks normally. If the kernel restarts and the node finalizes successfully before the current round ends, it can rejoin that round; otherwise, it rejoins on the next one.
Hardware Requirements
story-kernel runs inside an SGX enclave that requires dedicated Enclave Page Cache (EPC) memory. The Gramine manifest configures a 4 GB enclave for the Go runtime and DKG cryptographic operations.
Supported cloud instances (Azure):
Bare metal is also supported: any Intel server with SGX enabled in BIOS. Check EPC size with
dmesg | grep "sgx: EPC section".
AMD SEV-SNP instances (e.g., Azure DCasv5) and ARM instances are not supported at the moment.
Software Requirements
All validators must use the exact same versions below to produce identical MRENCLAVE (code commitment) values.Setup Guide
Step 1: Verify SGX Support
/dev/sgx_enclave does not exist, SGX is not supported or not enabled in BIOS/cloud settings.
Step 2: Install Dependencies
Intel SGX SDK and DCAP
Configure PCCS
Edit/etc/sgx_default_qcnl.conf:
Install Gramine 1.9
Step 3: Build Story-Kernel
Step 4: Set Up Data Directory
Step 5: Initialize and Configure
Initialize
Configure
Edit/opt/story-kernel/config.toml:
Step 6: Configure Story Client
Apply the following changes to~/.story/story/config/story.toml:
Add engine-chain-id (If Not Present)
Add DKG Options Section
Step 7: Start Services
Start order matters. Start story-kernel AFTER the chain is running, since the kernel needs CometBFT RPC (port 26657) for light client initialization.Start Story-Kernel
Restart DATA Foundation
Step 8: Verify
Kernel Running
DATA Foundation Connected to Kernel
DKG Registration
Troubleshooting
Kernel Won’t Start
DKG Registration Fails
Light Client Issues
Important Notes
Self-Undelegation Restriction
While your validator is a finalized member of the active DKG round, self-undelegation is blocked. This prevents committee members from leaving mid-round, which could compromise threshold cryptography.- Only self-undelegation is blocked; other delegators can unstake normally
- The restriction lifts when the current round ends
- A full DKG round with production parameters takes approximately 7 days
Running Kernel on a Separate Machine
story-kernel can run on a dedicated SGX machine. Updatekernel-endpoints in story.toml:
Additional Information
Build Environment
Enclave Measurement
The measurements below correspond tostory-kernel release v0.1.0. They can change when story-kernel or its measured build inputs are upgraded.
FAQ
Do I need SGX to run a validator? No. SGX is only needed for DKG committee participation. Setdkg.enable = false to run without it.
What happens if my kernel goes down?
Your validator continues producing blocks. If the kernel restarts and the node finalizes successfully before the current DKG round ends, it can rejoin that round; otherwise, it rejoins on the next one.
What is MRENCLAVE?
A cryptographic hash of the SGX enclave contents. All validators must produce the same value to participate in the same DKG committee.
Can I opt out after joining?
Yes. Set dkg.enable = false and restart story. You stop participating after the current round ends.