Skip to content

Conversation

@nflaig
Copy link
Member

@nflaig nflaig commented Dec 22, 2025

No description provided.

@nflaig nflaig requested a review from a team as a code owner December 22, 2025 13:08
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @nflaig, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on refining the handling and validation of execution payload bids and envelopes within the beacon node's gossip network. It introduces a new validation constraint for execution payload bids, refactors the signing root computation for execution-related messages, and includes general code cleanup and typo corrections to enhance clarity and maintainability. These changes contribute to more robust and precise processing of gossip messages.

Highlights

  • New Validation Rule for Execution Payload Bids: A new rejection rule has been implemented for ExecutionPayloadBid messages, ensuring that the executionPayment field is strictly zero. This introduces a new error code, NON_ZERO_EXECUTION_PAYMENT, to enforce this constraint.
  • Refactoring of Execution Payload Signing Logic: The mechanism for computing signing roots for execution-related messages has been updated. A generic getExecutionPayloadSigningRoot function was removed, and a more specific getExecutionPayloadEnvelopeSigningRoot was introduced for ExecutionPayloadEnvelope messages. Additionally, the getExecutionPayloadBidSigningRoot function now explicitly requires the BeaconConfig as a parameter.
  • Type and Code Cleanup: Several files underwent cleanup, including the removal of redundant type aliases, direct usage of gloas types for clarity, simplification of conditional checks (e.g., === undefined to !), and minor typo corrections in comments and metric descriptions.
  • Attestation Error Renaming: The PREMATURELY_INDICATE_PAYLOAD_PRESENT error code within AttestationErrorCode was renamed to PREMATURELY_INDICATED_PAYLOAD_PRESENT to improve grammatical correctness and clarity across the codebase.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a series of changes related to EPBS (Execution Payload Bid Submission) gossip topics, primarily for the 'gloas' feature. The changes include refactoring validation logic, adding a new validation rule for execution payload bids, renaming error codes for clarity, and fixing typos. The refactoring improves code quality by making dependencies more explicit and cleaning up unused code.

My review has identified a potential high-severity issue in executionPayloadBidPool.ts where uint64 bid values are compared as numbers. This could lead to precision loss and incorrect bid comparisons for large values. I've suggested reverting to BigInt for these comparisons to ensure correctness.

Comment on lines +35 to +36
const existingValue = existing.value;
const newValue = value;
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The value field of an ExecutionPayloadBid is a uint64, which can exceed Number.MAX_SAFE_INTEGER. Comparing these values as numbers can lead to precision loss and incorrect behavior, for example, rejecting a higher-value bid. The previous implementation using BigInt() was safer for comparing these potentially large values. Please revert this change to use BigInt for comparison to avoid bugs with high-value bids.

Suggested change
const existingValue = existing.value;
const newValue = value;
const existingValue = BigInt(existing.value);
const newValue = BigInt(value);

Copy link
Member Author

@nflaig nflaig Dec 22, 2025

Choose a reason for hiding this comment

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

the previous implementation converted number to BigInt which doesn't make much sense since precision is already lost at this point

but either way, this is safe, since the bid value cannot exceed builder balance which is limited by the ETH supply which does not exceed Number.MAX_SAFE_INTEGER

if (builderBalance < bid.value + MIN_ACTIVATION_BALANCE) {


// [REJECT] `bid.builder_index` is a valid, active, and non-slashed builder
// index.
// [REJECT] `bid.builder_index` is a valid, active, and non-slashed builder index.
Copy link
Member Author

@nflaig nflaig Dec 22, 2025

Choose a reason for hiding this comment

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

I don't think it makes sense to follow spec formatting as it might change at any point if linter rules are adapted, we should rather optimize for readability here

Copy link
Member

@wemeetagain wemeetagain left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@ensi321 ensi321 left a comment

Choose a reason for hiding this comment

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

Thanks!

@ensi321 ensi321 merged commit b8492bf into nc/epbs-p2p Dec 22, 2025
28 of 34 checks passed
@ensi321 ensi321 deleted the nflaig/review-8616 branch December 22, 2025 22:17
@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.08%. Comparing base (6b57579) to head (07caa48).
⚠️ Report is 1 commits behind head on nc/epbs-p2p.

Additional details and impacted files
@@             Coverage Diff              @@
##           nc/epbs-p2p    #8715   +/-   ##
============================================
  Coverage        52.08%   52.08%           
============================================
  Files              848      848           
  Lines            64754    64754           
  Branches          4768     4768           
============================================
  Hits             33725    33725           
  Misses           30960    30960           
  Partials            69       69           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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