api.derive.session.info() shows unused/non-applicable data
See original GitHub issueUsing api beta30 - getting derived session info returns wrong value on current kusama node. Chain height currently at BN:826889 while value for last session(epoch?) change is showing value of 262453039
It looks like other data is also wrong - if we look at polkascan and look into events on kusamacc2 - session and era starts do not correspond to data shown in session info.
According to session info, there should have been session starts at blocks 824870, 822470, 820070 which is calculated from
await api.rpc.chain.getHeader()).number.toNumber() - sessionProgress
which doesn’t look like it’s right because
await api.query.system.events.at(await api.rpc.chain.getBlockHash(824870))
doesn’t return events that should be emitted on new nession start. Whereas
await api.query.system.events.at(await api.rpc.chain.getBlockHash(824956))
does return these events
it looks like eraProgress returns same value as sessionProgress which is also wrong.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (7 by maintainers)
Yes, I know it worked on 1.x that’s why I was confused by this. Thanks for the explanation.
100%. You will need to check block for session start events.
(We used to have that functionality in Substrate 1.x chains, e.g. Alexander, however it is not available on-chain anymore since Babe does not need it to operate - on-chain state is for operational requirements)