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

Conversation

@dvc94ch
Copy link
Contributor

@dvc94ch dvc94ch commented Jun 3, 2019

Instead of forcing a new era when the staking module slashes a validator it disables the validator. The default implementation for this forces a new era, but the babe module should be able to do it's own book keeping.

@dvc94ch dvc94ch force-pushed the dvc-disable-validator branch from 605701a to d048be1 Compare June 3, 2019 14:35
@dvc94ch dvc94ch added A0-please_review Pull request needs code review. A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). labels Jun 3, 2019
@gavofyork
Copy link
Member

This isn't quite right. Is it only meant as the first step with several follow-up PRs yet to come?

Staking shouldn't be implementing or responding to OnDisable directly at all. The only signal Staking should be responding to is SessionWillEnd. The only modules that should be listening are Grandpa, Babe and (in Polkadot) Parachains. Session should have a configurable type in its trait to tell it when the session is_ended, which for now can be a simple block_number() % SESSION_LENGTH == 0, but will ultimately come from Babe.

@dvc94ch
Copy link
Contributor Author

dvc94ch commented Jun 4, 2019

Is SessionWillEnd distinct from OnSessionChange?

@gavofyork gavofyork mentioned this pull request Jun 5, 2019
16 tasks
@dvc94ch dvc94ch closed this Jun 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A0-please_review Pull request needs code review. A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants