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

POC: Delegated Accounts #811

Draft
wants to merge 28 commits into
base: slashing-magnitudes
Choose a base branch
from
Draft

Conversation

ypatil12
Copy link
Collaborator

@ypatil12 ypatil12 commented Oct 9, 2024

Minimal POC of delegated accounts which includes:

  • 2-step ownable for accepting agency
  • agency at the granularity of func selector and target
  • Ability to revoke agency so the admin OR the agent has the ability to instantly stop agency over an identifier. This is useful if the admin believes the agent is compromised or if the agent wants to service a new (identifier, target, selector) tuple

Assumes that the identifier sets the admin

8sunyuan and others added 27 commits September 17, 2024 08:19
* feat: bump oz version -> 0.4.9

- also moved remappings -> foundry.toml
- removes remappings.txt

* bindings

---------

Co-authored-by: gpsanant <[email protected]>
* test: custom errors AVSDir

* test: custom errors IPausable

* test: custom errors Delegation

* test: custom errors EigenPodManager

* test: custom errors EigenPod

* test: custom errors Pausable

* test: custom errors RewardsCoordinator

* test: custom errors IStrategy

* test: custom errors StrategyManager

* test: custom errors DelegationManager

* test: custom errors
* chore: pending delay calc cleanup

* chore: storage pointer cleanup

* eigenpods slashing updates (#745)

* squash yet again

* change again

* update checkpoint struct

* feat: AllocationManager Storage Simplification  (#787)

* feat: cleanup

* feat: add helper func

* fix: simplification

* chore: clean up magnitude info usage and type conversions

* refactor: review changes

* fix: order struct params by size

* fix: correct and simplify calc for slashed pending magnitude

* fix: storage gap

* feat: cleanup

* chore: remove some type conversion bs and minor formatting

* chore: clean up free magnitude logic

* chore: rename pending deallocations and fix stack too deep

* feat: slashing magnitudes cleanup (#786)

* refactor: slashing magnitudes cleanup
* refactor: assert `bipToSlash` is bounded
* assert `bipsToSlash` is lte 100% and gt 0%.

* refactor: move `isOperatorSlashable` -> AVSD

* refactor: batch validate opsets on allocations

- adds `AVSD.isOperatorSetBatch(operatorSets)`

* feat: add pausing to ALM

* refactor: remove single use helper

- removes `_getLatestTotalMagnitude(operator, strategy)`

* refactor: rename `ALLOCATION_DELAY_CONFIGURATION_DELAY`

* refactor: remove `Slasher`

* refactor: move constants + immutables to storage contracts

* refactor: custom errors `RewardsCoordinatorStorage`

* chore: dependency cleanup

* fix: remove unused internal getter

* chore: batch validate operator sets and minor cleanup

* fix: fix stack too deep and compiler errors

---------

Co-authored-by: wadealexc <[email protected]>
Co-authored-by: wadealexc <[email protected]>
* fix: refactor

* default was history

* reline

* rename
* fix bugs, add events, cleanup

* wrap conditional

* fmt

* only one slash per timestamp
* condense slashOperator params
* some struct field renaming

library OwnershipManagerLib {
function getIdentifier(address agent, address ownershipManager) internal view returns (bytes20) {
return IOwnershipManager(ownershipManager).getIdentifier(agent, address(this), bytes4(msg.data[0:4]));
Copy link
Contributor

Choose a reason for hiding this comment

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

passing selector > msg.sig > slicing the calldata+casting

Copy link
Contributor

Choose a reason for hiding this comment

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

passing a storage reference to the mapping that getIdentifier uses would probably be cleaner here

@ypatil12 ypatil12 force-pushed the slashing-magnitudes branch 5 times, most recently from e94d7d9 to d98c5a7 Compare October 17, 2024 07:34
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.

6 participants