lip | title | status | author | discussions-to | created | updated |
---|---|---|---|---|---|---|
8 |
Increase keysOpIndex in assignNextSigningKeys |
Implemented |
George Avsetsin, Artyom Veremeenko |
2022-01-24 |
2022-06-06 |
We propose to call _increaseKeysOpIndex
if the number of used keys has changed during the call of assignNextSigningKeys
(contract NodeOperatorsRegistry
).
Calling assignNextSigningKeys
method changes the "usedSigningKeys" properties of operators, which is responsible for the number of used and unsigned keys. By explicitly calling _increaseKeysOpIndex
we can add an intrusive indicator for the off-chain listeners.
With current protocol implementation keysOpIndex
counter is not incremented when a deposit happens. Thus it's difficult to track used keys with off-chain monitoring services. We need an ad-hoc loop to manually refresh used keys which looks like a suboptimal workaround.
Add calls to _increaseKeysOpIndex()
at the two execution branches if returned assigned keys number is non-zero.
The proposed change will slightly increase gas cost of depositBufferedEther
call for Depositor Bot. An additional call of _increaseKeysOpIndex()
costs ~7000 gas and does not depend on number of deposits. Relative cost increment depends on amount of transaction. For example for a typical transaction with 38 deposits the gas cost will increase by ~0.3% (total cost depends on the amount of 32ETH deposits done).
The chain of calls is:
DepositSecurityModule::depositBufferedEther
Lido::depositBufferedEther() auth(DEPOSIT_ROLE)
NodeOperatorsRegistry::assignNextSigningKeys()
Depositor Bot is run by Lido dev team (see LIP-5) thus the additional price would be paid by Lido DAO.
The proposed change in NodeOperatorsRegistry
contract can be found in PR linked to this issues.