Open crystalin opened 2 years ago
There are 3 new block subscriptions -
chain_subscribeAllHeads
- everything, as imported (could be best or anything else)chain_subscribeNewHeads
- this is the current best (however could be forked off)chain_subscribeFinalizedHeads
- as the name suggests, only finalizedThe 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.
Seems sensible to make some adjustments, whatever that may mean - have to keep it open, but it is well, and open question.
@crystalin Do you still see an issue with the votes?
@jacogr Should we use chain_subscribeAllHeads in both events and block displays?
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
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