-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: remove/deprecate delegation parameters cooldown #866
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #866 +/- ##
==========================================
- Coverage 92.60% 92.57% -0.04%
==========================================
Files 47 47
Lines 2368 2357 -11
Branches 432 430 -2
==========================================
- Hits 2193 2182 -11
Misses 175 175
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
* @param _delegationRatio Delegation capacity multiplier (e.g. 10 means 10x the indexer stake) | ||
* @param _delegationTaxPercentage Percentage of delegated tokens to burn as delegation tax, expressed in parts per million | ||
*/ | ||
function initialize( | ||
uint32 _delegationUnbondingPeriod, | ||
uint32 _cooldownBlocks, | ||
uint32, //_cooldownBlocks, deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to keep this? I understand doing it for setDelegationParameters
so we don't change the interface but I think we can entirely remove it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, but I'd rather keep it to keep changes minimal (this is called from Staking.initialize, so we'd have to change that too)
contracts/staking/StakingStorage.sol
Outdated
/// @dev Time in blocks an indexer needs to wait to change delegation parameters | ||
uint32 internal __delegationParametersCooldown; | ||
/// @dev Time in blocks an indexer needs to wait to change delegation parameters (deprecated) | ||
uint32 internal __DEPRECATED_delegationParametersCooldown; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should pick one way of signaling deprecated variables. We have __DEPRECATED__
or ...Deprecated
all over the codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed all of them to use the __DEPRECATED_
prefix, wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits
Also we need to remove this: contracts/cli/commands/protocol/set.ts Lines 17 to 20 in 59240bd
|
feat: remove/deprecate delegation parameters cooldown
🚨 Vulnerabilities Summary
For more details view the full report in OpenZeppelin Code |
GIP: https://github.com/graphprotocol/graph-improvement-proposals/pull/32/files