-
-
Notifications
You must be signed in to change notification settings - Fork 410
fix: small fixes and e2e test fix #8420
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
fix: small fixes and e2e test fix #8420
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @wemeetagain, 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 introduces several targeted fixes and a significant refactoring to enhance the beacon node's data availability sampling (DAS) capabilities and improve the robustness of its unknown block synchronization. The changes clarify how data availability columns are tracked per peer, refine the conditions under which peers are excluded during sync operations, and ensure the accuracy of related end-to-end tests. These adjustments are crucial for the upcoming #8200 merge, contributing to a more stable and correct implementation of the Fulu upgrade.
Highlights
- Refactor
custodyGroupstocustodyColumns: A widespread renaming and logical adjustment fromcustodyGroupstocustodyColumnsto accurately reflect the per-peer tracking of data availability columns, impacting network events, peer management, and sync logic. - Refined Peer Exclusion in Unknown Block Sync: Modified the
BlockInputSyncmechanism to only exclude peers upon encountering most errors during data fetching, specifically avoiding exclusion forREQUEST_RATE_LIMITEDandREQUEST_TIMEOUTerrors, improving sync resilience. - E2E Test Fix for Unknown Block Sync: Corrected an end-to-end test by using the appropriate
BlockInputColumnsclass for block input creation, ensuring the test accurately simulates block processing in the context of data availability.
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
-
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. ↩
There was a problem hiding this 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 several small fixes and improvements. The primary change is the renaming of custodyGroups to custodyColumns across the codebase for better clarity and correctness, especially where per-peer data is tracked for sync purposes. Another significant improvement is in the unknown block sync logic, where peers are no longer unilaterally excluded after a data fetch, but only upon specific, non-transient errors. This should improve sync reliability. The e2e test for unknown block sync is also fixed to use the correct block input type for the fulu fork.
Overall, the changes are positive and improve code quality and robustness. I've found one minor performance improvement opportunity in peerManager.ts to avoid a redundant computation.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## mkeil/refactor-block-input-on-unstable #8420 +/- ##
==========================================================================
- Coverage 54.34% 54.34% -0.01%
==========================================================================
Files 853 853
Lines 64112 64122 +10
Branches 4788 4789 +1
==========================================================================
+ Hits 34840 34844 +4
- Misses 29201 29207 +6
Partials 71 71 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!! 🚀
Partially resolves #8130 . There is still some usage of custodyGroups on the network thread but that might be ok. Maybe that is the line where groups and columns is divided. Groups on peer caches on the network thread and columns on the main thread where they are consumed by sync. And conversion happens when the peerConnected event happens. Need to add a peerUpdated event #8424
|
|
||
| const headInput = BlockInputPreData.createFromBlock({ | ||
| block: head, | ||
| const headInput = BlockInputColumns.createFromBlock({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice catch. Was looking for this bug and totally missed that this was the wrong type of blockInput. Your rock sir!!
0d70dde
into
mkeil/refactor-block-input-on-unstable
Motivation
Description
custodyGroupswithcustodyColumnswhere we're tracking per-peer