Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Time gap for validators between srml/staking and srml/session will result in direct slash for new validators. #3553

@leahnoah

Description

@leahnoah

Hi, I noticed there were time gap between srml/staking and srml/session for validators query.

  1. at first, my chain has 4 initial validators.
  2. then two new validators added
  3. at the next era(era5), staking/CurrentElected showed the two new nodes elected and there were 6 validators at present as below:
    image. However, session/Validators still stayed as total 4 validators
  4. sometime later, at era6, session/Validators changed to 6 validators as below:
    image

So there were time gap between above 3 and 4. That will result in direct slashing at the very beginning for the two new validators.

  1. since the current elected count changed to 6, but the session validator_set/previous im-online count was 4
  2. the the new two nodes were reported offence at the very beginning
  3. slash happened

See logs below:
2019-09-05 10:35:36 //////on_before_session_ending function current elected length 6, keys length 4
2019-09-05 10:35:36 //////report_offence function offenders count 2, validator set 4
2019-09-05 10:35:36 /////on_offence function current era 6
2019-09-05 10:35:36 /////on offence slash_exposure9999999999327072
2019-09-05 10:35:36 /////slash validator total slash 374999999974765
2019-09-05 10:35:36 /////slash validator own_slash 374999999974765
2019-09-05 10:35:36 /////on offence slash_exposure9999999999327072
2019-09-05 10:35:36 /////slash validator total slash 374999999974765
2019-09-05 10:35:36 /////slash validator own_slash 374999999974765

I think it's unreasonable since the two new validators got slashing at the very beginning, but they did nothing wrong.
Is the time gap for validator count between staking and session module as expected?
Is the using previous im-online record for the new round of era at which new nodes may join reasonable?

Thanks.

Metadata

Metadata

Assignees

Labels

I3-bugThe node fails to follow expected behavior.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions