Skip to content

[DRAFT] pyspec changes#4

Closed
michaelneuder wants to merge 14 commits into
dev-upstreamfrom
maxeb-upstream
Closed

[DRAFT] pyspec changes#4
michaelneuder wants to merge 14 commits into
dev-upstreamfrom
maxeb-upstream

Conversation

@michaelneuder
Copy link
Copy Markdown
Owner

@michaelneuder michaelneuder commented May 23, 2023

Spec changes associated with https://notes.ethereum.org/@mikeneuder/increase-maxeb, built from https://github.com/ethereum/consensus-specs/blob/dev/docs/docs/new-feature.md.

For analysis on the changes see https://notes.ethereum.org/@fradamt/meb-increase-security

Diff view – #3

Changes:

  1. exit queue rate limiting by stake weight
  2. activation queue rate limiting by stake weight
  3. aggregator changes
  4. limit top ups to 32 eth to avoid by passing activation queue

@michaelneuder michaelneuder changed the title pyspec initial commit [DRAFT] pyspec changes May 30, 2023
Copy link
Copy Markdown

@hwwhww hwwhww left a comment

Choose a reason for hiding this comment

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

If you see an error at "assert FINALIZED_ROOT_INDEX == get_generalized_index(BeaconState, 'finalized_checkpoint', 'root')", it's because:

  • We have to calculate the BeaconState SSZ GeneralizedIndex ahead for light client specs.
  • Your PR inserted new fields in the middle of BeaconState and changed the tree position. That would make FINALIZED_ROOT_INDEX value change in the building stage.

By convention, we only add new fields at the end of an existing Container.

Comment thread specs/_features/maxeb/beacon-chain.md Outdated
Comment thread specs/_features/maxeb/beacon-chain.md
Comment thread specs/_features/maxeb/beacon-chain.md Outdated
# --- MODIFIED --- #
# Increase balance by deposit amount, up to MIN_ACTIVATION_BALANCE
index = ValidatorIndex(validator_pubkeys.index(pubkey))
increase_balance(state, index, min(amount, MIN_ACTIVATION_BALANCE - state.balances[index]))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

  1. If an active validator has a balance above MIN_ACTIVATION_BALANCE and deposits, we can have a negative value for MIN_ACTIVATION_BALANCE - state.balances[index], this will overflow the uint64 that increase_balance takes.

  2. This changes the behavior from the current: "the deposit is useless but it's not lost ETH" to "you just burned your ETH if you deposit twice".

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.

@dapplion
Copy link
Copy Markdown
Collaborator

@dapplion dapplion closed this Mar 26, 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.

5 participants