Skip to content

Commit 5afe0e4

Browse files
committed
Merge branch 'ssv-staking' into feature/fuzz-tests
2 parents 8711e62 + 85f74dd commit 5afe0e4

30 files changed

Lines changed: 3339 additions & 280 deletions

.github/workflows/echidna.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,9 @@ jobs:
6767
with:
6868
files: test/echidna/${{ matrix.contract }}.sol
6969
contract: ${{ matrix.contract }}
70-
config: test/echidna/echidna.yaml
70+
config: test/echidna/echidna-ci.yaml
7171
crytic-args: --compile-force-framework foundry
7272
test-mode: property
73-
test-limit: 50000
7473

7574
- name: Upload corpus
7675
uses: actions/upload-artifact@v4

contracts/libraries/OperatorLib.sol

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -360,26 +360,25 @@ library OperatorLib {
360360
}
361361
cumulativeIndexSSV += operator.snapshot.index;
362362

363-
if (operator.snapshot.block == 0 && operator.ethSnapshot.block == 0) {
364-
continue;
365-
}
366-
if (operator.ethSnapshot.block == 0) {
367-
// first-time ETH usage or migration
368-
ensureETHDefaults(operator, operatorId);
369-
370-
} else {
371-
// already ETH operator
372-
updateSnapshotSt(operator, operatorId);
363+
// Removed operators (both blocks == 0) contribute their frozen index
364+
// but are not mutated (no validator count or fee changes)
365+
if (operator.snapshot.block != 0 || operator.ethSnapshot.block != 0) {
366+
if (operator.ethSnapshot.block == 0) {
367+
// first-time ETH usage or migration
368+
ensureETHDefaults(operator, operatorId);
369+
} else {
370+
// already ETH operator
371+
updateSnapshotSt(operator, operatorId);
372+
}
373373

374-
cumulativeIndexETH += operator.ethSnapshot.index;
375-
}
374+
// update ETH validator count for both new ETH-initialized and existing ETH-initialized operators
375+
if ((operator.ethValidatorCount += validatorCount) > sp.validatorsPerOperatorLimit) {
376+
revert ISSVNetworkCore.ExceedValidatorLimitWithData(operatorId);
377+
}
376378

377-
// update ETH validator count for both new ETH-initialized and existing ETH-initialized operators
378-
if ((operator.ethValidatorCount += validatorCount) > sp.validatorsPerOperatorLimit) {
379-
revert ISSVNetworkCore.ExceedValidatorLimitWithData(operatorId);
379+
cumulativeFeeETH += PackedETH.unwrap(operator.ethFee);
380380
}
381-
382-
cumulativeFeeETH += PackedETH.unwrap(operator.ethFee);
381+
cumulativeIndexETH += operator.ethSnapshot.index;
383382
}
384383
}
385384

contracts/modules/SSVOperators.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ contract SSVOperators is ISSVOperators, SSVReentrancyGuard {
161161
revert ApprovalNotWithinTimeframe();
162162
}
163163

164-
if (PackedETH.wrap(feeChangeRequest.fee).gt(SSVStorageProtocol.load().operatorMaxFee)) revert FeeTooHigh();
164+
StorageProtocol storage sp = SSVStorageProtocol.load();
165+
if (PackedETH.wrap(feeChangeRequest.fee).gt(sp.operatorMaxFee)) revert FeeTooHigh();
166+
if (feeChangeRequest.fee != 0 && feeChangeRequest.fee < PackedETH.unwrap(sp.minimumOperatorEthFee)) revert FeeTooLow();
165167

166168
Operator storage operator = s.operators[operatorId];
167169
OperatorLib.updateSnapshotSt(operator, operatorId);

deployments/hoodi-prod/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"ssvToken": "0x9F5d4Ec84fC4785788aB44F9de973cF34F7A038e",
99
"cssvToken": "0x6e1a5d27361c666f681af06535c8Ac773E571d4d",
1010
"cooldownDuration": 604800,
11-
"upgradeTimestamp": 2219200,
11+
"upgradeTimestamp": 1771497638,
1212
"quorumBps": 7500,
1313
"defaultOracleIds": [1, 2, 3, 4],
1414
"protocolParams": {
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"deployer": "0xC564AF154621Ee8D0589758d535511aEc8f67b40",
3+
"chainId": "560048",
4+
"network": "hoodi",
5+
"deployedAt": "2026-03-17T12:18:01.926Z",
6+
"blockNumber": 2434756,
7+
"implementations": {
8+
"SSVNetworkSSVStakingUpgrade": "0x80Be9D66831Ab6a40f16c10f78a81e6CDfB15057",
9+
"SSVNetworkViews": "0xf70E9396a801BabDfe972D74ECce9716f164335b"
10+
},
11+
"cssvToken": {
12+
"address": "0x6e1a5d27361c666f681af06535c8Ac773E571d4d",
13+
"deployed": false
14+
},
15+
"modules": {
16+
"SSVOperators": "0x9Be8F85b316A5E5AF4a30Ac30a364A2BD781554B",
17+
"SSVClusters": "0x0A37b36c6a9602Fe56c77EebFa6DF3878Fa249ff",
18+
"SSVDAO": "0xf0d4336AF410E0d3F8a96b760AC25aBCDBe3f3FC",
19+
"SSVViews": "0xAbc3b496Cf75b2eF09c143C7aE5fB7D9E33AB378",
20+
"SSVOperatorsWhitelist": "0x0a1d8027288ddfaC07e306f7d16C99c87855DB45",
21+
"SSVStaking": "0x23E23C65E8Ce7D1B913cAe197506A419E4944f29",
22+
"SSVValidators": "0xD82C35e8C647CB467b968E5854d37800190e8199"
23+
}
24+
}

deployments/hoodi-prod/deploy-result.v2.0.0.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
"deployed": false
1414
},
1515
"modules": {
16-
"SSVOperators": "0x9Be8F85b316A5E5AF4a30Ac30a364A2BD781554B",
17-
"SSVClusters": "0x0A37b36c6a9602Fe56c77EebFa6DF3878Fa249ff",
18-
"SSVDAO": "0xf0d4336AF410E0d3F8a96b760AC25aBCDBe3f3FC",
19-
"SSVViews": "0xAbc3b496Cf75b2eF09c143C7aE5fB7D9E33AB378",
20-
"SSVOperatorsWhitelist": "0x0a1d8027288ddfaC07e306f7d16C99c87855DB45",
21-
"SSVStaking": "0x23E23C65E8Ce7D1B913cAe197506A419E4944f29",
22-
"SSVValidators": "0xD82C35e8C647CB467b968E5854d37800190e8199"
16+
"SSVOperators": "0x3437257DcC8c6C0697c5f204DD0F93DcdFfD6A4d",
17+
"SSVClusters": "0x983eaE89444e543A8CBE439379cB5C5c0e04666A",
18+
"SSVDAO": "0xb1885a27A0E44e6baF9298390cd798133B8D8961",
19+
"SSVViews": "0xb7EbBd80Bf2f2722FE893dEFcF228CfC235c7421",
20+
"SSVOperatorsWhitelist": "0x28A41FC0E7Fcbb7B26590321E2bC91cBe2f2d47d",
21+
"SSVStaking": "0xc72C04fE3B813d37Fb0adc7A8A48710315c876B8",
22+
"SSVValidators": "0x432dAe087e4Bb4eB4835C2d84b3c66C7b64E6e45"
2323
}
2424
}

deployments/hoodi-stage/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"ssvToken": "0x746C33ccC28b1363c35c09baDAF41b2FFa7E6D56",
99
"cssvToken": "0x6455a0d83FeB099182Fb6D024B9Ae0c2E26C0859",
1010
"cooldownDuration": 604800,
11-
"upgradeTimestamp": 2389830,
11+
"upgradeTimestamp": 1773141056,
1212
"quorumBps": 7500,
1313
"defaultOracleIds": [1, 2, 3, 4],
1414
"protocolParams": {
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"deployer": "0xC564AF154621Ee8D0589758d535511aEc8f67b40",
3+
"chainId": "560048",
4+
"network": "hoodi",
5+
"deployedAt": "2026-03-17T10:15:01.803Z",
6+
"blockNumber": 2434222,
7+
"implementations": {
8+
"SSVNetworkSSVStakingUpgrade": "0x6749B3Ade59FbA80f4e5c4066A993181843E1c00",
9+
"SSVNetworkViews": "0x4c6f92E6d13748a83E96dF2AA5D3839a9Ed2b607"
10+
},
11+
"cssvToken": {
12+
"address": "0x6455a0d83FeB099182Fb6D024B9Ae0c2E26C0859",
13+
"deployed": false
14+
},
15+
"modules": {
16+
"SSVOperators": "0xD239f43d942F30F415F6e47fDE0603cdC60Ee7C8",
17+
"SSVClusters": "0xc25333db38d687a70B136286273A04815cDAe5A6",
18+
"SSVDAO": "0x824e169e138B3B91977e040F80547Fce3779db97",
19+
"SSVViews": "0xae12ceCA94a14aAC6c15A473FAAD9Cb75B2be53A",
20+
"SSVOperatorsWhitelist": "0x5734A479F463e3DddDBB8fFC2C82253d41777BbC",
21+
"SSVStaking": "0x99f2B313BD913d6E11E91BA7B3c5B51c4E486bE5",
22+
"SSVValidators": "0x57aE505496ED7BF377A28bb645d4242CC5c74330"
23+
}
24+
}

deployments/hoodi-stage/deploy-result.v2.0.0.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"deployed": false
1414
},
1515
"modules": {
16-
"SSVOperators": "0xD239f43d942F30F415F6e47fDE0603cdC60Ee7C8",
16+
"SSVOperators": "0x4a4972222E277794E697759Da629B9dB21b19246",
1717
"SSVClusters": "0xc25333db38d687a70B136286273A04815cDAe5A6",
1818
"SSVDAO": "0x824e169e138B3B91977e040F80547Fce3779db97",
1919
"SSVViews": "0xae12ceCA94a14aAC6c15A473FAAD9Cb75B2be53A",

0 commit comments

Comments
 (0)