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

feat: two queues for allocation/deallocation #825

Closed
wants to merge 66 commits into from

Conversation

8sunyuan
Copy link
Collaborator

In order to preserve sortedness in the _clearModificationQueue helper, we need the modificationQueue array to be sorted based on effectTimestamp. However if we have allocations and deallocations stored here, ordering is not preserved because they have different delays (deallo delay is fixed while allocation delay is fixed).

Also added an additional require on allocation delays. The configured delay is bounded by ALLOCATION_CONFIGURATION_DELAY. This is also needed to ensure the allocationQueue is sorted in ascending effectTimestamps

8sunyuan and others added 30 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 <gpsanant@gmail.com>
* 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 <pragma-services@proton.me>
Co-authored-by: wadealexc <pragma-services@proton.me>
* 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
* chore: storage report

* patch eigenpod

---------

Co-authored-by: gpsanant <gpsanant@gmail.com>
* feat: use OZ SignatureChecker

* feat: add `SignatureUtils` mixin

* refactor: cleanup

* feat: make storage report

* storage report

---------

Co-authored-by: gpsanant <gpsanant@gmail.com>
bowenli86 and others added 18 commits October 12, 2024 16:20
…814)

* feat: add strategy to operator set mapping with corresponding functions and events

* fix: update

* fix: remove pagination of getStrategiesInOperatorSet

* fix: update

* fix: compiles

* fix: add checks

* fix: address -> IStrategy

* fix: storage gap

---------

Co-authored-by: gpsanant <gpsanant@gmail.com>
* test: basic dm tests

* test: start on share increase/decrease delegated shares tests

* test: add DM unit tests passing except queue/complete

* test: undelegate tests

* test: queue withdrawals

* test: completed DM happy path test cases

* fix: compilation, rebase errors

* chore: format
* fix: add new view funcs

* fix: update docs
* refactor: add test contract per func

* test: modify allocations

* chore: format
@8sunyuan 8sunyuan changed the base branch from dev to slashing-magnitudes October 15, 2024 20:23
@ypatil12 ypatil12 requested review from ypatil12 and 0xClandestine and removed request for 0xClandestine October 16, 2024 18:50
@ypatil12 ypatil12 force-pushed the slashing-magnitudes branch 6 times, most recently from e94d7d9 to d98c5a7 Compare October 17, 2024 07:34
@ypatil12
Copy link
Collaborator

Closing since we are adding deallocations to queue instead

@ypatil12 ypatil12 closed this Oct 21, 2024
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