Joystream / joystream

Joystream Monorepo
http://www.joystream.org
GNU General Public License v3.0
1.42k stars 115 forks source link

Possible substrate staking pallet bug: empty validator info query results #5140

Open traumschule opened 5 months ago

traumschule commented 5 months ago

I noticed a 'hole' querying validator info that may indicate a bug in substrate itself or for example modifications to Joystream/substrate.

The first symptom is the missing own stake both in p-js and pioneer. ownstakebug-pioneer ownstakebug-pjs

On further inspection following chain queries return empty information as well:

In following screenshot for each query the first entry is for j4Rc8VUXGYAx7FNbVZBFU72rQw3GaCuG2AkrUQWnWTh5SpemP the second (correct): j4ShWRXxTG4K5Q5H7KXmdWN8HnaaLwppqM7GdiSwAy3eTLsJt. Both staking.payee and staking.validators return correct output for the first address (24) and are omitted here regarding the second (26) for brevity.

ledger

Please confirm that this problem persists and consult upstream if necessary. (cc @rossbulat )

Finally correct account information for 24 from the p-js details pane: jssde-details

(feel free to change title based on findings)

mochet commented 4 months ago

Someone else reported the same issue on our Discord and made a stackexchange issue for it: https://substrate.stackexchange.com/questions/11260/validator-reports-0-own-stake

It ended up showing up for them randomly after some time. I did look on Polkadot and it appears some validators had the same thing happening to them. I also asked on the Polkadot Watercooler and linked the stackexchange thread but never got any response or interest from anyone.

traumschule commented 4 months ago

I noticed another staking anomaly that shows and counts one nominator (j4RUKCimuWUSAC6tYVL5X1cn6qW2iVjgT35DFzgccCreqTnd6) twice for j4Wfvho5H5kdogeZfb3pnuZGzucyjUPVkvj4BNLVYPf4JzdVZ.

To my understanding one account can nominate a validator only once but here it makes the bulk of the total stake with 2x1.258M/3.8M.

staking.nominators:
  [
    [
      j4RUKCimuWUSAC6tYVL5X1cn6qW2iVjgT35DFzgccCreqTnd6
    ]
    {
      targets: [
        j4Wfvho5H5kdogeZfb3pnuZGzucyjUPVkvj4BNLVYPf4JzdVZ
      ]
      submittedIn: 1,894
      suppressed: false
    }
  ]
bedeho commented 4 months ago

Have not had time to review, is this urgent?