Skip to main content

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 whitelistEnclaveType and scheduleUpgrade
  • 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, since MRENCLAVE must match).
Verify all validators produce the same NEW_MRENCLAVE value before proceeding.

Phase 2: Start Dual Kernels

The new kernel runs alongside the old kernel on a separate port. DATA Foundation CL identifies each kernel by its code_commitment (MRENCLAVE).
The new kernel needs its own:
  • Home directory (separate light client state)
  • Gramine manifest with different listen_addr (:50052)

Phase 3: Update DATA Foundation Config + Restart

Add the new kernel endpoint to story.toml:
Restart story:
Verify both kernels connected:

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)
  • whitelistEnclaveType tx confirmed (new MRENCLAVE on enclave type 1)
  • scheduleUpgrade tx confirmed with target activation height
  • Upgrade resharing round initiated with is_upgrade=true
  • Old kernel generates deals, new kernel processes responses
  • DKG finalization phase complete on all committee members
  • Old kernel stopped, config updated to new kernel only
  • New DKG round proceeds normally on new kernel

Troubleshooting