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

support multiple slash ratios #164

Merged
merged 5 commits into from
Nov 14, 2023
Merged

support multiple slash ratios #164

merged 5 commits into from
Nov 14, 2023

Conversation

uint
Copy link
Contributor

@uint uint commented Nov 13, 2023

Closes #151

The changes to native-staking are there to support the modified LocalStakingApi::max_slash.

@uint uint requested a review from maurolacy November 13, 2023 16:46
@uint uint force-pushed the 151-support-multiple-slash-ratios branch from b788f76 to db4e9d1 Compare November 13, 2023 21:50
Copy link
Collaborator

@maurolacy maurolacy left a comment

Choose a reason for hiding this comment

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

LGTM.

packages/apis/src/local_staking_api.rs Outdated Show resolved Hide resolved
@@ -472,7 +477,8 @@ impl ExternalStakingContract<'_> {
.tombstone_validator(deps.storage, valoper, height, time)?;
if active {
// Slash the validator (if bonded)
let slash_msg = self.handle_slashing(&env, deps.storage, valoper)?;
let slash_msg =
self.handle_slashing(&env, deps.storage, valoper, SlashingReason::DoubleSign)?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍🏼

@uint uint force-pushed the 151-support-multiple-slash-ratios branch 2 times, most recently from 3c523c8 to 745ee54 Compare November 14, 2023 18:00
@uint uint force-pushed the 151-support-multiple-slash-ratios branch from 745ee54 to c20eecc Compare November 14, 2023 18:06
@codecov-commenter
Copy link

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (84d9ff3) 88.36% compared to head (c20eecc) 88.40%.

Files Patch % Lines
...ontracts/provider/external-staking/src/contract.rs 82.60% 1 Missing and 3 partials ⚠️
...provider/external-staking/src/test_methods_impl.rs 83.33% 0 Missing and 1 partial ⚠️
contracts/provider/native-staking/src/contract.rs 83.33% 1 Missing ⚠️
...s/provider/native-staking/src/local_staking_api.rs 85.71% 0 Missing and 1 partial ⚠️
contracts/provider/vault/src/contract.rs 75.00% 0 Missing and 1 partial ⚠️
packages/apis/src/local_staking_api.rs 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #164      +/-   ##
==========================================
+ Coverage   88.36%   88.40%   +0.03%     
==========================================
  Files          69       69              
  Lines       13112    13151      +39     
  Branches    13112    13151      +39     
==========================================
+ Hits        11587    11626      +39     
  Misses        992      992              
  Partials      533      533              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@uint uint merged commit 76120a4 into main Nov 14, 2023
4 checks passed
@uint uint deleted the 151-support-multiple-slash-ratios branch November 14, 2023 18:08
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.

Support multiple slash ratios
3 participants