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.75k stars 1.54k forks source link

Support parachain import/best delay #6535

Open crystalin opened 2 years ago

crystalin commented 2 years ago

Currently in the UI, it often happens that data appears incorrectly due to the fact that, in parachain, a block is imported before being considered best. This leads to data like this, where the events points to a block that is not displayed in the recent blocks image

More annoying issues are the democracy where the a referendum appears and then disappear. Or the council/TC where the votes will never appear (until you reload the page).

We should find a nice way to handle those differences

jacogr commented 2 years ago

There are 3 new block subscriptions -

The UI currently uses the second one for the events display in the screenshot. And yes, also have seen that on parachains things are a lot rougher.

For the votes, that is a separate issue, in that case it subscribes to the storage key changes, if they don't appear, that is very weird since the node should just pass changes along. It could be that there is something funky in the api-derive (they may be used on votes), will take a look through to see if in/out changes sub changes can maybe lead to what you describe.

jacogr commented 2 years ago

Seems sensible to make some adjustments, whatever that may mean - have to keep it open, but it is well, and open question.

joelamouche commented 2 years ago

@crystalin Do you still see an issue with the votes?

@jacogr Should we use chain_subscribeAllHeads in both events and block displays?