Skip to content

In protocol CL triggerable consolidation#12

Closed
mkalinin wants to merge 5 commits into
michaelneuder:maxeb-pyspec-min-viablefrom
mkalinin:cl-consolidation
Closed

In protocol CL triggerable consolidation#12
mkalinin wants to merge 5 commits into
michaelneuder:maxeb-pyspec-min-viablefrom
mkalinin:cl-consolidation

Conversation

@mkalinin
Copy link
Copy Markdown
Collaborator

Originated from and incorporates discussions around the following PR:

The key difference to the original proposal is allowing consolidation only when withdrawal credentials of the source and the target have the same Execution layer withdrawal address. This allows to avoid dependency on EL and process consolidation on the Consensus layer.

Although, this change restricts consolidation space it significantly simplify the mechanics and can become an acceptable middle ground between the protocol and engineering complexity and consolidation capabilities.

Full change set:

  • New Consolidation beacon chain operation:
    • Valid if:
      • Source and target are active and not yet exited
      • Source and target have either ETH1_ or COMPOUNDING_ credential prefix
      • Source and target have the same withdrawal address
      • The operation is signed by both the source and the target
    • Yields creation of PendingConsolidation that is appended to the pending_consolidations queue, PendingConsolidation keeps an epoch during which it was created
  • On epoch processing:
    • Apply pending consolidations when they are finalized:
    • Move active balance to the target, leave excess balance to be withdrawn
  • On proposer and attester slashing:
    • Resolve every validator index to the final consolidated_to index in both proposer and attester slashing processing, then apply slashing to consolidated validators
    • Finalizing consolidation and resolving to consolidated_to allows to slash target even in the case when a conflicting vote has been submitted by the source, more on this below:

telegram-cloud-photo-size-4-6012567573310325529-y

Finalizing consolidation changes the above to the following:

  1. val n -> m consolidation initiated on A, B has not observed such consolidation
  2. consider B finalized: A has to finalize a conflicting checkpoint to finish val m -> n consolidation, finalizing A is already slashable on B
  3. consider A finalized: A becomes canonical, val n on B and val m on A vote on conflicting checkpoints and val m can be slashed on A because slashing processing resolves n -> m

Comment thread specs/_features/maxeb_increase/capella.py Outdated
Comment thread specs/_features/maxeb_increase/capella.py Outdated
Comment thread specs/_features/maxeb_increase/capella.py Outdated
Comment thread specs/_features/maxeb_increase/capella.py Outdated
Comment thread specs/_features/maxeb_increase/capella.py Outdated
Comment thread specs/_features/maxeb_increase/capella.py Outdated
mkalinin and others added 2 commits December 15, 2023 14:44
Co-authored-by: fradamt <104826920+fradamt@users.noreply.github.com>
Co-authored-by: Roberto Saltini <38655434+saltiniroberto@users.noreply.github.com>
Comment thread specs/_features/maxeb_increase/capella.py
Comment thread specs/_features/maxeb_increase/capella.py
Comment on lines +1711 to +1712
if source_validator.exit_epoch > current_epoch:
source_validator.exit_epoch = current_epoch
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if source_validator.exit_epoch > current_epoch:
source_validator.exit_epoch = current_epoch
source_validator.exit_epoch = min(source_validator.exit_epoch, compute_activation_exit_epoch(current_epoch))

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Comment thread specs/_features/maxeb_increase/capella.py Outdated
@dapplion
Copy link
Copy Markdown
Collaborator

dapplion commented Jan 9, 2024

Overall the approach looks solid! Aggregating the source and targets keys for the same Consolidation message is a neat trick

This allows to avoid dependency on EL and process consolidation on the Consensus layer.

I want to note that the trade-off is not free. Now you need a way to propagate the Consolidation message to the proposer, so we need a new gossip topic with poor DoS properties + beacon API routes. Doable, but definitely something to consider.

@fradamt
Copy link
Copy Markdown
Collaborator

fradamt commented Jan 9, 2024

I want to note that the trade-off is not free. Now you need a way to propagate the Consolidation message to the proposer, so we need a new gossip topic with poor DoS properties + beacon API routes. Doable, but definitely something to consider.

Given that consolidation is mainly useful for pools, and not something you need to be doing all the time anyway, we could perhaps consider not having a gossip topic, and just having each pool rely on its own proposers to get the messages on chain

@dapplion
Copy link
Copy Markdown
Collaborator

dapplion commented Jan 9, 2024

I want to note that the trade-off is not free. Now you need a way to propagate the Consolidation message to the proposer, so we need a new gossip topic with poor DoS properties + beacon API routes. Doable, but definitely something to consider.

Given that consolidation is mainly useful for pools, and not something you need to be doing all the time anyway, we could perhaps consider not having a gossip topic, and just having each pool rely on its own proposers to get the messages on chain

That could fly maybe, with 900k vals 1 index proposes every 125 days, 32 indexes every 3.9 days. We would be putting some min expected consolidation size, or forcing smaller player to coordinate off-protocol with bigger ones

@mkalinin
Copy link
Copy Markdown
Collaborator Author

Closing in favour of #14

@mkalinin mkalinin closed this Jan 19, 2024
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.

4 participants