polkadot-js / apps

Basic Polkadot/Substrate UI for interacting with a Polkadot and Substrate node. This is the main user-facing application, allowing access to all features available on Substrate chains.
https://dotapps.io
Apache License 2.0
1.73k stars 1.52k forks source link

Bug: Parachain referenda tracks not displayed on Referenda page #10544

Open wischli opened 2 months ago

wischli commented 2 months ago

The Referenda landing page /referenda only displays the 0/root track for parachains even though api.consts.referenda.tracks includes other entries. For instance, check Moonbeam: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwss.api.moonbeam.network#/referenda

I have to admit that I did not check all parachains but I ran into this issue as part of adding OpenGov to Centrifuge Chain. I am running a chopsticks instance with a WASM override which includes OpenGov with several tracks.

Referenda Page
Screenshot 2024-05-06 at 18 04 05
Tracks
api.consts.referenda.tracks =
[[0, {name: root, maxDeciding: 5, decisionDeposit: 2000000000000000000000000, preparePeriod: 7200, decisionPeriod: 100800, confirmPeriod: 7200, minEnactmentPeriod: 7200, minApproval: {"reciprocal":{"factor":999999999,"xOffset":999999999,"yOffset":0}}, minSupport: {"linearDecreasing":{"length":1000000000,"floor":5000000,"ceil":250000000}}}], [1, {name: whitelisted_caller, maxDeciding: 100, decisionDeposit: 200000000000000000000000, preparePeriod: 50, decisionPeriod: 100800, confirmPeriod: 50, minEnactmentPeriod: 150, minApproval: {"reciprocal":{"factor":999999999,"xOffset":999999999,"yOffset":0}}, minSupport: {"reciprocal":{"factor":60061,"xOffset":2994150,"yOffset":-59882}}}], [2, {name: general_admin, maxDeciding: 10, decisionDeposit: 10000000000000000000000, preparePeriod: 300, decisionPeriod: 100800, confirmPeriod: 7200, minEnactmentPeriod: 7200, minApproval: {"reciprocal":{"factor":999999999,"xOffset":999999999,"yOffset":0}}, minSupport: {"reciprocal":{"factor":222222224,"xOffset":333333335,"yOffset":-166666668}}}], [3, {name: referendum_canceller, maxDeciding: 20, decisionDeposit: 200000000000000000000000, preparePeriod: 300, decisionPeriod: 100800, confirmPeriod: 900, minEnactmentPeriod: 50, minApproval: {"reciprocal":{"factor":999999999,"xOffset":999999999,"yOffset":0}}, minSupport: {"reciprocal":{"factor":869501,"xOffset":8620680,"yOffset":-862069}}}], [4, {name: referendum_killer, maxDeciding: 100, decisionDeposit: 400000000000000000000000, preparePeriod: 300, decisionPeriod: 100800, confirmPeriod: 900, minEnactmentPeriod: 50, minApproval: {"reciprocal":{"factor":999999999,"xOffset":999999999,"yOffset":0}}, minSupport: {"reciprocal":{"factor":869501,"xOffset":8620680,"yOffset":-862069}}}]]

It should mimic the relaychain because else tracks except for root can only be distinguished using external frontends.

TarikGul commented 2 months ago

Can confirm the above. I am able to see all the tracks in polkadot, but not moonbeam

TarikGul commented 2 months ago

It's late so I am going to continue looking into this tomorrow, but a questions I have for myself would be: What makes a track active/available, and is this actually a bug or expected behavior?