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

Fix slashable stake in slash processing #1520

Merged
merged 6 commits into from
Jun 14, 2023

Conversation

brentstone
Copy link
Collaborator

Based on v0.17.0.

In the procedure for processing slashes, we must compute the slashable stake for an epoch at or ahead of the current epoch in the presence of bonds that began contributing to stake after the infraction epoch. A slight change is needed to fix buggy behavior in the existing implementation of this computation. See the following discussion for more details: informalsystems/partnership-heliax#55 (comment).

@brentstone brentstone force-pushed the brent/fix-sum-post-bonds-slashing branch from 7e76927 to dad87f0 Compare June 8, 2023 03:52
@brentstone
Copy link
Collaborator Author

Need to also change this implementation in the AbstractState of the state machine test

@brentstone brentstone force-pushed the brent/fix-sum-post-bonds-slashing branch from 4ec81e2 to 8a40a31 Compare June 8, 2023 20:12
brentstone added a commit that referenced this pull request Jun 12, 2023
@brentstone brentstone force-pushed the brent/fix-sum-post-bonds-slashing branch from 8a40a31 to 56a2f63 Compare June 12, 2023 06:04
@tzemanovic tzemanovic force-pushed the brent/fix-sum-post-bonds-slashing branch from 7b4e333 to 55d6390 Compare June 12, 2023 07:40
@tzemanovic tzemanovic marked this pull request as ready for review June 12, 2023 07:40
@tzemanovic
Copy link
Member

@tzemanovic
Copy link
Member

pls update wasm

tzemanovic added a commit that referenced this pull request Jun 12, 2023
* brent/fix-sum-post-bonds-slashing:
  [ci] wasm checksums update
  changelog: #1520
  pos state machine: fix slashing computation
  simplify some code to a `max` function
  mute `total_slashed` for now
  fix calculation with `sum_post_bonds`
@tzemanovic tzemanovic mentioned this pull request Jun 12, 2023
Fraccaman added a commit that referenced this pull request Jun 14, 2023
* origin/brent/fix-sum-post-bonds-slashing:
  [ci] wasm checksums update
  changelog: #1520
  pos state machine: fix slashing computation
  simplify some code to a `max` function
  mute `total_slashed` for now
  fix calculation with `sum_post_bonds`
Fraccaman pushed a commit that referenced this pull request Jun 14, 2023
@Fraccaman Fraccaman merged commit ebe26c0 into main Jun 14, 2023
@Fraccaman Fraccaman deleted the brent/fix-sum-post-bonds-slashing branch June 14, 2023 14:41
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

Successfully merging this pull request may close these issues.

3 participants