Skip to content
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

slashing: revert timestamps delegation #861

Merged
merged 2 commits into from
Oct 30, 2024

Conversation

8sunyuan
Copy link
Collaborator

@8sunyuan 8sunyuan commented Oct 29, 2024

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 constant MIN_WITHDRAWAL_DELAY_BLOCKS for post-slashing queue withdrawals seems most reasonable here.

Copy link
Collaborator

@ypatil12 ypatil12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

Reading tracefile ./lcov.info.pruned
                                        |Lines       |Functions  |Branches    
Filename                                  |Rate     Num|Rate    Num|Rate     Num
================================================================================
[src/contracts/]
core/AVSDirectory.sol                     |96.4%    112|93.8%    32|    -      0
core/AllocationManager.sol                |88.9%    153|85.7%    21|    -      0
core/DelegationManager.sol                |93.0%    186|86.5%    37|    -      0
core/RewardsCoordinator.sol               |94.3%    123|87.1%    31|    -      0
core/StrategyManager.sol                  |97.0%     67|90.9%    22|    -      0
libraries/BeaconChainProofs.sol           | 100%     22| 100%    11|    -      0
libraries/BytesLib.sol                    | 0.0%    156| 0.0%    14|    -      0
libraries/Endian.sol                      | 100%      2| 100%     1|    -      0
libraries/Merkle.sol                      | 100%     38| 100%     5|    -      0
libraries/SlashingLib.sol                 | 100%     19| 100%    12|    -      0
libraries/Snapshots.sol                   |88.0%     25|85.7%     7|    -      0
mixins/SignatureUtils.sol                 | 100%      6| 100%     5|    -      0
permissions/Pausable.sol                  |95.7%     23|90.9%    11|    -      0
permissions/PauserRegistry.sol            | 100%     12| 100%     6|    -      0
pods/EigenPod.sol                         | 100%    130|96.2%    26|    -      0
pods/EigenPodManager.sol                  | 100%     68|93.3%    15|    -      0
strategies/EigenStrategy.sol              | 0.0%     10| 0.0%     5|    -      0
strategies/StrategyBase.sol               |90.9%     44|78.9%    19|    -      0
strategies/StrategyBaseTVLLimits.sol      | 100%     12| 100%     6|    -      0
strategies/StrategyFactory.sol            | 100%     32| 100%     8|    -      0
token/BackingEigen.sol                    |83.3%     30|69.2%    13|    -      0
token/Eigen.sol                           |45.0%     40|61.5%    13|    -      0
================================================================================
                                  Total:|81.4%   1310|83.8%   320|    -      0

@8sunyuan 8sunyuan merged commit 385dc53 into slashing-magnitudes Oct 30, 2024
10 of 11 checks passed
@8sunyuan 8sunyuan deleted the revert-timestamps-delegation branch October 30, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants