Kernel Upgrade Workflow (Aeneid)
Upgrade the story-kernel binary on Aeneid testnet DKG committee validators. This uses the DKG on-chain upgrade mechanism: whitelist new MRENCLAVE, schedule upgrade, dual-kernel resharing, then cutover.Prerequisites
- It is recommended to start the upgrade when current DKG round is in Active stage
- New story-kernel binary built on all validator machines (must produce identical MRENCLAVE)
- Timelock/owner access to DKG contract for
whitelistEnclaveTypeandscheduleUpgrade - SGXValidationHook proxy address known for the new kernel client
Phase 1: Build New Kernel
Build the new story-kernel binary on each validator machine (never SCP binaries — MRENCLAVE must match).NEW_MRENCLAVE value before proceeding.
Phase 2: Start Dual Kernels
The new kernel runs alongside the old kernel on a separate port. Story CL identifies each kernel by itscode_commitment (MRENCLAVE).
Phase 3: Update Story Config + Restart
Add the new kernel endpoint tostory.toml:
Phase 4: Whitelist + Schedule Upgrade On-Chain
Wait for the current DKG round to be in Active stage, then:On Aeneid, DKG contract ops go through Timelock (minDelay=600s).
Schedule the Timelock tx, wait 10 min, then execute.
Phase 5: Wait for Upgrade Resharing
Phase 6: Cutover to New Kernel
After upgrade resharing completes successfully:Verification Checklist
- All validators built identical
NEW_MRENCLAVE - Both kernels connected on all validators (
connected_clients=2) -
whitelistEnclaveTypetx confirmed (new MRENCLAVE on enclave type 1) -
scheduleUpgradetx confirmed with target activation height - Upgrade resharing round initiated with
is_upgrade=true - Old kernel generates deals, new kernel processes responses
-
DKG finalization phase completeon all committee members - Old kernel stopped, config updated to new kernel only
- New DKG round proceeds normally on new kernel
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
connected_clients=1 after restart | New kernel not running or port mismatch | Verify lsof -i :50052, check Gramine manifest |
| ”no new kernel client found for upgrade” | Story not connected to new kernel | Ensure kernel-endpoints has both ports, restart story |
| Upgrade round doesn’t start at activation height | Not in Active stage when scheduled | Reschedule during next Active stage |
| Finalization fails | Insufficient committee members upgraded | Ensure all validators have dual kernels running |

