feat: serve data columns by root for finalized epochs#8250
feat: serve data columns by root for finalized epochs#8250matthewkeil merged 6 commits intounstablefrom
Conversation
There was a problem hiding this comment.
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 introduces a new feature that allows the system to serve data columns by root for finalized epochs. Previously, this functionality was limited to non-finalized blocks. The change aligns the system with a new Ethereum consensus specification, enabling clients to request historical data columns. This enhancement improves data accessibility and compliance with updated protocol requirements.
Highlights
- Support for Finalized Epochs: The system can now retrieve data columns for blocks that have been finalized, by looking up their slot in the block archive if they are not in the active fork choice.
- Adjusted Minimum Request Epoch: The calculation for the minimum request epoch has been updated to remove the constraint of the
finalizedEpoch, allowing clients to request data from older, finalized periods. - Dynamic Data Retrieval Strategy: Data column sidecars are now fetched from the appropriate database based on whether the block is non-finalized (using
dataColumnSidecarby block root) or finalized (usingdataColumnSidecarArchiveby slot). - Hex Conversion Utility Update: The utility for converting roots to hex strings was updated to
toRootHexfor consistency and correctness.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| 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 issue 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.
Code Review
This pull request successfully implements the serving of data columns by root for finalized epochs, aligning with the specified spec changes. The logic correctly handles both non-finalized blocks from the fork choice and finalized blocks from the database archive. The code is clean and the changes are logical. I've identified one minor issue regarding a redundant check that appears to be dead code, which could be removed to improve clarity.
packages/beacon-node/src/network/reqresp/handlers/dataColumnSidecarsByRoot.ts
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## unstable #8250 +/- ##
============================================
- Coverage 54.15% 54.14% -0.01%
============================================
Files 849 849
Lines 63991 63996 +5
Branches 4852 4851 -1
============================================
Hits 34652 34652
- Misses 29262 29267 +5
Partials 77 77 🚀 New features to boost your workflow:
|
Performance Report✔️ no performance regression detected Full benchmark results
|
packages/beacon-node/src/network/reqresp/handlers/dataColumnSidecarsByRoot.ts
Outdated
Show resolved
Hide resolved
|
🎉 This PR is included in v1.34.0 🎉 |
Motivation
As per spec ethereum/consensus-specs#4394 we should be able to serve data columns by root for finalized epochs.
Description
Serve data columns by root for finalized epochs
Closes #7960