polkadot-cloud/polkadot-staking-dashboard

Pending Payouts for a nominator that nominates to 2 validators not showing correctly

frankli-dev opened this issue · 3 comments

I created a local network with two validators Alice & Bob.
And then created a nominator TEST-1
I let TEST-1 to nominate to two validators Alice & Bob.

On polkadot-staking-dashboard, nominate page doesn't show correct pending payout.
Pasted_Image_12_20_23__11_23_AM

Polkadot_Substrate_Portal

Is this another overflow error similar to Bonded funds?

You can see that the pending payouts for TEST-1 is different between polkadot js app & polkadot staking dashboard.

Another thing related is that on polkadot staking dashboard, it shows 5-17 eras to be remaining but on polkadot staking dashboard, it shows 8-17 eras.
So staking dashboard misses some eras but its payout amount is even bigger. Really weird.

Please help me on this

I haven't looked into this in detail but staking dashboard only supports the last 7 eras of payouts. Computing pending payouts requires a lot of computation so its been intentionally capped at least for the time being.

@rossbulat
Thanks for your response.

Now I have another question, then.

  1. How does polkadotjs app calculate it? Can we make polkadot-staking-dashboard work same as polkadot js app?
  2. Even it only supports the last 7 eras, how can it be larger than the polkadot js app amount?
  3. Also, why does it work with one validator? It is only different when nominating to multiple validators

I've fixed the issue.
I needed to clear the localstorage in the browser before re-running the local chain.
Because if not cleared, then localstorage's eraExposure may include the previous chain's reward values.

Beside this, I needed to increase the max reward payout era to 84 and also needed to fix the following lines of code.

src/contexts/Payouts/index.tsx
Screenshot 2024-01-09 at 4 44 18 AM