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

eip7251: Do not change creds type on consolidation #4020

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

mkalinin
Copy link
Collaborator

This PR introduces the following changes to the consolidation request processing:

  1. Disallows consolidations if the target doesn’t have 0x02 creds
  2. Does not switch to compounding when consolidation happens

Which effectively changes consolidation flow in a way that stakers will have to do it in two steps:

  1. Switch the target to compounding creds via switch to compounding request (consolidation with source==target)
  2. Consolidate the source balance to the target

This change disallows an unauthorized update of withdrawal credential type and simplifies the protocol by trading off consolidation UX. To alleviate the UX downgrade this PR increases the MAX consolidation requests per block to 2 which allows to accommodate creds switch and consolidation in a single block.

Supplants #4006

ToDo

  • Change MAX parameter in the Consolidation Smart Contract
  • Update tests

@mkalinin mkalinin changed the title eip7251: Do no creds change on consolidation eip7251: Do no creds type change on consolidation Nov 25, 2024
@mkalinin mkalinin changed the title eip7251: Do no creds type change on consolidation eip7251: Do not change creds type on consolidation Nov 25, 2024
@fradamt
Copy link
Contributor

fradamt commented Nov 25, 2024

Lgtm.

Imo the UX impact is quite limited and it makes sense to get rid of this strange behavior, even if it's not really an attack vector.

@ralexstokes
Copy link
Member

I like that this simplifies the complexity of the state transition and general validator lifecycle state graph

it also handles the unauthorized consolidation issue

will need to fix tests but I think we should 🚢 it

@lucassaldanha
Copy link
Contributor

I agree that this is not a great UX but simplify the complexity of state transition. It also prevents anyone from causing a permanent side-effect on someone else's validator (0x01 -> 0x02 unwanted creds change).

@fradamt
Copy link
Contributor

fradamt commented Nov 26, 2024

Something else to mention about the impact is that the primary use case is staking pools consolidating, in which case needing to call the contract 63 times versus 64 times doesn't really make any difference

@rolfyone
Copy link
Contributor

LGTM

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.

5 participants