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: [draft] vaults validators triggerable exits #933

Open
wants to merge 61 commits into
base: feat/vaults
Choose a base branch
from

Conversation

tamtamchik
Copy link
Member

@tamtamchik tamtamchik commented Jan 29, 2025

Add options for node operator, vault owner, and dao to exit validators from the beacon chain.

  • requestValidatorExit – just an event from REQUEST_VALIDATOR_EXIT_ROLE to NO to exit validators.
  • initiateValidatorWithdrawal - EIP-7002-based trigger for validators exit by VO of NO. Will trigger complete validators exit.
  • initiatePartialValidatorWithdrawal - EIP-7002-based trigger for validators exit by VO of NO. This will trigger partial validator withdrawals from the beacon chain.
  • forceWithdrawal – EIP-7002-based trigger for validators to exit that can be done via VaultHub to rebalance unbalanced vault back to balanced state, time-locked to allow the owner to rebalance without exiting the validators from the beacon chain

Extras:

  • Vault withdrawal credentials are set to 0x02 type.
  • isBalanced was removed from the StakingVault to avoid confusion.

TODO:

  • think about fees for force withdrawals and withdrawals from the vault
  • cover VaultHub to 100%
  • add fuzzing tests for VaultHub math
  • add solvency tests to VaultHub

mkurayan and others added 30 commits December 19, 2024 19:45
Add role ADD_FULL_WITHDRAWAL_REQUEST_ROLE for full withdrawal requests.
Access pubkeys and amounts directly instead of copying them to memory.
pass pubkeys as array of bytes
…o feat/waults-triggerable-exits

# Conflicts:
#	scripts/scratch/steps/0120-initialize-non-aragon-contracts.ts
# Conflicts:
#	contracts/0.8.25/vaults/Dashboard.sol
#	test/integration/vaults-happy-path.integration.ts
…le-exits

# Conflicts:
#	contracts/0.8.9/WithdrawalVault.sol
#	contracts/common/lib/TriggerableWithdrawals.sol
…le-exits

# Conflicts:
#	contracts/common/lib/TriggerableWithdrawals.sol
#	test/common/lib/triggerableWithdrawals/triggerableWithdrawals.test.ts
@tamtamchik tamtamchik force-pushed the feat/vaults-triggerable-exits branch from e106d9c to 8c1a908 Compare February 5, 2025 08:17
@tamtamchik tamtamchik force-pushed the feat/vaults-triggerable-exits branch from 8c1a908 to 748f8c9 Compare February 5, 2025 09:53
@tamtamchik tamtamchik force-pushed the feat/vaults-triggerable-exits branch from 7c8c374 to 33f1d5c Compare February 5, 2025 12:15
@tamtamchik tamtamchik force-pushed the feat/vaults-triggerable-exits branch from d104b3e to dd67b36 Compare February 5, 2025 14:26
@tamtamchik tamtamchik force-pushed the feat/vaults-triggerable-exits branch from 46b9aab to ebd830d Compare February 6, 2025 17:57
@tamtamchik tamtamchik marked this pull request as ready for review February 6, 2025 18:02
@tamtamchik tamtamchik requested review from a team as code owners February 6, 2025 18:02
@tamtamchik tamtamchik requested review from folkyatina and TheDZhon and removed request for a team February 6, 2025 18:02
@tamtamchik tamtamchik force-pushed the feat/vaults-triggerable-exits branch from d390031 to 2a5de07 Compare February 7, 2025 12:34
@tamtamchik tamtamchik force-pushed the feat/vaults-triggerable-exits branch from 2a5de07 to c2facaf Compare February 7, 2025 12:50
Copy link
Contributor

@TheDZhon TheDZhon left a comment

Choose a reason for hiding this comment

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

👀

contracts/0.8.25/vaults/StakingVault.sol Outdated Show resolved Hide resolved
contracts/0.8.25/vaults/StakingVault.sol Outdated Show resolved Hide resolved
contracts/0.8.25/vaults/StakingVault.sol Outdated Show resolved Hide resolved
contracts/0.8.25/vaults/StakingVault.sol Outdated Show resolved Hide resolved
contracts/0.8.25/vaults/StakingVault.sol Outdated Show resolved Hide resolved
contracts/0.8.25/vaults/VaultHub.sol Outdated Show resolved Hide resolved
contracts/0.8.25/vaults/VaultHub.sol Outdated Show resolved Hide resolved
contracts/0.8.25/vaults/VaultHub.sol Outdated Show resolved Hide resolved
contracts/0.8.25/vaults/VaultHub.sol Outdated Show resolved Hide resolved
contracts/0.8.25/vaults/VaultHub.sol Show resolved Hide resolved
expect(receipt.logs.length).to.equal(numberOfKeys);
});

it("handles large number of validator keys", async () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

Do we need some kind of limit inside the function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants