Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slashing module must handle initial blocks differently #19

Open
haasted opened this issue Apr 5, 2020 · 1 comment
Open

Slashing module must handle initial blocks differently #19

haasted opened this issue Apr 5, 2020 · 1 comment
Assignees

Comments

@haasted
Copy link
Collaborator

haasted commented Apr 5, 2020

Describe the bug

The slashing module jails validators based on a ratio of missed to signed blocks due to the dynamic blocktime of the chain.

This creates a special case in the initial life of a chain where missing a low number of blocks results in a very large "missed ratio".

How to reproduce

Spin up a testnet and let one of the validators miss the first block. This will be interpreted as a "100% miss rate" and the validator will be immediately jailed.

Expected behavior

Allow the validators to miss a reasonable amount of blocks without getting slashed.

One way to solve this is to not jail a validator if blockCount in the slashing module's keeper is less than e.g. 100.

mdyring added a commit that referenced this issue Oct 20, 2020
blewater pushed a commit that referenced this issue Dec 9, 2020
@haasted haasted reopened this Sep 21, 2021
@haasted
Copy link
Collaborator Author

haasted commented Sep 21, 2021

The fix applied in this issue is not sufficient.

The first block's blocktime will be from genesis.json and may thus be outside the signedBlocksWindow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant