-
Notifications
You must be signed in to change notification settings - Fork 138
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
feat: implement slashing functionality on the provider chain (ADR-013) #1275
Merged
insumity
merged 31 commits into
feat/ics-misbehaviour-handling
from
insumity/adr-013-impl-on-feat
Sep 27, 2023
Merged
Changes from 9 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
93a0db5
first version
insumity ea87bdc
fix mocks
insumity 177e1db
move slashing to other file and check tombstoning
insumity e1bdfff
add tests that checks that Slash is called
insumity bbff2ee
add FIXME msg
insumity dfef410
small changes
insumity 8b49af1
add fixme
insumity bf89509
fix test
insumity 868e0d2
modified E2E tests and general cleaning up
insumity 9ba3a3d
clean up
insumity b1a6f31
feat!: Cryptographic verification of equivocation (#1287)
mpoke d92a4c8
undelegations are getting slashed integraiton test
insumity 72abcf4
Merge branch 'release/v2.1.x-lsm' into insumity/adr-013-impl-on-feat
insumity b46ace4
fix merge issues
insumity 59d8192
fix mocks
insumity 31c090d
fix lint issue
insumity 79f8f18
Merge branch 'feat/ics-misbehaviour-handling' into insumity/adr-013-i…
insumity ed35638
took into account Simon's comments
insumity 62212c7
go.sum changes
insumity e5b46dd
gosec fix
insumity 4cb6283
fix linter issue
insumity 6f15a61
cherry-picked ADR-05 so markdown link checker does not complain
insumity 93c2cdb
lint
sainoe 1d3ee78
Use cached context to get tokens in undelegations and redelegations.
insumity 5c053bb
return the error
insumity f8633b5
lint issue
insumity f96f1bc
take into account Philip's comments
insumity d3dc0bc
clean up
insumity 39bbcf5
fix flakey test
insumity 694dce7
lint issue
insumity 366e3b1
fix error returns and fix flaky test in a better way
insumity File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
RepresentativePowers
was the only way I found to verify that slashing indeed takes place.Using
ValPowers
was not useful because after a validator gets jailed, the validator's voting power is0
. I also could notunjail
and then checkValPowers
similarly to what is done in steps_multi_consumer_downtime.go because in contrast to a downtime test, for misbehaviour & equivocation we also we also tombstone the validator.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems ok to me. Could rename it to something like StakedTokens instead of RepresentativePowers (looking at the code, I think that's what this actually is, right?)