Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staking not working for older substrate versions #6763

Closed
JelliedOwl opened this issue Dec 31, 2021 · 5 comments
Closed

Staking not working for older substrate versions #6763

JelliedOwl opened this issue Dec 31, 2021 · 5 comments

Comments

@JelliedOwl
Copy link
Contributor

It looks like a recent change has broken the staking pages for some of the old substrate version chains. For example https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fmainnet.edgewa.re (but I've seen other chains it's also not working for).

As far as I can tell, the format for the response to staking --> erasValidatorsPrefs has changed and the old format isn't being parsed any more. Is there any possibility of a fix to make it work with the old and new format (assuming that's really the issue)?

@jacogr
Copy link
Member

jacogr commented Dec 31, 2021

This is actually not related to the UI at all and nothing that can be fixed here. The teams themselves are managing the types, in this case it seems that the ValidatorPrefs structure is incorrect, i.e. it just uses the API default which is the last version before metadata v14 was introduced.

It doesn't seem like there is any definition for this type in https://github.com/hicommonwealth/edgeware-node-types/blob/master/src/interfaces/definitions.ts - so basically since it is not specified, the UI just uses the type it has available.

There could be a breakage introduced by the API, but it won't be re-instated. In the past the API did it's best to try and detect types in various fashions, however it was not always spot-on with more-or-less a 95% success rate, getting some wrong. Since metadata v14 was introduced that problematic path was removed.

@JelliedOwl
Copy link
Contributor Author

Thanks @jacogr. Does that mean the only fix would require an upgrade on the Edgeware side, or is it something we can update without needing to change the on-chain executable? Sorry, I'm decidedly vague on how it works.

@jacogr
Copy link
Member

jacogr commented Dec 31, 2021

The package I linked to, https://github.com/hicommonwealth/edgeware-node-types/, needs to specify the correct ValidatorsPrefs type, it would probably be -

ValidatorPrefs: { commission: 'Compact<Perbill>' }

@JelliedOwl
Copy link
Contributor Author

Ah, and then it gets pulled in from here: https://github.com/polkadot-js/apps/blob/master/packages/apps-config/src/api/spec/edgeware.ts

Thanks - I'll see if I can get it updated on the Edgeware end.

@polkadot-js-bot
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Jan 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants