berachain / beacon-kit

A modular framework for building EVM consensus clients ⛵️✨
https://berachain.com
Other
170 stars 122 forks source link

feat(withdrawals): Fixed withdrawal for EVM inflation per block #2158

Open calbera opened 1 day ago

calbera commented 1 day ago

Side Effect:

MaxWithdrawalsPerPayload is 16 according the ETH 2.0 spec. Choosing to enforce the first withdrawal as EVM inflation withdrawal implies only 15 validator withdrawals per block are allowed at most.

TODO:

coderabbitai[bot] commented 1 day ago

[!IMPORTANT]

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , please review it.` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
codecov[bot] commented 1 day ago

Codecov Report

Attention: Patch coverage is 47.22222% with 38 lines in your changes missing coverage. Please review.

Project coverage is 26.36%. Comparing base (8a04173) to head (ddb711e).

Files with missing lines Patch % Lines
mod/node-core/pkg/components/chain_spec.go 0.00% 11 Missing :warning:
...ate-transition/pkg/core/state_processor_staking.go 60.71% 7 Missing and 4 partials :warning:
mod/chain-spec/pkg/chain/chain_spec.go 41.66% 6 Missing and 1 partial :warning:
mod/node-core/pkg/components/dispatcher.go 0.00% 3 Missing :warning:
mod/primitives/pkg/common/execution.go 0.00% 2 Missing :warning:
mod/state-transition/pkg/core/state/statedb.go 83.33% 1 Missing and 1 partial :warning:
mod/config/pkg/spec/boonet.go 0.00% 1 Missing :warning:
mod/config/pkg/spec/devnet.go 0.00% 1 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/berachain/beacon-kit/pull/2158/graphs/tree.svg?width=650&height=150&src=pr&token=0l5iJ3ZbzV&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=berachain)](https://app.codecov.io/gh/berachain/beacon-kit/pull/2158?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=berachain) ```diff @@ Coverage Diff @@ ## main #2158 +/- ## ========================================== + Coverage 26.28% 26.36% +0.07% ========================================== Files 360 360 Lines 16243 16278 +35 Branches 12 12 ========================================== + Hits 4270 4292 +22 - Misses 11705 11715 +10 - Partials 268 271 +3 ``` | [Files with missing lines](https://app.codecov.io/gh/berachain/beacon-kit/pull/2158?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=berachain) | Coverage Δ | | |---|---|---| | [mod/config/pkg/spec/betnet.go](https://app.codecov.io/gh/berachain/beacon-kit/pull/2158?src=pr&el=tree&filepath=mod%2Fconfig%2Fpkg%2Fspec%2Fbetnet.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=berachain#diff-bW9kL2NvbmZpZy9wa2cvc3BlYy9iZXRuZXQuZ28=) | `100.00% <100.00%> (ø)` | | | [mod/config/pkg/spec/testnet.go](https://app.codecov.io/gh/berachain/beacon-kit/pull/2158?src=pr&el=tree&filepath=mod%2Fconfig%2Fpkg%2Fspec%2Ftestnet.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=berachain#diff-bW9kL2NvbmZpZy9wa2cvc3BlYy90ZXN0bmV0Lmdv) | `100.00% <100.00%> (ø)` | | | [mod/config/pkg/spec/boonet.go](https://app.codecov.io/gh/berachain/beacon-kit/pull/2158?src=pr&el=tree&filepath=mod%2Fconfig%2Fpkg%2Fspec%2Fboonet.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=berachain#diff-bW9kL2NvbmZpZy9wa2cvc3BlYy9ib29uZXQuZ28=) | `0.00% <0.00%> (ø)` | | | [mod/config/pkg/spec/devnet.go](https://app.codecov.io/gh/berachain/beacon-kit/pull/2158?src=pr&el=tree&filepath=mod%2Fconfig%2Fpkg%2Fspec%2Fdevnet.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=berachain#diff-bW9kL2NvbmZpZy9wa2cvc3BlYy9kZXZuZXQuZ28=) | `0.00% <0.00%> (ø)` | | | [mod/primitives/pkg/common/execution.go](https://app.codecov.io/gh/berachain/beacon-kit/pull/2158?src=pr&el=tree&filepath=mod%2Fprimitives%2Fpkg%2Fcommon%2Fexecution.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=berachain#diff-bW9kL3ByaW1pdGl2ZXMvcGtnL2NvbW1vbi9leGVjdXRpb24uZ28=) | `8.51% <0.00%> (-0.38%)` | :arrow_down: | | [mod/state-transition/pkg/core/state/statedb.go](https://app.codecov.io/gh/berachain/beacon-kit/pull/2158?src=pr&el=tree&filepath=mod%2Fstate-transition%2Fpkg%2Fcore%2Fstate%2Fstatedb.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=berachain#diff-bW9kL3N0YXRlLXRyYW5zaXRpb24vcGtnL2NvcmUvc3RhdGUvc3RhdGVkYi5nbw==) | `43.56% <83.33%> (+1.68%)` | :arrow_up: | | [mod/node-core/pkg/components/dispatcher.go](https://app.codecov.io/gh/berachain/beacon-kit/pull/2158?src=pr&el=tree&filepath=mod%2Fnode-core%2Fpkg%2Fcomponents%2Fdispatcher.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=berachain#diff-bW9kL25vZGUtY29yZS9wa2cvY29tcG9uZW50cy9kaXNwYXRjaGVyLmdv) | `0.00% <0.00%> (ø)` | | | [mod/chain-spec/pkg/chain/chain\_spec.go](https://app.codecov.io/gh/berachain/beacon-kit/pull/2158?src=pr&el=tree&filepath=mod%2Fchain-spec%2Fpkg%2Fchain%2Fchain_spec.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=berachain#diff-bW9kL2NoYWluLXNwZWMvcGtnL2NoYWluL2NoYWluX3NwZWMuZ28=) | `17.04% <41.66%> (+4.22%)` | :arrow_up: | | [mod/node-core/pkg/components/chain\_spec.go](https://app.codecov.io/gh/berachain/beacon-kit/pull/2158?src=pr&el=tree&filepath=mod%2Fnode-core%2Fpkg%2Fcomponents%2Fchain_spec.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=berachain#diff-bW9kL25vZGUtY29yZS9wa2cvY29tcG9uZW50cy9jaGFpbl9zcGVjLmdv) | `0.00% <0.00%> (ø)` | | | [...ate-transition/pkg/core/state\_processor\_staking.go](https://app.codecov.io/gh/berachain/beacon-kit/pull/2158?src=pr&el=tree&filepath=mod%2Fstate-transition%2Fpkg%2Fcore%2Fstate_processor_staking.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=berachain#diff-bW9kL3N0YXRlLXRyYW5zaXRpb24vcGtnL2NvcmUvc3RhdGVfcHJvY2Vzc29yX3N0YWtpbmcuZ28=) | `56.50% <60.71%> (+1.71%)` | :arrow_up: |