RootStakeLocked

Error v441 → current 7.156

Root stake is still inside its hold window and cannot leave root yet.

Encountered by: stakersvalidatorswalletsdevelopers

Why This Error Exists

Root stake is 1:1 TAO with no AMM slippage, so without friction a sniper could stake right before an epoch boundary, capture a full tempo of root dividend pro-rata to instantaneous stake, and exit immediately. The hold window is the anti-sniping friction that makes that unprofitable.

Deep Dive

The chain records the last block at which root stake was added, removed, or claimed for each (coldkey, hotkey) pair, and uses it purely as the age basis for RootStakeUnlockInterval. Non-root stake operations do not write it. If the interval is zero the hold is effectively off.

Debugging Example

You claim with an amount to withdraw to free balance and it fails with RootStakeLocked. Your claim itself reset the age basis. Read RootStakeUnlockInterval, wait that many blocks from your last root stake change, and retry the withdrawal.

Prevention Tips

  • Plan withdrawals around the interval rather than immediately after a stake change
  • Claim into stake first, then withdraw after the window elapses

From Chain Metadata

Root (netuid 0) stake is still within its `RootStakeUnlockInterval` hold window (measured from the last root stake add/remove/claim for that coldkey/hotkey) and cannot leave root yet. Prevents epoch-boundary just-in-time dividend sniping.

What This Means

Root stake is still inside its hold window and cannot leave root yet.

Common Causes

  • A root stake add, remove, or claim happened fewer than RootStakeUnlockInterval blocks ago for this coldkey/hotkey pair
  • Attempting remove_stake, or a move/swap/transfer off root, inside that window

How to Fix

  • Read RootStakeUnlockInterval for the hold length in blocks
  • Wait out the remaining window and retry
  • Note that claiming without withdrawing is unaffected; only leaving root is held

Storage to Check

Runtime Info

Pallet Index
7
Error Index
156
Error Code
7.156
Runtime Version
v490