Skip to content

test: bc full slash tests and partial slash state validation#1194

Merged
ypatil12 merged 6 commits intotest/slashing-integration-testingfrom
yash/additional-bc-state-validation
Mar 4, 2025
Merged

test: bc full slash tests and partial slash state validation#1194
ypatil12 merged 6 commits intotest/slashing-integration-testingfrom
yash/additional-bc-state-validation

Conversation

@ypatil12
Copy link
Copy Markdown
Contributor

@ypatil12 ypatil12 commented Mar 1, 2025

Motivation:

Additional tests on beacon chain slashing

Modifications:

Full slash tests:

  • testFuzz_proveValidator_checkpoint_queue_completeAsTokens
  • test_fullSlash_Revert_Redeposit
  • testFuzz_fullSlash_registerStakerAsOperator_Revert_Redeposit
  • testFuzz_fullSlash_registerStakerAsOperator_delegate_undelegate_completeAsShares

Partial Slash Tests:

  • testFuzz_redeposit_queue_completeAsTokens
  • testFuzz_redeposit_queue_completeAsShares

Additionally:

  • Updated _getExpectedTokenBalances to factor in gwei rounding down for EigenPods
  • Updated queuedWithdrawal check when delegated or undelegated
  • Got rid of unnecessary checkpointing in SlashedEigenPod.t.sol

Result:

All single beacon chain slashing state validation complete.

@ypatil12 ypatil12 requested a review from eigenmikem March 1, 2025 06:20
@ypatil12 ypatil12 added 🗡️ Slashing Release Changes for the slashing release. 🧪 Test Test-related changes (unit, integration, etc.). labels Mar 1, 2025
@ypatil12 ypatil12 force-pushed the yash/additional-bc-state-validation branch from e15dccc to 75338ce Compare March 3, 2025 23:56
Copy link
Copy Markdown
Collaborator

@nadir-akhtar nadir-akhtar left a comment

Choose a reason for hiding this comment

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

LGTM, with one minor suggestion

@ypatil12 ypatil12 merged commit ea7bb82 into test/slashing-integration-testing Mar 4, 2025
10 checks passed
@ypatil12 ypatil12 deleted the yash/additional-bc-state-validation branch March 4, 2025 14:14
ypatil12 added a commit that referenced this pull request Mar 5, 2025
**Motivation:**

Additional tests on beacon chain slashing

**Modifications:**

Full slash tests:

- [x] testFuzz_proveValidator_checkpoint_queue_completeAsTokens
- [x] test_fullSlash_Revert_Redeposit
- [x] testFuzz_fullSlash_registerStakerAsOperator_Revert_Redeposit
- [x]
testFuzz_fullSlash_registerStakerAsOperator_delegate_undelegate_completeAsShares

Partial Slash Tests:

- [x] testFuzz_redeposit_queue_completeAsTokens
- [x] testFuzz_redeposit_queue_completeAsShares

Additionally:
- Updated `_getExpectedTokenBalances` to factor in gwei rounding down
for EigenPods
- Updated `queuedWithdrawal` check when delegated or undelegated 
- Got rid of unnecessary checkpointing in `SlashedEigenPod.t.sol`

**Result:**

All single beacon chain slashing state validation complete.
ypatil12 added a commit that referenced this pull request Mar 5, 2025
**Motivation:**

Additional tests on beacon chain slashing

**Modifications:**

Full slash tests:

- [x] testFuzz_proveValidator_checkpoint_queue_completeAsTokens
- [x] test_fullSlash_Revert_Redeposit
- [x] testFuzz_fullSlash_registerStakerAsOperator_Revert_Redeposit
- [x]
testFuzz_fullSlash_registerStakerAsOperator_delegate_undelegate_completeAsShares

Partial Slash Tests:

- [x] testFuzz_redeposit_queue_completeAsTokens
- [x] testFuzz_redeposit_queue_completeAsShares

Additionally:
- Updated `_getExpectedTokenBalances` to factor in gwei rounding down
for EigenPods
- Updated `queuedWithdrawal` check when delegated or undelegated 
- Got rid of unnecessary checkpointing in `SlashedEigenPod.t.sol`

**Result:**

All single beacon chain slashing state validation complete.
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