Skip to content

test: bc full and half slashes#1163

Merged
ypatil12 merged 3 commits intotest/slashing-integration-testingfrom
yash/bc-mock-slashing-types
Feb 25, 2025
Merged

test: bc full and half slashes#1163
ypatil12 merged 3 commits intotest/slashing-integration-testingfrom
yash/bc-mock-slashing-types

Conversation

@ypatil12
Copy link
Copy Markdown
Contributor

@ypatil12 ypatil12 commented Feb 25, 2025

Motivation:

We need to test full slashes for EigenPods.

Modifications:

Added the SlashType enum which slashes either the normal amount (10 gwei), half the validators balance, or fully slashes the validator. This needs to be passed in on every call to slashValidators

Tests:

  • test_fullSlash_Delegate
  • test_fullSlash_Revert_Redeposit

Result:

Expressive BC slashing.

Note, delegation does not revert when the slashing factor of a staker is zero.

@ypatil12 ypatil12 changed the base branch from dev to test/slashing-integration-testing February 25, 2025 18:19
@ypatil12 ypatil12 added ✨ Enhancement New feature or request. 🗡️ Slashing Release Changes for the slashing release. 🧪 Test Test-related changes (unit, integration, etc.). labels Feb 25, 2025
@0xClandestine 0xClandestine self-requested a review February 25, 2025 18:29
Copy link
Copy Markdown
Collaborator

@eigenmikem eigenmikem left a comment

Choose a reason for hiding this comment

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

Looks good, ty

@0xClandestine 0xClandestine removed the ✨ Enhancement New feature or request. label Feb 25, 2025
@0xClandestine 0xClandestine changed the title feat: bc full and half slashes test: bc full and half slashes Feb 25, 2025
@ypatil12 ypatil12 merged commit 519e447 into test/slashing-integration-testing Feb 25, 2025
10 checks passed
@ypatil12 ypatil12 deleted the yash/bc-mock-slashing-types branch February 25, 2025 21:09
ypatil12 added a commit that referenced this pull request Feb 27, 2025
**Motivation:**

We need to test full slashes for EigenPods. 

**Modifications:**

Added the `SlashType` enum which slashes either the normal amount (10
gwei), half the validators balance, or fully slashes the validator. This
needs to be passed in on every call to `slashValidators`

Tests:
- [x] test_fullSlash_Delegate
- [x] test_fullSlash_Revert_Redeposit


**Result:**

Expressive BC slashing. 

Note, delegation does not revert when the slashing factor of a staker is
zero.
ypatil12 added a commit that referenced this pull request Feb 27, 2025
**Motivation:**

We need to test full slashes for EigenPods. 

**Modifications:**

Added the `SlashType` enum which slashes either the normal amount (10
gwei), half the validators balance, or fully slashes the validator. This
needs to be passed in on every call to `slashValidators`

Tests:
- [x] test_fullSlash_Delegate
- [x] test_fullSlash_Revert_Redeposit


**Result:**

Expressive BC slashing. 

Note, delegation does not revert when the slashing factor of a staker is
zero.
ypatil12 added a commit that referenced this pull request Feb 27, 2025
**Motivation:**

We need to test full slashes for EigenPods. 

**Modifications:**

Added the `SlashType` enum which slashes either the normal amount (10
gwei), half the validators balance, or fully slashes the validator. This
needs to be passed in on every call to `slashValidators`

Tests:
- [x] test_fullSlash_Delegate
- [x] test_fullSlash_Revert_Redeposit


**Result:**

Expressive BC slashing. 

Note, delegation does not revert when the slashing factor of a staker is
zero.
ypatil12 added a commit that referenced this pull request Mar 5, 2025
**Motivation:**

We need to test full slashes for EigenPods.

**Modifications:**

Added the `SlashType` enum which slashes either the normal amount (10
gwei), half the validators balance, or fully slashes the validator. This
needs to be passed in on every call to `slashValidators`

Tests:
- [x] test_fullSlash_Delegate
- [x] test_fullSlash_Revert_Redeposit

**Result:**

Expressive BC slashing.

Note, delegation does not revert when the slashing factor of a staker is
zero.
ypatil12 added a commit that referenced this pull request Mar 5, 2025
**Motivation:**

We need to test full slashes for EigenPods.

**Modifications:**

Added the `SlashType` enum which slashes either the normal amount (10
gwei), half the validators balance, or fully slashes the validator. This
needs to be passed in on every call to `slashValidators`

Tests:
- [x] test_fullSlash_Delegate
- [x] test_fullSlash_Revert_Redeposit

**Result:**

Expressive BC slashing.

Note, delegation does not revert when the slashing factor of a staker is
zero.
ypatil12 added a commit that referenced this pull request Mar 5, 2025
**Motivation:**

Slashing Integration Testing for Competition Audit

**Modifications:**

***General State Validation***
- #1204
- #1198
- #1169
- #1158

***Upgrade Tests***
- #1187
- #1171
- #1143

***Dual Slash Tests***
- #1195
- #1153

***Rounding Tests***
- #1178

***EigenPod Tests***
- #1191
- #1188
- #1203
- #1194
- #1163

***Invariants***
- #1201
- #1176
- #1192
- #1197
- #1175
- #1189
- #1150
- #1149

**Result:**

Comprehensive Test Coverage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗡️ Slashing Release Changes for the slashing release. 🧪 Test Test-related changes (unit, integration, etc.).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants