-
Notifications
You must be signed in to change notification settings - Fork 341
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: SM/StrategyBase Unit Tests + Formatting #813
Merged
Merged
Conversation
This file contains 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
ypatil12
changed the title
Feat: SM/StrategyBase Unit Tests
Feat: SM/StrategyBase Unit Tests + Formatting
Oct 9, 2024
ypatil12
force-pushed
the
feat/strategyManager-tests
branch
from
October 9, 2024 20:56
6f8a0b4
to
e6d7ea6
Compare
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.
Nice, were the immutables not used?
Yup EPM was holdover from M1. AVSD was holdover from when SM called into AVSD for slashing POC |
was the OZ dependency change intentional? |
Yes, we're only on 4.9 now |
ypatil12
force-pushed
the
feat/strategyManager-tests
branch
from
October 10, 2024 19:13
0b93d43
to
626400e
Compare
ypatil12
pushed a commit
that referenced
this pull request
Oct 17, 2024
fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test
ypatil12
pushed a commit
that referenced
this pull request
Oct 17, 2024
chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test
ypatil12
pushed a commit
that referenced
this pull request
Oct 17, 2024
chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test
ypatil12
pushed a commit
that referenced
this pull request
Oct 17, 2024
chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test
ypatil12
pushed a commit
that referenced
this pull request
Oct 17, 2024
chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format
ypatil12
added a commit
that referenced
this pull request
Dec 3, 2024
* fix: compile dev * fix: fixed compile (#830) --------- Co-authored-by: haike0513 <[email protected]> feat: storage report (#753) chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- Co-authored-by: wadealexc <[email protected]> test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- Co-authored-by: wadealexc <[email protected]> Co-authored-by: Alex <[email protected]> test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- Co-authored-by: Yash Patil <[email protected]> refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- Co-authored-by: Michael Sun <[email protected]> refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format fix: wrap burnShares with try catch (#921) fix: flaky UAM test (#922) feat: add redelegate (#914) * feat: add redelegate * chore: add comment
ypatil12
added a commit
that referenced
this pull request
Dec 3, 2024
* fix: compile dev * fix: fixed compile (#830) --------- Co-authored-by: haike0513 <[email protected]> feat: storage report (#753) chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- Co-authored-by: wadealexc <[email protected]> test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- Co-authored-by: wadealexc <[email protected]> Co-authored-by: Alex <[email protected]> test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- Co-authored-by: Yash Patil <[email protected]> refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- Co-authored-by: Michael Sun <[email protected]> refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format fix: wrap burnShares with try catch (#921) fix: flaky UAM test (#922) feat: add redelegate (#914) * feat: add redelegate * chore: add comment
ypatil12
pushed a commit
that referenced
this pull request
Dec 4, 2024
chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- Co-authored-by: wadealexc <[email protected]> test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- Co-authored-by: wadealexc <[email protected]> Co-authored-by: Alex <[email protected]> test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- Co-authored-by: Yash Patil <[email protected]> refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- Co-authored-by: Michael Sun <[email protected]> refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format fix: modify allocation tests + effect block fix: push more fixes test: add more tests fix: events test: add slashing check helpers (greg) (#910) * refactor(wip): alm unit tests * fix: am tests passing --------- Co-authored-by: clandestine.eth <[email protected]> test: allocation test refactor test: fix slashing tests fix: test/compile chore: format
ypatil12
pushed a commit
that referenced
this pull request
Dec 4, 2024
chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- Co-authored-by: wadealexc <[email protected]> test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- Co-authored-by: wadealexc <[email protected]> Co-authored-by: Alex <[email protected]> test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- Co-authored-by: Yash Patil <[email protected]> refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- Co-authored-by: Michael Sun <[email protected]> refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format fix: modify allocation tests + effect block fix: push more fixes test: add more tests fix: events test: add slashing check helpers (greg) (#910) * refactor(wip): alm unit tests * fix: am tests passing --------- Co-authored-by: clandestine.eth <[email protected]> test: allocation test refactor test: fix slashing tests fix: test/compile chore: format
ypatil12
pushed a commit
that referenced
this pull request
Dec 4, 2024
chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- Co-authored-by: wadealexc <[email protected]> test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- Co-authored-by: wadealexc <[email protected]> Co-authored-by: Alex <[email protected]> test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- Co-authored-by: Yash Patil <[email protected]> refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- Co-authored-by: Michael Sun <[email protected]> refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format fix: modify allocation tests + effect block fix: push more fixes test: add more tests fix: events test: add slashing check helpers (greg) (#910) * refactor(wip): alm unit tests * fix: am tests passing --------- Co-authored-by: clandestine.eth <[email protected]> test: allocation test refactor test: fix slashing tests fix: test/compile chore: format
8sunyuan
pushed a commit
that referenced
this pull request
Dec 6, 2024
test: decreaseDelegatedShares current breaking tests from rounding it seems test: add helper assertions everywhere fix: added assertion helpers fix: rand(r) modifier test: completing undelegate withdrawal root undelegate, delegate new operator, and complete old withdrawal chore: fix gitattrs (#791) fix: compile warnings (#664) * fix: compile warnings * fix: rebase error * fix: rebase errors * fix: rebase error * fix: compile errors, fr this time docs: clarify strategy manager docs (#797) * Adding clarification to depositIntoStrategyWithSignature() per customer question in Slack feat: preprod rewards coordinator upgrade (#729) * feat: preprod deploy script * chore: update preprod config fix: update coverage workflow name (#834) Fix: Get Dev to Compile (#835) * fix: compile dev * fix: fixed compile (#830) --------- feat: storage report (#753) chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format
8sunyuan
pushed a commit
that referenced
this pull request
Dec 6, 2024
test: decreaseDelegatedShares current breaking tests from rounding it seems test: add helper assertions everywhere fix: added assertion helpers fix: rand(r) modifier test: completing undelegate withdrawal root undelegate, delegate new operator, and complete old withdrawal chore: fix gitattrs (#791) fix: compile warnings (#664) * fix: compile warnings * fix: rebase error * fix: rebase errors * fix: rebase error * fix: compile errors, fr this time docs: clarify strategy manager docs (#797) * Adding clarification to depositIntoStrategyWithSignature() per customer question in Slack feat: preprod rewards coordinator upgrade (#729) * feat: preprod deploy script * chore: update preprod config fix: update coverage workflow name (#834) Fix: Get Dev to Compile (#835) * fix: compile dev * fix: fixed compile (#830) --------- feat: storage report (#753) chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format
8sunyuan
pushed a commit
that referenced
this pull request
Dec 6, 2024
test: decreaseDelegatedShares current breaking tests from rounding it seems test: add helper assertions everywhere fix: added assertion helpers fix: rand(r) modifier test: completing undelegate withdrawal root undelegate, delegate new operator, and complete old withdrawal chore: fix gitattrs (#791) fix: compile warnings (#664) * fix: compile warnings * fix: rebase error * fix: rebase errors * fix: rebase error * fix: compile errors, fr this time docs: clarify strategy manager docs (#797) * Adding clarification to depositIntoStrategyWithSignature() per customer question in Slack feat: preprod rewards coordinator upgrade (#729) * feat: preprod deploy script * chore: update preprod config fix: update coverage workflow name (#834) Fix: Get Dev to Compile (#835) * fix: compile dev * fix: fixed compile (#830) --------- feat: storage report (#753) chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format
ypatil12
pushed a commit
that referenced
this pull request
Dec 10, 2024
chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- Co-authored-by: wadealexc <[email protected]> test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- Co-authored-by: wadealexc <[email protected]> Co-authored-by: Alex <[email protected]> test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- Co-authored-by: Yash Patil <[email protected]> refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- Co-authored-by: Michael Sun <[email protected]> refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format fix: modify allocation tests + effect block fix: push more fixes test: add more tests fix: events test: add slashing check helpers (greg) (#910) * refactor(wip): alm unit tests * fix: am tests passing --------- Co-authored-by: clandestine.eth <[email protected]> test: allocation test refactor test: fix slashing tests fix: test/compile chore: format
ypatil12
pushed a commit
that referenced
this pull request
Dec 10, 2024
chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- Co-authored-by: wadealexc <[email protected]> test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- Co-authored-by: wadealexc <[email protected]> Co-authored-by: Alex <[email protected]> test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- Co-authored-by: Yash Patil <[email protected]> refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- Co-authored-by: Michael Sun <[email protected]> refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format
ypatil12
added a commit
that referenced
this pull request
Dec 10, 2024
* fix: compile dev * fix: fixed compile (#830) --------- Co-authored-by: haike0513 <[email protected]> feat: storage report (#753) chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- Co-authored-by: wadealexc <[email protected]> test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- Co-authored-by: wadealexc <[email protected]> Co-authored-by: Alex <[email protected]> test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- Co-authored-by: Yash Patil <[email protected]> refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- Co-authored-by: Michael Sun <[email protected]> refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format feat: working upgrade path for integration, pending eigenpod migration validation test: add eigenpod migration tests chore: update ci for eigenpod migration chore: update comment
ypatil12
added a commit
that referenced
this pull request
Dec 10, 2024
Fix: Get Dev to Compile (#835) * fix: compile dev * fix: fixed compile (#830) --------- Co-authored-by: haike0513 <[email protected]> feat: storage report (#753) chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- Co-authored-by: wadealexc <[email protected]> test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- Co-authored-by: wadealexc <[email protected]> Co-authored-by: Alex <[email protected]> test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- Co-authored-by: Yash Patil <[email protected]> refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- Co-authored-by: Michael Sun <[email protected]> refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format feat: working upgrade path for integration, pending eigenpod migration validation test: add eigenpod migration tests chore: update ci for eigenpod migration chore: update comment
ypatil12
added a commit
that referenced
this pull request
Dec 10, 2024
Fix: Get Dev to Compile (#835) * fix: compile dev * fix: fixed compile (#830) --------- Co-authored-by: haike0513 <[email protected]> feat: storage report (#753) chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- Co-authored-by: wadealexc <[email protected]> test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- Co-authored-by: wadealexc <[email protected]> Co-authored-by: Alex <[email protected]> test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- Co-authored-by: Yash Patil <[email protected]> refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- Co-authored-by: Michael Sun <[email protected]> refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format feat: working upgrade path for integration, pending eigenpod migration validation test: add eigenpod migration tests chore: update ci for eigenpod migration chore: update comment feat: withdrawal migration tests
ypatil12
added a commit
that referenced
this pull request
Dec 10, 2024
* fix: compile dev * fix: fixed compile (#830) --------- Co-authored-by: haike0513 <[email protected]> feat: storage report (#753) chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- Co-authored-by: wadealexc <[email protected]> test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- Co-authored-by: wadealexc <[email protected]> Co-authored-by: Alex <[email protected]> test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- Co-authored-by: Yash Patil <[email protected]> refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- Co-authored-by: Michael Sun <[email protected]> refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format feat: working upgrade path for integration, pending eigenpod migration validation test: add eigenpod migration tests chore: update ci for eigenpod migration chore: update comment feat: withdrawal migration tests
ypatil12
added a commit
that referenced
this pull request
Dec 10, 2024
* fix: compile dev * fix: fixed compile (#830) --------- Co-authored-by: haike0513 <[email protected]> feat: storage report (#753) chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- Co-authored-by: wadealexc <[email protected]> test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- Co-authored-by: wadealexc <[email protected]> Co-authored-by: Alex <[email protected]> test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- Co-authored-by: Yash Patil <[email protected]> refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- Co-authored-by: Michael Sun <[email protected]> refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format feat: working upgrade path for integration, pending eigenpod migration validation test: add eigenpod migration tests chore: update ci for eigenpod migration chore: update comment feat: withdrawal migration tests
ypatil12
added a commit
that referenced
this pull request
Dec 10, 2024
* fix: compile dev * fix: fixed compile (#830) --------- Co-authored-by: haike0513 <[email protected]> feat: storage report (#753) chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- Co-authored-by: wadealexc <[email protected]> test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- Co-authored-by: wadealexc <[email protected]> Co-authored-by: Alex <[email protected]> test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- Co-authored-by: Yash Patil <[email protected]> refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- Co-authored-by: Michael Sun <[email protected]> refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format feat: working upgrade path for integration, pending eigenpod migration validation test: add eigenpod migration tests chore: update ci for eigenpod migration chore: update comment feat: withdrawal migration tests chore: remove unnecessary files changed fix: test fix: compile
ypatil12
pushed a commit
that referenced
this pull request
Dec 10, 2024
chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- Co-authored-by: wadealexc <[email protected]> test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- Co-authored-by: wadealexc <[email protected]> Co-authored-by: Alex <[email protected]> test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- Co-authored-by: Yash Patil <[email protected]> refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- Co-authored-by: Michael Sun <[email protected]> refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format fix: modify allocation tests + effect block fix: push more fixes test: add more tests fix: events test: add slashing check helpers (greg) (#910) * refactor(wip): alm unit tests * fix: am tests passing --------- Co-authored-by: clandestine.eth <[email protected]> test: allocation test refactor test: fix slashing tests fix: test/compile chore: format
ypatil12
added a commit
that referenced
this pull request
Dec 10, 2024
* fix: compile dev * fix: fixed compile (#830) --------- Co-authored-by: haike0513 <[email protected]> feat: storage report (#753) chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- Co-authored-by: wadealexc <[email protected]> test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- Co-authored-by: wadealexc <[email protected]> Co-authored-by: Alex <[email protected]> test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- Co-authored-by: Yash Patil <[email protected]> refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- Co-authored-by: Michael Sun <[email protected]> refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format feat: working upgrade path for integration, pending eigenpod migration validation test: add eigenpod migration tests chore: update ci for eigenpod migration chore: update comment feat: withdrawal migration tests chore: remove unnecessary files changed fix: test fix: compile
ypatil12
added a commit
that referenced
this pull request
Dec 10, 2024
* feat: alm tests chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- Co-authored-by: wadealexc <[email protected]> test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- Co-authored-by: wadealexc <[email protected]> Co-authored-by: Alex <[email protected]> test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- Co-authored-by: Yash Patil <[email protected]> refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- Co-authored-by: Michael Sun <[email protected]> refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format fix: modify allocation tests + effect block fix: push more fixes test: add more tests fix: events test: add slashing check helpers (greg) (#910) * refactor(wip): alm unit tests * fix: am tests passing --------- Co-authored-by: clandestine.eth <[email protected]> test: allocation test refactor test: fix slashing tests fix: test/compile chore: format * fix: tests * chore: remove unnecessary fixes * chore: bindings * chore: format * chore: uncommented tests * chore: assert number of logs to emit * chore: use expectedSlashableStake naming * chore: spacing * chore: add additional test * chore: remove unused test * chore: remove operator not registered * fix: event * chore: make types cleaner in RC unit tests * fix: broken test --------- Co-authored-by: clandestine.eth <[email protected]>
ypatil12
added a commit
that referenced
this pull request
Dec 11, 2024
* fix: compile dev * fix: fixed compile (#830) --------- Co-authored-by: haike0513 <[email protected]> feat: storage report (#753) chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- Co-authored-by: wadealexc <[email protected]> test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- Co-authored-by: wadealexc <[email protected]> Co-authored-by: Alex <[email protected]> test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- Co-authored-by: Yash Patil <[email protected]> refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- Co-authored-by: Michael Sun <[email protected]> refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format feat: working upgrade path for integration, pending eigenpod migration validation test: add eigenpod migration tests chore: update ci for eigenpod migration chore: update comment feat: withdrawal migration tests chore: remove unnecessary files changed fix: test fix: compile
ypatil12
added a commit
that referenced
this pull request
Dec 11, 2024
* fix: compile dev * fix: fixed compile (#830) --------- Co-authored-by: haike0513 <[email protected]> feat: storage report (#753) chore: move custom errors to sep branch chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts fix: compile feat: squashed slashing for devnet chore: forge fmt src/contracts fix: ci and bindings chore: dmgr error tweaks chore: error tweaks for consistency and clarity feat: bump oz version (#755) * 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 passing (#783) * 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 refactor: review reconciliation refactor: review reconciliation refactor: review reconciliation chore: forge fmt src/contracts feat: slashing * 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]> feat: dm cleanup (#788) Co-authored-by: wadealexc <[email protected]> Revert "feat: dm cleanup (#788)" (#799) This reverts commit c27004e. fix: compiles (#800) fix: refactor (#801) * fix: refactor * default was history * reline * rename rename test: generally compiling + AVSM unit tests compiling chore: forge fmt src/contracts add events, fix bugs, abstract better (#806) * fix bugs, add events, cleanup * wrap conditional * fmt * only one slash per timestamp test(wip): generally compiling update docs (#804) fix: revert change to event feat: am refactor add to wads to slash cleanup refactor: change totalMagnitude to maxMagnitude * condense slashOperator params * some struct field renaming remove unused eigenpod storage chore: storage report (#809) * chore: storage report * patch eigenpod --------- Co-authored-by: gpsanant <[email protected]> feat: eip712 fixes (#808) * feat: use OZ SignatureChecker * feat: add `SignatureUtils` mixin * refactor: cleanup * feat: make storage report * storage report --------- Co-authored-by: gpsanant <[email protected]> test: slashing tests passing (#812) fix: merge issues update events refactor: rename total magnitudes to max magnitudes * various formatting and cleanup * standardize allocation manager getter functions * update and improve commenting refactor: reorder functions to match interface fix: remove memory overwrite bug in delegation manager chore: forge fmt refactor: clean up getDepositedShare logic chore: remove old oz + forge update foundry-rs/forge-std feat: replace getSlashableMagnitudes with general purpose allocation info query Feat: SM/StrategyBase Unit Tests + Formatting (#813) refactor: delegation manager refactors test: AllocationManager progress feat: change event names feat: update doc fix: compile test: AllocationManager progress fix: tests progress add Strategy <> OperatorSet mapping in storage, and APIs and events (#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 <[email protected]> Slashing: DM Happy Path Test Cases (#815) * 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 Add view funcs (#816) * fix: add new view funcs * fix: update docs test: fix avsD tests (#817) chore: format fix: from scratch deploy feat: add shares to slashing event Slashing: Modify Allocations Happy Path Tests (#821) * refactor: add test contract per func * test: modify allocations * chore: format slashing: allocation delay happy path tests (#822) feat: wadSlashed (#820) Slashing: Clear Modification Queue Happy Path Tests (#823) test: basic allocation tests (#824) feat: inheritdoc refactor: alm test cleanup test: multiple allocations, only one slashed test: one pending alloc, slash test: revert bound refactor so tests pass Slashing: Add additional happy path AM test cases (#828) * test: happy path AM tests * chore: format Slashing: Get all tests passing (#829) * test: all tests passing * fix: mainnet integration test comment out Fix misset storage gaps (#831) * fix: misset storage gaps from #814 * fix: update gap to account for previous refactor fix: update coverage yml name (#833) Fix: Single Deallocation Queue (#827) * test: base regression * test: regression * fix: remove console * test: logs * test: add actual regression * fix: use a single deallocation queue * fix: comments * refactor: use deallocation queue everywhere * fix: address test comments * fix: test comment Feat: Update legacy withdrawal timestamp param to legacy withdrawal check (#836) * fix: make comment on timestamp clearer * chore: format Feat: Public Devnet Deploy (#838) * feat: slashing public devnet * fix: filepath * test: validation * fix: add test * fix: test fix: compile chore: format feat: add shares to queue event (#847) * feat: add shares to queue event * fix: submodule * chore: rename feat: named mapping params (#848) * feat: named mapping params * refactor: natspec * refactor: natspec * chore: forge fmt * refactor: nits chore: new storage (#851) Gpsanant/current stakes (#846) * feat: add getCurrent * chore: fmt * chore: storoage report * chore: new storage slashing: cleanup (#842) * chore: cleanup * chore: comments and add legacy view * chore: complete => clear * chore: reorder require check * fix: round up for slashed magnitudes * chore: nits and legacy complete withdrawals * feat: allow alloc delay 0 and fix tests * chore: clarify comment * chore: fmt * fix: fork test * chore: nits * test: roundup slashed magnitudes slashing: fully slashed strategies (#850) * feat: handling fully slashed scenarios * fix: unit test descriptions * fix: nits EigenPod/EPM Happy Path Test Cases (#857) * test: fix epm and ep unit tests * fix: remove unused contracts * test: get basic slash integration working * test: get ep integration tests passing * test: add rounding down test * chore: add TODO * chore: formatting * test: fix additional slash tests * chore: remove fork tests * fix: address comments * test: fix check on `withdrawSharesAsTokens` slashing: revert timestamps delegation (#861) * fix: back to blocks for withdrawals * refactor: queued legacy withdrawals are extended refactor: optimize pausable (#854) * refactor: optimize pausable * chore: forge fmt * refactor: nits * chore: make storage-report * fix: rebase * refactor: review changes - check pauser reg is non-zero on construction * fix: ci feat: small delegation refactors (#866) * refactor: small refactor to move duplicate expiry checks into signature utils * refactor: improve clarity of fully-slashed logic * refactor: improve readability of operator slashed amount calculation * todo: off-by-one error in test due to rounding issue * fix: correct amount of shares slashed * wip: comment out test so michael gets to it in his pr slashing: change queue withdrawal input to deposit shares (#869) * feat: queue withdraw uses deposit shares * fix: tests and removed old test files * chore: forge ftm * test: redelegate shares from rounding * chore: remove unused import feat: remove delegate to by signature (#871) feat: track staker withdrawals (#864) * feat: track staker withdrawals * chore: forge fmt * feat: track staker withdrawals * chore: forge fmt * fix: `pendingWithdrawals` arrangement * fix: ci Fix: Flaky DM Test (#875) * fix: test * fix: remove log feat: move operator set functionality to alm (#860) * feat: move operator set functionality to alm * feat: clarify registration states * fix: allow operators to deallocate from strategies that are not in operator set * fix: add enumeration for operator allocations * feat: remove deallocations on deregistration * chore: cleanup src/test (#863) * feat: add configurable avs registrar * feat: remove bloated getters * feat: use existing set method to get set values * test: avsd alm refactor (#867) * test: ALM compiling + but not passing * test(wip): avsd alm refactor * chore: update forge-std * fix: compile * test(wip): avsd passing * nit: cleanup * test: get alm tests passing * test: fix delegation tests * feat: add lib `Random` * test: add allocation enumeration checks to tests * test: reg/dereg + use `Random` * refactor: small refactor to reuse getters * test: `addStrategiesToOperatorSet` - also adds missing state mutation checks on previous tests * test: `removeStrategiesFromOperatorSet` * test: `createOperatorSets` * test: `setAVSRegistrar` --------- Co-authored-by: wadealexc <[email protected]> * feat: add AVS metadata URI to ALM * chore: update comments * chore: address comments fix: change to sharesToWithdraw (#878) * fix: change to sharesToWithdraw * fix: test feat: add tasks to prepare chain state ready for slashing (#868) * feat: add tasks to prepare chain state ready for slashing * feat: add queueWithdrawal and completeWithdrawal tasks * fix: extract addresses from output after deploy * fix: upgrade scripts to account for AVS/ALM operatorSet changes * fix: add additional deposit * fix: add additional slashing between withdrawal queued and completed * fix: update slashing on top of alex/avsd-alm-refactor * chore: correct readme and formatting * fix: PascalCase contract names and update forge-std * feat: replace console with emit * feat: remove additional use of console --------- Co-authored-by: wadealexc <[email protected]> test: slashing todos (#880) * test(wip): todos * test: remove unused utils * feat: foundry `sparse_mode=true` * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * test(wip): todos * fix: cherry-pick errors * fix: forge-std * test(wip): todos feat: add getMinimumSlashableStake (#889) * feat: add getMinimumSlashableStake * fix: only account for deallocation when calculating minimum slashable refactor: pull beacon chain slashing out of slashing lib (#876) * fix: correctly update dsf when increasing delegation * fix: fix bug where we modify an array while iterating over it * chore: address review nits * refactor: minor refactors for codesize * refactor(nit): function ordering * fix: only check input lengths when receiving tokens * refactor: remove callstack indirection when completing a withdrawal * chore: update comment test: slashing test todos (#885) * test(wip): todos * chore: remove lcov * test(wip): remaining alm todos * test: final todos * test(wip): todos * chore: remove lcov feat: burn erc20s on slashing (#881) * refactor: pull beacon chain slashing out of slashing lib * feat: initial draft for sync slashing * fix: existing tests * fix: cumulative shares and fmt * fix: missing operator key in mapping * refactor: cumulative scaled shares * chore: cleanup * chore: storage report * fix: rename and beacon strategy * fix: rebase * fix: rounding * test: happy path test cases for burn erc20s * fix: address comments * test: timing regression test and comments * fix: slashable shares in queue amount * refactor: burn refactor (#897) * refactor: remove unused return values from _insert * also removes safe cast * refactor: pull unrelated operations out and condense library method usage * test: additional unit test with multiple withdrawals --------- Co-authored-by: wadealexc <[email protected]> Co-authored-by: Alex <[email protected]> test: DelegationManager unit tests (#886) * feat: initial draft for sync slashing * refactor: cumulative scaled shares * feat: initial draft for sync slashing * fix: cumulative shares and fmt * chore: cleanup src/test * fix: delegation tests * test: rebased and refactored tests fix: rebase tests test: delegation unit refactoring fix: rounding tests fix: continue fixing delegation tests * test: include fuzz underflow tests * fix: tests and rebase * chore: comment nit * fix: failing ci test: fix env requirement (#899) * fix: remove env required * fix: use envOr * fix: remove env from CI for being required fix: compile warnings (#900) fix: slashing local deploy (#898) * feat: local deploy * fix: transfer ownership * fix: comment test: slashing integration framework (#894) * feat: add `AVS` user * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * test(wip): slashing integration * fix: make tracing useful * test(wip): slashing integration * fix: toStringWad * fix: eigenpods * test(wip): slashing integration * refactor: revert change * test(review): changes * fix: compile * test(review): changes * refactor: improve logging * refactor: review changes * fix: roll in `modifyAllocations` * fix: roll in `modifyAllocations` * refactor: review changes * refactor: add back pause constants --------- Co-authored-by: Yash Patil <[email protected]> refactor: EigenPods and beacon chain slashing (#892) * refactor: eigenpod and beacon chain slashing * checkpoints are not deleted on completion, saving gas when creating a new checkpoint * refactor: pull bcsf out of delegationManager * chore: formatting * refactor: rename withdrawableRestakedExecutionLayerGwei * maintains old interface, only state variable is renamed * this is to reduce line length when using this variable * refactor: remove branching and slashing math from eigenpod * fix: clean up balance update conditions and ensure shares==0 is handled * refactor: remove input validation and explicitly document assumptions * fix: tests and roundup (#901) * chore: address feedback * chore: address feedback again * chore: cleanup EPM withdrawSharesAsTokens --------- Co-authored-by: Michael Sun <[email protected]> refactor: remove deprecated methods (#903) * refactor: rename parameter to be more accurate * refactor: remove deprecated methods from dm * refactor: remove operator details usage * chore: nit word test: `withdrawSharesAsTokens` regression (#904) * fix: commented out integration * test: call into EP for withdrawing as tokens chore: remove unnecessary delegate checks (#908) * feat: remove checks on approver/operator sender on delegate * chore: update interface feat: user access management (#870) * feat: unified access management fix: test/compile chore: use helper func in modifier chore: remove extra * test: add UAM to unit tests * refactor: delegate -> appointee * refactor: setAdmin -> addAdmin * fix: prevent 0 admins * refactor: bitshift encode/decode * feat: short-circuit _checkCanCall * test: basic reversability * feat: admin 2-step fix: remove external call * chore: fix compile/test * feat: use opSet length as avs check * chore: format * refactor: getoperatorsetcount * fix: msg.sender in delegatoinapproverupdated * chore: format feat: working upgrade path for integration, pending eigenpod migration validation test: add eigenpod migration tests chore: update ci for eigenpod migration chore: update comment feat: withdrawal migration tests chore: remove unnecessary files changed fix: test fix: compile
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Also removes AVSD/EPM immutable from SM