Skip to content

api.derive.session.info() shows unused/non-applicable data #1605

@jak-pan

Description

@jak-pan

Using 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.

https://polkascan.io/pre/kusama-cc2/event
Screen Shot 2019-11-26 at 01 57 40

lastLengthChange: createType(api.registry, 'BlockNumber', epochStartSlot),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions