test: upgrade integration testing#1143
Merged
0xClandestine merged 10 commits intotest/slashing-integration-testingfrom Feb 25, 2025
Merged
test: upgrade integration testing#11430xClandestine merged 10 commits intotest/slashing-integration-testingfrom
0xClandestine merged 10 commits intotest/slashing-integration-testingfrom
Conversation
0xClandestine
commented
Feb 20, 2025
src/test/integration/tests/upgrade/Complete_PreSlashing_Withdrawal.t.sol
Outdated
Show resolved
Hide resolved
…rder test functions
e48f4b3 to
0c3d923
Compare
ypatil12
reviewed
Feb 25, 2025
Contributor
ypatil12
left a comment
There was a problem hiding this comment.
Minor organizational comments
src/test/integration/tests/upgrade/Complete_PreSlashing_Withdrawal.t.sol
Outdated
Show resolved
Hide resolved
src/test/integration/tests/upgrade/Complete_PreSlashing_Withdrawal.t.sol
Outdated
Show resolved
Hide resolved
src/test/integration/tests/upgrade/Complete_PreSlashing_Withdrawal.t.sol
Outdated
Show resolved
Hide resolved
- Combine full and partial withdrawal tests into single parameterized tests - Add random toggle between full/partial withdrawal scenarios - Improve variable naming for clarity - Remove redundant test cases
- Added TestState struct to hold all test state in one place - Created _init_() helper that handles common setup patterns: - Creating staker and operator - Handling delegation - Setting up withdrawal shares (full/partial) - Refactored all tests to use the helper function - Reduced code duplication and improved readability
- Merge duplicate test cases into parameterized tests using completeAsTokens flag - Add _completeWithdrawal helper to reduce code duplication - Remove allocation test case (handled separately) - Improve code organization and readability
7f9f55a
into
test/slashing-integration-testing
10 checks passed
ypatil12
pushed a commit
that referenced
this pull request
Feb 27, 2025
**Motivation:** The changes are focused on adding test coverage for pre-slashing withdrawal scenarios and how the slashing upgrade affects them. **Modifications:** 1. Added new test cases for withdrawal completion: - [x] `testFuzz_upgrade_delegate_queuePartial_completeAsShares` - [x] `testFuzz_upgrade_delegate_queuePartial_completeAsTokens` - [x] `testFuzz_delegate_deposit_queue_completeBeforeUpgrade_asShares` - [x] `testFuzz_delegate_deposit_queue_completeBeforeUpgrade_asTokens` - [x] `testFuzz_delegate_deposit_queue_completeBeforeUpgrade_partial_asShares` - [x] `testFuzz_delegate_deposit_queue_completeBeforeUpgrade_partial_asTokens` **Result:** Move coverage.
ypatil12
pushed a commit
that referenced
this pull request
Feb 27, 2025
**Motivation:** The changes are focused on adding test coverage for pre-slashing withdrawal scenarios and how the slashing upgrade affects them. **Modifications:** 1. Added new test cases for withdrawal completion: - [x] `testFuzz_upgrade_delegate_queuePartial_completeAsShares` - [x] `testFuzz_upgrade_delegate_queuePartial_completeAsTokens` - [x] `testFuzz_delegate_deposit_queue_completeBeforeUpgrade_asShares` - [x] `testFuzz_delegate_deposit_queue_completeBeforeUpgrade_asTokens` - [x] `testFuzz_delegate_deposit_queue_completeBeforeUpgrade_partial_asShares` - [x] `testFuzz_delegate_deposit_queue_completeBeforeUpgrade_partial_asTokens` **Result:** Move coverage.
ypatil12
pushed a commit
that referenced
this pull request
Feb 27, 2025
**Motivation:** The changes are focused on adding test coverage for pre-slashing withdrawal scenarios and how the slashing upgrade affects them. **Modifications:** 1. Added new test cases for withdrawal completion: - [x] `testFuzz_upgrade_delegate_queuePartial_completeAsShares` - [x] `testFuzz_upgrade_delegate_queuePartial_completeAsTokens` - [x] `testFuzz_delegate_deposit_queue_completeBeforeUpgrade_asShares` - [x] `testFuzz_delegate_deposit_queue_completeBeforeUpgrade_asTokens` - [x] `testFuzz_delegate_deposit_queue_completeBeforeUpgrade_partial_asShares` - [x] `testFuzz_delegate_deposit_queue_completeBeforeUpgrade_partial_asTokens` **Result:** Move coverage.
ypatil12
pushed a commit
that referenced
this pull request
Mar 5, 2025
**Motivation:** The changes are focused on adding test coverage for pre-slashing withdrawal scenarios and how the slashing upgrade affects them. **Modifications:** 1. Added new test cases for withdrawal completion: - [x] `testFuzz_upgrade_delegate_queuePartial_completeAsShares` - [x] `testFuzz_upgrade_delegate_queuePartial_completeAsTokens` - [x] `testFuzz_delegate_deposit_queue_completeBeforeUpgrade_asShares` - [x] `testFuzz_delegate_deposit_queue_completeBeforeUpgrade_asTokens` - [x] `testFuzz_delegate_deposit_queue_completeBeforeUpgrade_partial_asShares` - [x] `testFuzz_delegate_deposit_queue_completeBeforeUpgrade_partial_asTokens` **Result:** Move coverage.
This was referenced Mar 5, 2025
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
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation:
The changes are focused on adding test coverage for pre-slashing withdrawal scenarios and how the slashing upgrade affects them.
Modifications:
testFuzz_upgrade_delegate_queuePartial_completeAsSharestestFuzz_upgrade_delegate_queuePartial_completeAsTokenstestFuzz_delegate_deposit_queue_completeBeforeUpgrade_asSharestestFuzz_delegate_deposit_queue_completeBeforeUpgrade_asTokenstestFuzz_delegate_deposit_queue_completeBeforeUpgrade_partial_asSharestestFuzz_delegate_deposit_queue_completeBeforeUpgrade_partial_asTokensResult:
Move coverage.