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

stake-contract: Implement new hard slashing #1925

Merged
merged 4 commits into from
Jul 5, 2024
Merged

stake-contract: Implement new hard slashing #1925

merged 4 commits into from
Jul 5, 2024

Conversation

fed-franz
Copy link
Contributor

@fed-franz fed-franz commented Jul 3, 2024

Partially Implements #1651

The second part (enabling generators to include proofs of hard faults) is addressed by #1923

@fed-franz fed-franz added the module:consensus Issues related to consensus module label Jul 3, 2024
@fed-franz fed-franz changed the title Hard slash Implement new hard slashing Jul 3, 2024
@fed-franz fed-franz force-pushed the hard_slash branch 2 times, most recently from 45764a0 to 40548d0 Compare July 3, 2024 16:04
@fed-franz fed-franz marked this pull request as ready for review July 3, 2024 16:04
@fed-franz fed-franz requested a review from herr-seppia July 3, 2024 16:05
Copy link
Member

@herr-seppia herr-seppia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the hard_faults reset on reward.

@fed-franz
Copy link
Contributor Author

fed-franz commented Jul 4, 2024

I don't see the hard_faults reset on reward.

Fixed and added a test

herr-seppia
herr-seppia previously approved these changes Jul 4, 2024
Copy link
Member

@herr-seppia herr-seppia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Change the code to slash the stake incrementally, depending on
the number of 'hard_faults'. The stake is slashed by 10% times
the number of faults. The 'severity' parameter can be used to
increase 'hard_faults' by more than 1.

The slashed stake is also suspended for the resto of the current
epoch plus 'hard_faults'additional epochs.

See also #1651
@fed-franz fed-franz requested a review from goshawk-3 July 4, 2024 10:25
@herr-seppia herr-seppia added module:contracts Issues related to the genesis contracts and removed module:consensus Issues related to consensus module labels Jul 5, 2024
@fed-franz fed-franz merged commit 3763f32 into master Jul 5, 2024
8 checks passed
@fed-franz fed-franz deleted the hard_slash branch July 5, 2024 15:14
@herr-seppia herr-seppia changed the title Implement new hard slashing stake-contract: Implement new hard slashing Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:contracts Issues related to the genesis contracts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants