Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: slashing audit fixes #1046

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

Conversation

wadealexc
Copy link
Collaborator

No description provided.

0xClandestine and others added 30 commits January 3, 2025 15:17
* feat: add share helpers

* fix: add deposit scaling factor

* fix: rebase
* fix: slashable window boundaries

* test: regression for alm

* test: update withdrawal delay not passed reversion

* test: burning indices

* refactor: switch conditionals

* fix: added unit tests

* test: assert slashable shares in queue

* fix: typos

---------

Co-authored-by: Yash Patil <[email protected]>
refactor small cleanup

chore: `forge fmt`

fix: `getQueuedWithdrawals` + test

fix: add constructor back

test: `totalQueued` > `withdrawal.strategies.length`

test(wip): `completeQueuedWithdrawals`

currently failing

fix: effectBlock

test(wip): @8sunyuan patch

fix: one flaky test

fix: second flaky test
* feat: initial deploy

* feat: slashing patch
* test(wip): todos

* fix: dealloc issue

* fix: remaining

* fix: forktest upgrade issue

* test: add `check_Withdrawal_AsShares_State_AfterSlash`

* refactor: cleanup

* fix: ci

* refactor: review changes
* docs: add slashing docs
* chore: bindings
* docs: fixed commenting and updated queue withdrawal docs
* docs: minor cleanup

---------

Co-authored-by: Nadir Akhtar <[email protected]>
* fix: correct expected share calc

* chore: bindings

* fix: rounding on failing unit test
* chore: clean comments and naming in dm

* refactor: simplify undelegate method
* feat: removed 0 address check because 0 stakers cant be delegated
* feat: condensed non-staker caller logic

* refactor: remove unnecessary check

* feat: use checks-effects-interactions when completing withdrawals
* feat: remove implicit public method for queuedWithdrawals and impl dedicated getter

* feat: deprecate withdrawer field

* chore: make bindings and clean compile errors

* refactor: redelegate reuses delegateTo and undelegate

* fix: broken integration test

* docs: update to reflect deprecated field

* feat: add getter for stakers withdrawal roots
* fix: initialization params

* fix: roll blocks usage
* fix: integration test initialization params (#978)

* fix: initialization params

* fix: roll blocks usage

* fix: `SignatureUtils` construction

---------

Co-authored-by: Yash Patil <[email protected]>
Co-authored-by: davidironblocks <[email protected]>
* fix: readd manual checks

* chore: forge fmt
* feat: add step 1

* feat: step 1 & 2 complete; pending step 3 sanity

* test: add `_validateProxyDomainSeparators`

* feat: add rc validation

---------

Co-authored-by: clandestine.eth <[email protected]>
* fix: update alloc delay bound

* test: remove unnecessary roll
* docs: shares accounting

* docs: fix gh markdown view

* docs: try fix gh again

* docs: cleanup

* docs: edit share accounting

* docs: wrap up share accounting doc

* docs: edit edge cases

---------

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

* chore: fmt

* chore: update storage report

* chore: update readme

* refactor: add burnableShares for epm storage

* chore: update storage report
* docs: finish delegation manager docs

* docs: update docs readme

* docs: permission controller

* fix: small typos

* docs: address feedback

* docs: nit

---------

Co-authored-by: Michael Sun <[email protected]>
* docs: update StrategyManager docs with slashing delta

* docs: remove references to thirdPartyTransfersForbidden

* docs: update strategy docs to latest
* also various edits to docs and natspec

* chore: fmt and make bindings

---------

Co-authored-by: wadealexc <[email protected]>
nadir-akhtar and others added 13 commits January 9, 2025 12:51
* docs: complete EigenPodManager for slashing

* docs: add in _beaconChainSlashingFactor state variable note

* docs: finish epm docs

* chore: make bindings

---------

Co-authored-by: wadealexc <[email protected]>
* Validate that users who are slashed fully can redeposit once undelegated

* removing arraylib use

* test for updating eigenpod state -> slash/undelegate

* removing unnecessary logging function

* fixing strategy set

* beacon chain tests in progress

---------

Co-authored-by: Michael <[email protected]>
* fix: fixing 0 withdrawal issues

* style: white space

* docs: changing description for test

---------

Co-authored-by: Michael <[email protected]>
* Slashing integration tests (#1003)

* Validate that users who are slashed fully can redeposit once undelegated

* removing arraylib use

* test for updating eigenpod state -> slash/undelegate

* removing unnecessary logging function

* fixing strategy set

* beacon chain tests in progress

---------

Co-authored-by: Michael <[email protected]>

* Revert "Slashing integration tests (#1003)" (#1007)

This reverts commit e945d8d.

* integration tests for full eigenlayer slashes

* comment re: beacon chain eth partial deposits

* fix: fixing 0 withdrawal issues (#1019)

* fix: fixing 0 withdrawal issues

* style: white space

* docs: changing description for test

---------

Co-authored-by: Michael <[email protected]>

* test: withdraw as shares for random subset of strategies fully slashed

* style: removing debugging stubs and updating comment

---------

Co-authored-by: Michael <[email protected]>
…#1031)

* refactor(test): clean up random config and upgrade tests

* test: move test to upgrade tests
* test: improve integration invariants
* also removes unneeded fork logic
* adds checks to some invariants
* fixes some broken tests

* test(integration): enable shared setups
* fix: remove token param from Deposit event and related APIs

* fix: forge fmt

* fix: rebase

* fix: update EigenPodManager and test

* fix: update tests

* fix: update eigenpodmanager tests

* fix: update StrategyManagerMock

* feat: add bindings

* fix: update docs
* feat: better introspection for encumbered magnitude

* chore: bindings

* chore: fix comment and make bindings
* chore: remove unused helper

* chore: bindings
* feat: changing burnableShares to EnumerableMap

* style: linter

* docs: storage docs

* style: natspec and import

* style: lint

* feat: adding view function for cronjob and moving functions

* fix: updating storage gap

* docs: storage slots comment

* feat: new bindings

* docs: updating StrategyManager doc

* docs: bindings

---------

Co-authored-by: Michael <[email protected]>
…1037)

* chore: add view functions for isOperatorSlashable

* feat: add `getAllocatedStake` func

* test: getAllocatedStake

* test: add getMinimumSlashableStake tests

* chore: format

* chore: fmt interface

* chore: remove unnecessary test

* chore: update comment

* chore: bindings

---------

Co-authored-by: Yash Patil <[email protected]>
@ypatil12 ypatil12 force-pushed the slashing-magnitudes branch from 7a6f8a6 to fbe5ee2 Compare January 28, 2025 18:23
wadealexc and others added 3 commits January 30, 2025 14:57
…1042)

* chore: fix forge nightly release breaking two tests

* test: fix outdated alm tests
* fix: overflow bug for pendingDiff input

* test: add check to regression test

---------

Co-authored-by: wadealexc <[email protected]>
* test: regression tests showing invalid state

* fix: require check and update tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants