2

So this happened when I created a new validator and injected their session keys into my node. Then I proceeded to call forceNewEra from the staking module as sudo, and I am greeted with this :

Proposing failed: ClientImport("RuntimeApiError(Application(Execution(RuntimePanicked("Validator with index 0 is disabled and should not be attempting to author blocks."))))")

What does it mean?

3
  • 1
    As a general comment, I think you ask a lot of great questions, but also a lot of the question you ask could be solved by just looking at the code a little bit. For example just searching "Validator with index" in Substrate would tell you were there error is coming from, and you could see the contextual information about when that error is triggered. I suggest that you spend a bit more time diving into the code, which can save you time when debugging issues like this.
    – Shawn Tabrizi
    Commented Apr 23, 2022 at 20:27
  • @ShawnTabrizi thanks for tip shawn I'll keep this in mind when investigating in the future, but sometimes falling back to this site seems so much easier. Anyway I always appreciate you taking the time to provide us with great answers! Commented Apr 24, 2022 at 14:51
  • I'm always happy to help. I think you will find a nice balance between the two if you keep this in mind.
    – Shawn Tabrizi
    Commented Apr 24, 2022 at 20:34

1 Answer 1

1

This error appears when checking a validator against the DisabledValidators hook.

This is most commonly implemented by the Session pallet, which maintains a storage list of validators that should be disabled:

    /// Indices of disabled validators.
    ///
    /// The vec is always kept sorted so that we can find whether a given validator is
    /// disabled using binary search. It gets cleared when `on_session_ending` returns
    /// a new set of identities.
    #[pallet::storage]
    #[pallet::getter(fn disabled_validators)]
    pub type DisabledValidators<T> = StorageValue<_, Vec<u32>, ValueQuery>;

This error means whichever validator you are running into an issue with is part of this DisabledValidators list, or whatever you have implemented for the DisabledValidators hook.

If you don't want this behavior, use () for the DisabledValidators hook.

2
  • That's interesting. I wonder why would my "new" validator be in the DisabledValidator storage value when the network hasn't seen it before? Commented Apr 24, 2022 at 14:53
  • hard to say, you would need to do some lower level tracking here to see the exact behaviors leading to this
    – Shawn Tabrizi
    Commented Apr 24, 2022 at 20:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.