Skip to content

Commit

Permalink
Merge pull request #292 from lidofinance/feat/sr-1.5
Browse files Browse the repository at this point in the history
Feat/sr 1.5
  • Loading branch information
eddort authored Aug 16, 2024
2 parents 189f545 + d4b6a30 commit dfd20c0
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 114 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ To view the list of alerts in Prometheus, visit http://localhost:9090/alerts. Fo

## Update CSM module ABI

Clone CSM repo

```sh
git clone https://github.com/lidofinance/community-staking-module
cd community-staking-module
```

Execute the command in the CSM module repository

```sh
Expand Down
1 change: 0 additions & 1 deletion src/common/registry-csm/fetch/key-batch.fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export class RegistryKeyBatchFetchService {
index,
key: key,
depositSignature: signatures[chunkIndex],
// TODO: write test
used: index < usedKeysCount,
moduleAddress,
};
Expand Down
3 changes: 0 additions & 3 deletions src/common/registry-csm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,3 @@ export * from './fetch/operator.fetch';

export * from './main/key-registry/key-registry.service';
export * from './main/key-registry/key-registry.module';

export * from './main/validator-registry/validator-registry.service';
export * from './main/validator-registry/validator-registry.module';

This file was deleted.

This file was deleted.

134 changes: 94 additions & 40 deletions src/staking-router-modules/contracts/abi/IStakingModule.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
[
{
"anonymous": false,
"inputs": [{ "indexed": false, "internalType": "uint256", "name": "nonce", "type": "uint256" }],
"name": "NonceChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{ "indexed": true, "internalType": "uint256", "name": "nodeOperatorId", "type": "uint256" },
{ "indexed": false, "internalType": "uint256", "name": "trimmedKeysCount", "type": "uint256" }
{ "indexed": false, "internalType": "bytes", "name": "pubkey", "type": "bytes" }
],
"name": "UnusedValidatorsKeysTrimmed",
"name": "SigningKeyAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [{ "indexed": false, "internalType": "uint256", "name": "validatorsKeysNonce", "type": "uint256" }],
"name": "ValidatorsKeysNonceChanged",
"inputs": [
{ "indexed": true, "internalType": "uint256", "name": "nodeOperatorId", "type": "uint256" },
{ "indexed": false, "internalType": "bytes", "name": "pubkey", "type": "bytes" }
],
"name": "SigningKeyRemoved",
"type": "event"
},
{
"inputs": [],
"name": "finishUpdatingExitedValidatorsKeysCount",
"inputs": [
{ "internalType": "bytes", "name": "_nodeOperatorIds", "type": "bytes" },
{ "internalType": "bytes", "name": "_vettedSigningKeysCounts", "type": "bytes" }
],
"name": "decreaseVettedSigningKeysCount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
Expand All @@ -28,6 +40,16 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "uint256", "name": "_offset", "type": "uint256" },
{ "internalType": "uint256", "name": "_limit", "type": "uint256" }
],
"name": "getNodeOperatorIds",
"outputs": [{ "internalType": "uint256[]", "name": "nodeOperatorIds", "type": "uint256[]" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "uint256", "name": "_nodeOperatorId", "type": "uint256" }],
"name": "getNodeOperatorIsActive",
Expand All @@ -36,103 +58,135 @@
"type": "function"
},
{
"inputs": [],
"name": "getNodeOperatorsCount",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"inputs": [{ "internalType": "uint256", "name": "_nodeOperatorId", "type": "uint256" }],
"name": "getNodeOperatorSummary",
"outputs": [
{ "internalType": "uint256", "name": "targetLimitMode", "type": "uint256" },
{ "internalType": "uint256", "name": "targetValidatorsCount", "type": "uint256" },
{ "internalType": "uint256", "name": "stuckValidatorsCount", "type": "uint256" },
{ "internalType": "uint256", "name": "refundedValidatorsCount", "type": "uint256" },
{ "internalType": "uint256", "name": "stuckPenaltyEndTimestamp", "type": "uint256" },
{ "internalType": "uint256", "name": "totalExitedValidators", "type": "uint256" },
{ "internalType": "uint256", "name": "totalDepositedValidators", "type": "uint256" },
{ "internalType": "uint256", "name": "depositableValidatorsCount", "type": "uint256" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getType",
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
"name": "getNodeOperatorsCount",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getValidatorsKeysNonce",
"name": "getNonce",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "uint256", "name": "_nodeOperatorId", "type": "uint256" }],
"name": "getValidatorsKeysStats",
"inputs": [],
"name": "getStakingModuleSummary",
"outputs": [
{ "internalType": "uint256", "name": "exitedValidatorsCount", "type": "uint256" },
{ "internalType": "uint256", "name": "activeValidatorsKeysCount", "type": "uint256" },
{ "internalType": "uint256", "name": "readyToDepositValidatorsKeysCount", "type": "uint256" }
{ "internalType": "uint256", "name": "totalExitedValidators", "type": "uint256" },
{ "internalType": "uint256", "name": "totalDepositedValidators", "type": "uint256" },
{ "internalType": "uint256", "name": "depositableValidatorsCount", "type": "uint256" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getValidatorsKeysStats",
"name": "getType",
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "uint256", "name": "_depositsCount", "type": "uint256" },
{ "internalType": "bytes", "name": "_depositCalldata", "type": "bytes" }
],
"name": "obtainDepositData",
"outputs": [
{ "internalType": "uint256", "name": "exitedValidatorsCount", "type": "uint256" },
{ "internalType": "uint256", "name": "activeValidatorsKeysCount", "type": "uint256" },
{ "internalType": "uint256", "name": "readyToDepositValidatorsKeysCount", "type": "uint256" }
{ "internalType": "bytes", "name": "publicKeys", "type": "bytes" },
{ "internalType": "bytes", "name": "signatures", "type": "bytes" }
],
"stateMutability": "view",
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "onExitedAndStuckValidatorsCountsUpdated",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [{ "internalType": "uint256", "name": "_totalShares", "type": "uint256" }],
"name": "handleRewardsMinted",
"name": "onRewardsMinted",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "invalidateReadyToDepositKeys",
"name": "onWithdrawalCredentialsChanged",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "uint256", "name": "_keysCount", "type": "uint256" },
{ "internalType": "bytes", "name": "_calldata", "type": "bytes" }
{ "internalType": "uint256", "name": "_nodeOperatorId", "type": "uint256" },
{ "internalType": "uint256", "name": "_exitedValidatorsCount", "type": "uint256" },
{ "internalType": "uint256", "name": "_stuckValidatorsCount", "type": "uint256" }
],
"name": "requestValidatorsKeysForDeposits",
"outputs": [
{ "internalType": "uint256", "name": "returnedKeysCount", "type": "uint256" },
{ "internalType": "bytes", "name": "publicKeys", "type": "bytes" },
{ "internalType": "bytes", "name": "signatures", "type": "bytes" }
"name": "unsafeUpdateValidatorsCount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "bytes", "name": "_nodeOperatorIds", "type": "bytes" },
{ "internalType": "bytes", "name": "_exitedValidatorsCounts", "type": "bytes" }
],
"name": "updateExitedValidatorsCount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "uint256", "name": "_nodeOperatorId", "type": "uint256" },
{ "internalType": "uint256", "name": "_exitedValidatorsKeysCount", "type": "uint256" },
{ "internalType": "uint256", "name": "_stuckValidatorsKeysCount", "type": "uint256" }
{ "internalType": "uint256", "name": "_refundedValidatorsCount", "type": "uint256" }
],
"name": "unsafeUpdateValidatorsKeysCount",
"name": "updateRefundedValidatorsCount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "uint256", "name": "_nodeOperatorId", "type": "uint256" },
{ "internalType": "uint256", "name": "_exitedValidatorKeysCount", "type": "uint256" }
{ "internalType": "bytes", "name": "_nodeOperatorIds", "type": "bytes" },
{ "internalType": "bytes", "name": "_stuckValidatorsCounts", "type": "bytes" }
],
"name": "updateExitedValidatorsKeysCount",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"name": "updateStuckValidatorsCount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "uint256", "name": "_nodeOperatorId", "type": "uint256" },
{ "internalType": "uint256", "name": "_stuckValidatorKeysCount", "type": "uint256" }
{ "internalType": "uint256", "name": "_targetLimitMode", "type": "uint256" },
{ "internalType": "uint256", "name": "_targetLimit", "type": "uint256" }
],
"name": "updateStuckValidatorsKeysCount",
"name": "updateTargetValidatorsLimits",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
Expand Down

0 comments on commit dfd20c0

Please sign in to comment.