slashing: revert timestamps delegation #861
Merged
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.
Decided on keeping
struct Withdrawal
as using blocknumbers as opposed to converting to timestamps.However because the delay is going to change in the upcoming release to align with DEALLOCATION_DELAY in the AllocationManager, the withdrawal startBlock will need to be checked against the blocknumber of the Slashing upgrade. See
getCompletableTimestamp()
for details.All legacy withdrawals queued prior to the upgrade will actually have their withdrawal delay extended by however long the new withdrawal delay period (17.5 day delay so extended by 10.5 days). Thus removing any branching logic for handling withdrawals and their timestamps.
Additionally,
minWithdrawalDelayBlocks
will still be deprecated as having this lie in storage with a setter function is not practical. Any changes to this delay will require deeper consideration and likely an upgrade to the AllocationManager. Using the constantMIN_WITHDRAWAL_DELAY_BLOCKS
for post-slashing queue withdrawals seems most reasonable here.