-
Notifications
You must be signed in to change notification settings - Fork 431
test: redistribution upgrade #1410
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
Merged
ypatil12
merged 9 commits into
release-dev/redistribution
from
feat/redistibution-upgrade-test
May 30, 2025
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e46d6d0
fix: enumerable map ovewrite
ypatil12 75b6346
chore: format
ypatil12 fd85015
chore: address rebase issues
ypatil12 58d73a9
chore: format
ypatil12 d64db22
chore: naming
ypatil12 15a2bce
chore: update addy
ypatil12 8607b10
chore: remove stale upgrade test
ypatil12 b61826f
chore: fmt
ypatil12 5feaafb
chore: remove file
ypatil12 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
52 changes: 52 additions & 0 deletions
52
src/test/integration/deprecatedInterfaces/mainnet/IAllocationManager.sol
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
pragma solidity ^0.8.27; | ||
|
||
import "src/contracts/interfaces/IStrategy.sol"; | ||
|
||
/** | ||
* @notice Interface of the allocationManager prior to redistribution. | ||
* @dev The interface remains the exact same, except `SlashOperator` does not return the slashID or shares | ||
* @dev This interface is the minimal possibl interface needed for the redistribution upgrade test | ||
*/ | ||
interface IAllocationManager_PreRedistribution { | ||
/** | ||
* @notice Struct containing parameters to slashing | ||
* @param operator the address to slash | ||
* @param operatorSetId the ID of the operatorSet the operator is being slashed on behalf of | ||
* @param strategies the set of strategies to slash | ||
* @param wadsToSlash the parts in 1e18 to slash, this will be proportional to the operator's | ||
* slashable stake allocation for the operatorSet | ||
* @param description the description of the slashing provided by the AVS for legibility | ||
*/ | ||
struct SlashingParams { | ||
address operator; | ||
uint32 operatorSetId; | ||
IStrategy[] strategies; | ||
uint[] wadsToSlash; | ||
string description; | ||
} | ||
|
||
/** | ||
* @notice Called by an AVS to slash an operator in a given operator set. The operator must be registered | ||
* and have slashable stake allocated to the operator set. | ||
* | ||
* @param avs The AVS address initiating the slash. | ||
* @param params The slashing parameters, containing: | ||
* - operator: The operator to slash. | ||
* - operatorSetId: The ID of the operator set the operator is being slashed from. | ||
* - strategies: Array of strategies to slash allocations from (must be in ascending order). | ||
* - wadsToSlash: Array of proportions to slash from each strategy (must be between 0 and 1e18). | ||
* - description: Description of why the operator was slashed. | ||
* | ||
* @dev For each strategy: | ||
* 1. Reduces the operator's current allocation magnitude by wadToSlash proportion. | ||
* 2. Reduces the strategy's max and encumbered magnitudes proportionally. | ||
* 3. If there is a pending deallocation, reduces it proportionally. | ||
* 4. Updates the operator's shares in the DelegationManager. | ||
* | ||
* @dev Small slashing amounts may not result in actual token burns due to | ||
* rounding, which will result in small amounts of tokens locked in the contract | ||
* rather than fully burning through the burn mechanism. | ||
*/ | ||
function slashOperator(address avs, SlashingParams calldata params) external; | ||
} |
Oops, something went wrong.
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.
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.
Is this needed given only return values were changed?
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.
Main issue lies with existing return values changing, since contracts calling wold attempt to copy returndata that doesn't exist or is misplaced.
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 would assume it's not needed, but for some reason I'm reverting...