Skip to content

test: add more comprehensive dsf checks#1192

Merged
ypatil12 merged 4 commits intotest/slashing-integration-testingfrom
yash/dsf-increase-invariants
Mar 3, 2025
Merged

test: add more comprehensive dsf checks#1192
ypatil12 merged 4 commits intotest/slashing-integration-testingfrom
yash/dsf-increase-invariants

Conversation

@ypatil12
Copy link
Copy Markdown
Contributor

@ypatil12 ypatil12 commented Feb 28, 2025

Motivation:

We want to check the DSF on

  • Delegation (increase when non-WAD maxMag, else stay same)
  • Deposits (increase on non-WAD slashing factor, else stay same)
  • Completing withdrawals as shares (same as deposit)

Modifications:

Added assert_Snap_DSF_State_Deposit, assert_Snap_DSF_State_Delegation, assert_Snap_DSF_State_CompleteAsShares

Result:

Stricter DSF invariants

@ypatil12 ypatil12 added 🗡️ Slashing Release Changes for the slashing release. 🧪 Test Test-related changes (unit, integration, etc.). labels Feb 28, 2025
@ypatil12 ypatil12 changed the title test: add dsf increase invariant test: add more comprehensive dsf invariants Feb 28, 2025
@ypatil12 ypatil12 changed the title test: add more comprehensive dsf invariants test: add more comprehensive dsf checks Feb 28, 2025
@ypatil12 ypatil12 force-pushed the yash/dsf-increase-invariants branch from 0b1daf8 to eca4cff Compare February 28, 2025 23:10
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.

lgtm

}
}

/// @dev Used to assert that the DSF is either increased or unchanged, depending on the slashing factor, on a deposit
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I've been trying to consolidate "withdrawal as shares" and "deposit" assertions since they should be the same thing, might make sense to do that here if you have time

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Think we can do it in a separate PR? Trying to get this in

@ypatil12 ypatil12 merged commit daaa61d into test/slashing-integration-testing Mar 3, 2025
10 checks passed
@ypatil12 ypatil12 deleted the yash/dsf-increase-invariants branch March 3, 2025 16:44
ypatil12 added a commit that referenced this pull request Mar 5, 2025
**Motivation:**

We want to check the DSF on 
- Delegation (increase when non-WAD maxMag, else stay same)
- Deposits (increase on non-WAD slashing factor, else stay same)
- Completing withdrawals as shares (same as deposit)

**Modifications:**

Added `assert_Snap_DSF_State_Deposit`,
`assert_Snap_DSF_State_Delegation`,
`assert_Snap_DSF_State_CompleteAsShares`

**Result:**

Stricter DSF invariants
ypatil12 added a commit that referenced this pull request Mar 5, 2025
**Motivation:**

We want to check the DSF on 
- Delegation (increase when non-WAD maxMag, else stay same)
- Deposits (increase on non-WAD slashing factor, else stay same)
- Completing withdrawals as shares (same as deposit)

**Modifications:**

Added `assert_Snap_DSF_State_Deposit`,
`assert_Snap_DSF_State_Delegation`,
`assert_Snap_DSF_State_CompleteAsShares`

**Result:**

Stricter DSF invariants
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.

4 participants