Skip to content

Handle the case when pallet slots is not being used #11381

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tatulea
Copy link

@tatulea tatulea commented Mar 11, 2025

The slots module does not have to be implemented by all relay chains. Currently, the frontend will crash if the implementation is not available, so making slots optional was required.

@ap211unitech
Copy link
Member

One question, Does it break anything currently?

@tatulea
Copy link
Author

tatulea commented Mar 21, 2025

One question, Does it break anything currently?

not for the manual testing that i was conducting. if the slots pallet is not available, then the data won't be displayed. without this change, the frontend crashes because it expects slots to be available

@ap211unitech
Copy link
Member

@tatulea For now, the slots pallet is always present in the Polkadot runtime, but its existence in the long term depends on the network's evolution. If there are any governance decisions or updates that modify slot allocation, changes may be required accordingly. So these changes are not necessary at this time.
However, if future updates remove or replace the slots pallet, we can make the necessary adjustments accordingly. In my opinion, this PR can be closed for now.

@tatulea
Copy link
Author

tatulea commented Mar 21, 2025

The slots pallet is not required to be present in every ralay chain. There are chains where it is not present, even tho Polkadot has it

@TarikGul
Copy link
Member

@tatulea If you can give a reproducible step by step on how you're getting the UI to crash that would be great.

If anything we can just add api.query.slots to the apps-routing of page-parachains, and it wont load those assets.

@tatulea
Copy link
Author

tatulea commented Mar 25, 2025

@tatulea If you can give a reproducible step by step on how you're getting the UI to crash that would be great.

If anything we can just add api.query.slots to the apps-routing of page-parachains, and it wont load those assets.

One example is https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fstagelight.tanssi-dev.network#/parachains

@TarikGul
Copy link
Member

@tatulea If you can give a reproducible step by step on how you're getting the UI to crash that would be great.
If anything we can just add api.query.slots to the apps-routing of page-parachains, and it wont load those assets.

One example is https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fstagelight.tanssi-dev.network#/parachains

Okay so it's crashing because the chain you provided has query.paras.parachains available, but you don't have the slots pallet.

The PR I added ensures that the parachain page wont be available if the slots pallet is not there.

@tatulea
Copy link
Author

tatulea commented Mar 26, 2025

The PR I added ensures that the parachain page wont be available if the slots pallet is not there.

But can it be that the relay chain does not require to use slots, but can still have parachains?

@TarikGul
Copy link
Member

The PR I added ensures that the parachain page wont be available if the slots pallet is not there.

But can it be that the relay chain does not require to use slots, but can still have parachains?

The logic around the UI for the parachains page was built with slots so no, unless you have the slots pallet active on the chain it wont work. That being said, if I understand correctly, once all the leases are done we can remove all the leases info since they won't be continued.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants