-
Notifications
You must be signed in to change notification settings - Fork 458
Unit tests review for validators module (LIP 0044) #8115
Comments
setValidatorBLSKey
The test description
The test cases explicitly test for a validation error to be thrown to be thorough. setValidatorGeneratorKey
The test cases explicitly test for a validation error to be thrown to be thorough. getValidatorKeys
This has been updated in a previous commit. |
My interpretation of the scenario was that the BLS key is used already by another account, and therefore it should fail. But if this test is about the scenario that this account uses the provided BLS key, then it is correct. But then I would say another test is needed for the scenario I described. |
The code logic throws and logs duplicate event, if an entry already exists in the BLSKeyStore regardless of the address stored against the BLS key, and the test case covers the general scenario of existing BLS key, specifically testing the clause. |
The tests in this folder were reviewed.
Endpoints
validateBLSKey
false
due to invalid proof of possession and not because the key exists alreadyMethods
registerValidatorKeys
setValidatorBLSKey
setValidatorBLSKey
is called for this account. In contrast to an old version of the LIP, this should NOT fail.setValidatorGeneratorKey
getGeneratorsBetweenTimestamps
timePerRound + 2 * blockTime
.timePerRound * 2 + 2 * blockTime
.startSlotNumber
andendSlotNumber
startTimestamp = 99 * blockTime
endTimestamp = 103 * blockTime
generatorList[99]
,generatorList[100]
andgeneratorList[0]
with count 1 for each entrygetValidatorKeys
registerValidatorWithoutBLSKey
setValidatorAccount.blsKey
equalsINVALID_BLS_KEY
setValidatorParams
There are no tests yet for this function. It should at least be tested that
The text was updated successfully, but these errors were encountered: