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

Shouldn't max_effective_balance differ per each validator? (Electra) #3956

Open
arkh-consensys opened this issue Oct 3, 2024 · 8 comments
Open

Comments

@arkh-consensys
Copy link

Looking into the electra specs get_max_effective_balance for all consolidated validators returns MAX_EFFECTIVE_BALANCE_ELECTRA

If this is the case, the consolidated validators gets locked until their balance reaches MAX_EFFECTIVE_BALANCE_ELECTRA
On the is_partially_withdrawable_validator function they are never considered partially withdrawalable unless their balance reaches to MAX_EFFECTIVE_BALANCE_ELECTRA = 2048 ETH

def is_partially_withdrawable_validator(validator: Validator, balance: Gwei) -> bool:
    """
    Check if ``validator`` is partially withdrawable.
    """
    max_effective_balance = get_max_effective_balance(validator) // this will be 2048 according to the current written spec
    has_max_effective_balance = validator.effective_balance == max_effective_balance  // this will be false untill effective balance is  increased till 2048
    has_excess_balance = balance > max_effective_balance  # [Modified in Electra:EIP7251]
    return (
        has_execution_withdrawal_credential(validator)  # [Modified in Electra:EIP7251]
        and has_max_effective_balance
        and has_excess_balance
    )
@mkalinin
Copy link
Collaborator

mkalinin commented Oct 3, 2024

There are withdrawal requests mechanism allowing to do partial withdrawals on demand for validators which effective balance satisfies: 32 ETH < EB <= 2048 ETH, you can take a look at process_withdrawal_request for more details

@ricardolyn
Copy link

Following up with an additional question @mkalinin, is there a plan to introduce support for a lower top limit value below 2048 per validator, to replicate the existing mechanism of automatic partial withdrawals when the effective balance exceeds 32 ETH?
For example, this would enable validators to set a ceiling balance below 2048ETH and receive any excess automatically.

I assume get_max_effective_balance function would need to consider that.

@ethereum ethereum deleted a comment from Scutua Oct 5, 2024
@mkalinin
Copy link
Collaborator

mkalinin commented Oct 5, 2024

There is no plan to include custom EB feature in Electra. It can happen in one of the next hard forks if there is enough desire for having it and someone champions it.

@ppopth
Copy link
Member

ppopth commented Oct 16, 2024

Following up with an additional question @mkalinin, is there a plan to introduce support for a lower top limit value below 2048 per validator, to replicate the existing mechanism of automatic partial withdrawals when the effective balance exceeds 32 ETH?

@ricardolyn Why do you want to do that? I feel like there is no reason to do that.

to replicate the existing mechanism of automatic partial withdrawals when the effective balance exceeds 32 ETH?

In fact, you can still do that by keeping the eth1 withdrawal credential instead of switching to the compound one, right?

@ricardolyn
Copy link

@ricardolyn Why do you want to do that? I feel like there is no reason to do that.

exactly per my comment above to replicate the existing mechanism of automatic partial withdrawals when the effective balance exceeds X ETH, but just replacing the 32 with X where 32 <= X <= 2048.

@Scutua
Copy link

Scutua commented Oct 16, 2024 via email

@rolfyone
Copy link
Contributor

rolfyone commented Oct 17, 2024

exactly per my comment above to replicate the existing mechanism of automatic partial withdrawals when the effective balance exceeds X ETH, but just replacing the 32 with X where 32 <= X <= 2048.

This is the custom ceiling @mkalinin was talking about. What was accepted for electra was to add a max of 2048, but not the ability to set a custom value as a maximum.

The solution would be to manually initiate a partial withdrawal periodically, which admittedly does differ from the sweep in that you're paying gas, but the custom ceiling was a fairly complicated change. Potentially this could be implemented in the future, but not in electra.

It should also be noted, because you can issue your own withdrawal at any point for any balance above 32 ETH, it's not actually "locked" as the initial description indicates, it's just not automatically withdrawn.

@Goonte
Copy link

Goonte commented Oct 24, 2024

We are ending another year and still I am waiting for payout to all my wallet It looks like only you guys will be having a great Christmas and a Big Bonus will I'll be having dry bread and water thanks a lot

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

No branches or pull requests

7 participants