-
Notifications
You must be signed in to change notification settings - Fork 436
feat(draft): AllocationManager
redistribution support
#1346
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
Changes from all commits
ca7e07c
201d41e
e4521b4
1dfd591
525cda5
ea18480
0137c58
538d914
6462ea3
bec1023
a0afbe9
32777d4
b88b0f2
579fb91
7ff6034
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -14,6 +14,12 @@ abstract contract AllocationManagerStorage is IAllocationManager { | |||||||||
|
||||||||||
// Constants | ||||||||||
|
||||||||||
/// @dev The default burn address for slashed funds. | ||||||||||
address internal constant DEFAULT_BURN_ADDRESS = 0x00000000000000000000000000000000000E16E4; | ||||||||||
|
||||||||||
/// @dev The beacon chain ETH strategy. | ||||||||||
IStrategy internal constant BEACONCHAIN_ETH_STRAT = IStrategy(0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0); | ||||||||||
|
||||||||||
/// @dev Index for flag that pauses operator allocations/deallocations when set. | ||||||||||
uint8 internal constant PAUSED_MODIFY_ALLOCATIONS = 0; | ||||||||||
|
||||||||||
|
@@ -93,6 +99,16 @@ abstract contract AllocationManagerStorage is IAllocationManager { | |||||||||
/// @notice bool is not used and is always true if the avs has registered metadata | ||||||||||
mapping(address avs => bool) internal _avsRegisteredMetadata; | ||||||||||
|
||||||||||
/// @notice Returns the number of slashes for a given operator set. | ||||||||||
/// @dev This is also used as a unique slash identifier. | ||||||||||
0xClandestine marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
/// @dev This tracks the number of slashes after the redistribution release. | ||||||||||
mapping(bytes32 operatorSetKey => uint256 slashId) public _slashCount; | ||||||||||
|
||||||||||
/// @notice Returns the address where slashed funds will be sent for a given operator set. | ||||||||||
/// @dev For redistributing Operator Sets, returns the configured redistribution address set during Operator Set creation. | ||||||||||
/// For non-redistributing or non-existing operator sets, returns `address(0)`. | ||||||||||
mapping(bytes32 operatorSetKey => address redistributionAddr) internal _redistributionRecipients; | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could combine the above two mappings into an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Scott had an issue with storage packing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's with regards to using eigenlayer-contracts/src/contracts/core/DelegationManagerStorage.sol Lines 71 to 74 in 734f736
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why combine them if not packing? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Less total storage slots used There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, if we added slashers, way easier to just have |
||||||||||
|
||||||||||
// Construction | ||||||||||
|
||||||||||
constructor(IDelegationManager _delegation, uint32 _DEALLOCATION_DELAY, uint32 _ALLOCATION_CONFIGURATION_DELAY) { | ||||||||||
0xClandestine marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
|
@@ -106,5 +122,5 @@ abstract contract AllocationManagerStorage is IAllocationManager { | |||||||||
* variables without shifting down storage in the inheritance chain. | ||||||||||
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps | ||||||||||
*/ | ||||||||||
uint256[36] private __gap; | ||||||||||
uint256[34] private __gap; | ||||||||||
} |
Uh oh!
There was an error while loading. Please reload this page.