fix(BUG-8): clarify cooldownDuration units as seconds in NatSpec#433
Open
mtabasco wants to merge 2 commits intossv-stakingfrom
Open
fix(BUG-8): clarify cooldownDuration units as seconds in NatSpec#433mtabasco wants to merge 2 commits intossv-stakingfrom
mtabasco wants to merge 2 commits intossv-stakingfrom
Conversation
BUG-8: Cooldown duration uses block.timestamp but DIP specifies blocks. The implementation correctly uses block.timestamp (seconds) for cooldown calculations in SSVStaking.requestUnstake() and calculateTotalUnfrozenBalance(). The deploy config already sets 604800 (7 days in seconds). However, the NatSpec documentation was ambiguous about the unit, risking future misconfiguration. Changes: - ISSVDAO.sol: Add 'in seconds' to CooldownDurationUpdated event and setUnstakeCooldownDuration function NatSpec - SSVStorageStaking.sol: Add NatSpec comment documenting cooldownDuration field is in seconds - SSVNetworkSSVStakingUpgrade.sol: Add NatSpec to initializeSSVStaking documenting cooldownDuration param is in seconds (e.g. 604800 for 7 days) - requestUnstake.test.ts: Add BUG-8 regression test verifying unlockTime is derived from block.timestamp (not block.number) No logic, ABI, or storage layout changes. NatSpec-only + regression test.
Gas Usage ReportCommit: Exceeded Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BUG-8: Cooldown duration uses block.timestamp but DIP specifies blocks.
The implementation correctly uses block.timestamp (seconds) for cooldown calculations in SSVStaking.requestUnstake() and calculateTotalUnfrozenBalance(). The deploy config already sets 604800 (7 days in seconds). However, the NatSpec documentation was ambiguous about the unit, risking future misconfiguration.
Changes:
No logic, ABI, or storage layout changes. NatSpec-only + regression test.