Closed naddison36 closed 1 month ago
Warnings | |
---|---|
:warning: | :eyes: This PR needs at least 2 reviewers |
Generated by :no_entry_sign: dangerJS against ff0fae33ebc40819c1ee122a036c17ed814ea979
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 63.00%. Comparing base (
8748170
) to head (ff0fae3
). Report is 1 commits behind head on sparrowDom/nativeStaking.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
LGTM
There are some unit tests that were confirming that stake threshold amounts work correctly. I think those are missing the assertions confirming
VALIDATOR_STATE
for the pubkey has the correct value. We could also add those in
I've added assertions confirming validatorsStates
for the pubkey has the correct value in the unit and fork tests
Generated at commit: ff0fae33ebc40819c1ee122a036c17ed814ea979
🚨 Report Summary
Severity Level Results Contracts Critical High Medium Low Note Total 3 3 0 18 42 66 Dependencies Critical High Medium Low Note Total 0 0 0 0 0 0
For more details view the full report in OpenZeppelin Code Inspector
Contract Changes
NON_REGISTERED
as the default value in theVALIDATOR_STATE
enum.Issue
In Solidity, an enum variable is automatically set to its first enumerated value if it is initialized without specifying a particular value. In
ValidatorRegistrator.sol
,REGISTERED
is the default value of theVALIDATOR_STATE
enum, meaning that it is possible to stake with any address even ifregisterSsvValidator
were not called. Since the address would not be registered as a validator in the SSV Network, it would not perform validations correctly which could result in funds being lost due to slashing.