-
Notifications
You must be signed in to change notification settings - Fork 246
refactor(syncing): loosen da start height check #2925
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
Conversation
|
The latest Buf updates on your PR. Results from workflow CI / buf-check (pull_request).
|
Summary of ChangesHello @julienrbrt, 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 refactors a critical state initialization check within the syncing mechanism. The modification addresses an edge case where a node's data availability height could be zero, which is a valid scenario for nodes starting from a sequencer. By loosening this check, the system avoids an unnecessary error, ensuring correct and robust state synchronization for various node configurations. Highlights
Using Gemini Code AssistThe 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
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 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
|
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 modifies the syncer's state initialization to relax the check on the DA start height. The change allows state.DAHeight to be zero, which accommodates nodes starting from a sequencer state. The logic is sound. My review includes a minor suggestion to correct a typo in an inline comment to improve code clarity.
| } | ||
| } | ||
| if state.DAHeight < s.genesis.DAStartHeight { | ||
| if state.DAHeight != 0 && state.DAHeight < s.genesis.DAStartHeight { // state.DaHeight can be 0 if the node starts from sequencer state |
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.
There's a typo in the comment. state.DaHeight should be state.DAHeight to match the field name in the code and improve clarity.
| if state.DAHeight != 0 && state.DAHeight < s.genesis.DAStartHeight { // state.DaHeight can be 0 if the node starts from sequencer state | |
| if state.DAHeight != 0 && state.DAHeight < s.genesis.DAStartHeight { // state.DAHeight can be 0 if the node starts from sequencer state |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## hotfix-11 #2925 +/- ##
==========================================
Coverage 64.97% 64.97%
==========================================
Files 81 81
Lines 7250 7250
==========================================
Hits 4711 4711
Misses 1998 1998
Partials 541 541
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
<!-- Please read and fill out this form before submitting your PR. Please make sure you have reviewed our contributors guide before submitting your first PR. NOTE: PR titles should follow semantic commits: https://www.conventionalcommits.org/en/v1.0.0/ --> ## Overview <!-- Please provide an explanation of the PR, including the appropriate context, background, goal, and rationale. If there is an issue with this information, please provide a tl;dr and link the issue. Ex: Closes #<issue number> --> upstreams #2925 to main
|
Merging this. We should not forget to tag to https://github.com/evstack/ev-node/tree/hotfix-11 |
Overview