Description
Hey all. First off, thanks for the rapid work on #11401.
I didn't look too close of a look into what was merged there. Now that I have, I will compile my list of issues + follow-ups here:
Westend Relay
Command Center
-
events: No events available
- Please add a tooltip to this saying that there are no relevant events, naming which events are being filtered. Otherwise it might imply that this block had no events at all, which is not true
-
Active
I don't really know what this is about
- Performance
I have not used this page much yet, but I do worry it will become too soon too hard to render. Perhaps we should render a new row on each side, only if one of the important data being displayed has changed
Staking
tab
- is still present, but most of the data is not populated. I suggest removing it as a whole. We will soon remove the pallet from the runtime as well.
Westend Asset Hub
The above picture has at least two issues:
- The validators shown are the asset hub collators, not the relay chain validators
- The number of active nominators is miscalculated. What you should do to calculate this is as follows:
const era = (await api.query.staking.currentEra()).unwrap();
// you don't need this one, just for demonstration of how the storage works.
const overviews = (await api.query.staking.erasStakersOverview.entries(era)).map(([key, value]) => {
const stash = key.args[1].toHuman();
const metadata = value.unwrap();
return { stash, metadata }
});
console.log(`overviews/exposed validators: ${overviews.length}`);
const exposedNominators = (await api.query.staking.erasStakersPaged.entries(era)).map(([key, value]) => {
// @ts-ignore
return value.unwrap().others.map((x) => x.who.toString());
}).flat();
console.log(`exposed backers: ${exposedNominators.length}`);
// this is what you want to show.
const uniq = [...new Set(exposedNominators)];
console.log(`unique exposures: ${uniq.length}`);
// This is equal to `exposedNominators.length`
const sumNominators = overviews.map(({ metadata }) => metadata.nominatorCount.toNumber()).reduce((a, b) => a + b, 0);
console.log(`sumNominators: ${sumNominators}`);
Moreover:
- We are lacking an overview here. A tooltip with the above message would be great:
Staking Async is Polkadot's staking system which elects validators for the Relay Chain, on AssetHub. The actual collators of the AssetHub parachain are managed by collator-selection system. To nominate a Relay Chain validator, please use this page and everything works as before. To setup a validator, please see here. For more information about Staking async, and AssetHub migration please see the Asset Hub Migration FAQ.
We will update the above once #11662 is closed and we have more/better docs.
Session and Era
Please rename both to Relay Session Index
and Relay Active Era Index
, highlighting that they are not equal to the session index that is related to asset-hub's collator selection. In other words, not the pallet-session
instance on asset-hub, but rather the one on the relay chain.
- At the moment, you are showing the wrong session index there.
- For era, please note that it is
Relay Active Era
(not to be confused withCurrentEra
, which we have in Command center)
Command Center
- The snapshot range is not formatted correctly: