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

test: slashing integration todos #934

Closed

Conversation

0xClandestine
Copy link
Contributor

@0xClandestine 0xClandestine commented Dec 6, 2024

Changes:

  • adds HOLDS_MAX assetType (denotes a user that holds the maximum allowed strategies to test gas constraints).
  • adds print.gasUsed() (prints the gas consumed from the last call).
  • adds gas logging via print.gasUsed().
  • adds PermissionController support to AVS and User integration user types.
  • removes most assertApproxEqAbs (1 single instance remains for beaconchain).

TODOS:

  • add remaining slashing related checks.
  • add remaining slashing scenarios.

@0xClandestine 0xClandestine force-pushed the test/slashing-integration-todos branch from 4b024ff to 60442a0 Compare December 6, 2024 19:04
@ypatil12 ypatil12 self-requested a review December 10, 2024 18:05
Copy link
Collaborator

@ypatil12 ypatil12 left a comment

Choose a reason for hiding this comment

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

Need unit test on EP change

src/contracts/pods/EigenPod.sol Show resolved Hide resolved
}
}

function assert_HasUnderlyingTokenBalances_AfterSlash(
Copy link
Collaborator

Choose a reason for hiding this comment

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

For non native ETH Strategies, we should also have an assertion on the token balance of the Strategy being burned/updated after the slashOperator call and it should be sent to the burn address.
Perhaps it makes sense to be in this check or a separate assert function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will include in follow up pr

_calculateExpectedTokens(withdrawals[i].strategies, withdrawals[i].scaledShares);
staker.completeWithdrawalAsTokens(withdrawals[i]);
// FIXME: check_Withdrawal_AsTokens_State_AfterSlash(staker, operator, withdrawals[i], allocateParams, slashingParams, expectedTokens);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Whats broken in this check atm?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

currently failing for staker shares, which should also be conditionally adjusted

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will fix in follow up pr

refactor: review changes

refactor: final commit

fix: `assert_Snap_Allocations_Modified` bandaid

will improve in second pr

fix: `assert_Snap_Allocations_Modified`

made need further improvement...

test(wip): add `assert_HasUnderlyingTokenBalances_AfterSlash`

refactor: snap checks

fix: `EigenPod` gwei bug

test(wip): add `assert_Snap_Magnitudes_Slashed`
@0xClandestine 0xClandestine force-pushed the test/slashing-integration-todos branch from d7a5d61 to 78ddf56 Compare December 11, 2024 16:21
@ypatil12
Copy link
Collaborator

Closing in favor of #945

@ypatil12 ypatil12 closed this Dec 11, 2024
@0xClandestine 0xClandestine deleted the test/slashing-integration-todos branch January 9, 2025 16:23
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.

3 participants