You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
RegisterAuthorityParams fields are ordered differently than in the LIP:
The generatorKey and proofOfPossession fields are swapped. This could potentially cause schema matching problems if JSON serialization is done in the wrong order. However, we did not find any security problems related to this issue.
commands, the code calls validator.validate to validate the commands parameters. Calling validator.validate on a command's verify function is unnecessary because this check is already done in the state machine logic.
Array ordering is checked manually when a helper function could be used:
In the PoAModule.initGenesisState function, there is a check for whether the validatorAddresses list is sorted, by comparing each of its elements against the corresponding element in [...validatorAddresses].sort(). Instead, the objectUtils.isBufferArrayOrdered helper function should be used. The same applies to the check done later in the function on the activeValidators list: objectUtils.isBufferArrayOrdered(activeValidatorAddresses) should be used.
The shuffleValidatorList function is defined both in PoA and PoS:
Both do essentially the same thing, but are implemented in slightly different ways. Ideally a common implementation should be used by both.
Steps to reproduce
N/A
Which version(s) does this affect? (Environment, OS, etc...)
6.1.0-beta.1
The text was updated successfully, but these errors were encountered:
Description
RegisterAuthorityParams fields are ordered differently than in the LIP:
The generatorKey and proofOfPossession fields are swapped. This could potentially cause schema matching problems if JSON serialization is done in the wrong order. However, we did not find any security problems related to this issue.
Unnecessary calls to validator.validate:
In the PoA module’s register authority and [update generator key](https://github.com/LiskHQ/lisk-sdk/blob/ed5649eb954c7c47e11eb2d2ea2b84b9336c4c4b/framework/src/modules/poa/commands/update_generator_key.ts#L4
Array ordering is checked manually when a helper function could be used:
In the PoAModule.initGenesisState function, there is a check for whether the validatorAddresses list is sorted, by comparing each of its elements against the corresponding element in [...validatorAddresses].sort(). Instead, the objectUtils.isBufferArrayOrdered helper function should be used. The same applies to the check done later in the function on the activeValidators list: objectUtils.isBufferArrayOrdered(activeValidatorAddresses) should be used.
The shuffleValidatorList function is defined both in PoA and PoS:
Both do essentially the same thing, but are implemented in slightly different ways. Ideally a common implementation should be used by both.
Steps to reproduce
N/A
Which version(s) does this affect? (Environment, OS, etc...)
6.1.0-beta.1
The text was updated successfully, but these errors were encountered: