Allow initial deposits to activate validators#2885
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2885 +/- ##
==========================================
+ Coverage 41.39% 42.12% +0.73%
==========================================
Files 115 111 -4
Lines 4948 4883 -65
Branches 1372 1356 -16
==========================================
+ Hits 2048 2057 +9
+ Misses 2897 2823 -74
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
sparrowDom
left a comment
There was a problem hiding this comment.
Looks good. There is one thing in the tests where comments don't align with code. Also I think it would be cool, that both compounding staking strategy contract setups are tested: when initial deposit is configured to 1 ETH / 32.24 ETH.
| it("Should stake to a validator: 1 ETH", async () => { | ||
| await stakeValidators(0, 1); | ||
| it("Should stake to a validator: 32.25 ETH", async () => { | ||
| await stakeValidators(0, INITIAL_DEPOSIT_AMOUNT); |
There was a problem hiding this comment.
Multiple places in the test files comments state that 32.25 ETH has been deposited while using a constant INITIAL_DEPOSIT_AMOUNT which is set to 1 ETH.
There was a problem hiding this comment.
Good spot. I've fixed with commit e2fbec6
|
I think we should have a couple of tests where we try to deposit |
Changes
While the Ethereum validator deposit queue is long (> 20 days), doing two deposits to get an active validator is too long. This change allows the governor to set the initial deposit to 32.25 ETH which will allow a validator to become active from just one deposit.
Once the deposit queue gets down to a more reasonable length, eg < 10 days, the initial deposit can be changed back to 1 ETH via a governance proposal.
Code Change Checklist
To be completed before internal review begins:
Internal review: