TEST-4 enrich tests#463
Merged
mtabasco merged 2 commits intofix/test-update-cluster-balance-on-liquidated-clustersfrom Feb 25, 2026
Merged
TEST-4 enrich tests#463mtabasco merged 2 commits intofix/test-update-cluster-balance-on-liquidated-clustersfrom
mtabasco merged 2 commits intofix/test-update-cluster-balance-on-liquidated-clustersfrom
Conversation
mtabasco
commented
Feb 25, 2026
|
|
||
| return { | ||
| cluster, validatorKey, operatorIds | ||
| cluster, validatorKey, operatorIds, receiptRegister |
Contributor
Author
There was a problem hiding this comment.
@yurii-ssv do you think adding tx receipt here is useful? I only use it to get the block number in one test...
There was a problem hiding this comment.
Yes, why not. Can be very helpful when we will start addressing #435
Gas Usage ReportCommit: All operations are within gas limits. |
yurii-ssv
approved these changes
Feb 25, 2026
98936b7
into
fix/test-update-cluster-balance-on-liquidated-clusters
7 checks passed
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.
Before (Integration Tests):
❌ Used greaterThan, lessThan, greaterThanOrEqual (11 violations)
❌ Used "tolerance" pattern allowing 100 wei rounding error
❌ Didn't track block numbers for precise calculations
After (Integration Tests):
✅ All assertions use exact .to.equal() with calculated expected values
✅ Block numbers tracked precisely for fee calculations
✅ Every balance assertion references SPEC.md formulas
Added 3 New Edge Case Tests:
File: test/unit/SSVClusters/updateClusterBalance.test.ts
Test 1: Multi-Validator Liquidated Cluster (Lines 463-527)
Test 2: EB Decrease on Liquidated Cluster (Lines 529-602)
Test 3: Implicit→Explicit EB Transition (Lines 604-653)