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

Add max epoch activation churn limit (EIP-7514) to Deneb #3499

Merged
merged 15 commits into from
Sep 18, 2023

Conversation

dapplion
Copy link
Collaborator

@dapplion dapplion commented Sep 12, 2023

Alternative to #3448 applying a max only to inbound churn. Only requires to modify a single epoch transition function, so implementation complexity is low.

Note that having different inbound / outbound churn is not a well studied configuration AFAIK. However, inbound and outbound churn are independent problems, as long as both are bounded they don't need to be equal.

TODOs

  • Enable testgen

@hwwhww hwwhww force-pushed the limit-churn-inbound branch from ade1e1b to fd37ffc Compare September 12, 2023 13:37
Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

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

core beacon-chain logic looks good


| Name | Value |
| - | - |
| `MAX_PER_EPOCH_INBOUND_CHURN_LIMIT` | `uint64(12)` (= 12) |
Copy link
Contributor

Choose a reason for hiding this comment

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

would like to examine lower values here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I projected different levels of ETH staked for each constant and activation time. ethereum/EIPs#7668

What other reasoning do you propose to inform the decision for a specific lower value? Lower values will increase the effectiveness of this feature, but may raise more fairness concerns. I haven't found a strong framework to inform the decision of a specific value

specs/_features/eip7668/beacon_chain.md Outdated Show resolved Hide resolved
specs/_features/eip7668/beacon_chain.md Outdated Show resolved Hide resolved
specs/_features/eip7668/beacon_chain.md Outdated Show resolved Hide resolved
@realbigsean
Copy link
Contributor

I like this change a lot more, I think exits should continue to scale with the validator set size. If we choose not to go with this for whatever reason, I would be in favor of still implementing this in the next fork. These are some charts showing the rate of new deposits per epoch over different time spans. I think 8 is actually a good number based on these. I think it's pretty likely the activation queue empties by the time deneb is deployed and at that point the most immediate downside of a decrease in churn limit (increased queue times) isn't felt.

monthly_plot
weekly_plot
daily_plot

@dapplion dapplion changed the title Add limit inbound churn Add max epoch activation churn limit (EIP-7514) Sep 14, 2023
@arnetheduck
Copy link
Contributor

No blockers getting this done for Deneb from nimbus' side

@hwwhww
Copy link
Contributor

hwwhww commented Sep 15, 2023

@dapplion @djrtwo
I've added EIP-7514 into Deneb and checked the testgen. ✅

@hwwhww hwwhww changed the title Add max epoch activation churn limit (EIP-7514) Add max epoch activation churn limit (EIP-7514) to Deneb Sep 15, 2023
@hwwhww hwwhww mentioned this pull request Sep 15, 2023
5 tasks
configs/mainnet.yaml Outdated Show resolved Hide resolved
configs/minimal.yaml Outdated Show resolved Hide resolved
specs/deneb/beacon-chain.md Outdated Show resolved Hide resolved
specs/deneb/beacon-chain.md Outdated Show resolved Hide resolved

| Name | Value |
| - | - |
| `MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT` | `uint64(2**3)` (= 8) |
Copy link
Contributor

@tbenr tbenr Sep 17, 2023

Choose a reason for hiding this comment

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

just a nit: since this new param is only applied from Deneb, should it be called DENEB_MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT ?

There might be confusion in testnets with a Bellatrix genesis and a MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT set to 1 and you may think that it is immediately applied but you actually have to wait until Deneb

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, but it would break the current code conventions for the new constants/presets/configurations. 🤔

Copy link
Contributor

@tbenr tbenr Sep 18, 2023

Choose a reason for hiding this comment

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

🤔 ... It actually should be MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT_DENEB, similar to
MAX_REQUEST_BLOCKS_DENEB, even if the phase0 counterpart MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT won't exist.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see your point, but we do have MAX_REQUEST_BLOCKS in phase0! Adding a suffix to a new preset breaks the current code conventions.

@hwwhww
Copy link
Contributor

hwwhww commented Sep 18, 2023

Merging the PR now for cooking the release.

@hwwhww hwwhww merged commit c88cf05 into ethereum:dev Sep 18, 2023
13 checks passed
etan-status added a commit to status-im/nimbus-eth2 that referenced this pull request Sep 18, 2023
etan-status added a commit to status-im/nimbus-eth2 that referenced this pull request Sep 20, 2023
* implement EIP-7514 for Deneb: Add Max Epoch Churn Limit

Cap activations per epoch according to EIP-7514:

- https://eips.ethereum.org/EIPS/eip-7514
- ethereum/consensus-specs#3499

* apply proposer boost to first block in case of equivocation

Implement spec changes to fork choice; this only affects equivocation
when multiple blocks are signed for the same slot. Regular operation
is not changed.

- ethereum/consensus-specs#3352

* bump test vectors to v1.4.0-beta.2-hotfix

---------

Co-authored-by: tersec <tersec@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deneb was called: eip-4844
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants