Skip to content

Conversation

@julienrbrt
Copy link
Member

@julienrbrt julienrbrt commented Oct 6, 2025

Overview

The syncing component was not saving header and event to the goheader (p2p) store.
Which was an issue when peers were asking for heights.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2025

The latest Buf updates on your PR. Results from workflow CI and Release / buf-check (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped✅ passed✅ passedOct 13, 2025, 12:20 PM

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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 resolves an issue where the node's syncing component failed to broadcast newly acquired headers and data to the peer-to-peer network. By introducing a standardized Broadcaster interface and integrating its functionality into the syncer's block processing logic, the changes ensure that all successfully synced blocks are properly propagated across the network, improving network consistency and data availability for other nodes.

Highlights

  • Introduced Broadcaster Interface: A new generic Broadcaster interface was added to abstract P2P broadcasting and header store access, standardizing how headers and data are propagated.
  • Enabled P2P Broadcasting in Syncer: The syncing component now actively broadcasts newly processed headers and data to the P2P network, ensuring that all synced blocks are propagated.
  • Refactored Component Dependencies: Various components, including Syncer and Executor, along with their constructors, were updated to depend on the new Broadcaster interface, replacing direct goheader.Store implementations or internal broadcaster types.
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 correctly refactors the broadcasting logic by introducing a common Broadcaster interface and moving it to a shared package. This change also enables broadcasting of headers and data from sync nodes, which was the main goal.

I've found one critical issue where the wrong broadcaster was used to get the data height, which would break data syncing. I've also left a medium-severity comment regarding duplicated test mocks, which could be refactored to improve maintainability.

Once the critical issue is addressed, this PR should be good to go.

@claude

This comment was marked as outdated.

@claude

This comment was marked as outdated.

@julienrbrt julienrbrt marked this pull request as draft October 6, 2025 15:08
@julienrbrt julienrbrt changed the title fix(block/syncing): broadcast on sync nodes fix(block/syncing): save data to p2p stores Oct 6, 2025
@julienrbrt julienrbrt marked this pull request as ready for review October 6, 2025 15:36
@codecov
Copy link

codecov bot commented Oct 6, 2025

Codecov Report

❌ Patch coverage is 21.87500% with 100 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.39%. Comparing base (f09e382) to head (1a20eb6).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
block/internal/common/broadcaster_mock.go 0.00% 69 Missing ⚠️
block/internal/syncing/p2p_handler.go 50.00% 19 Missing and 2 partials ⚠️
block/internal/syncing/syncer.go 25.00% 7 Missing and 2 partials ⚠️
pkg/sync/sync_service.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2736      +/-   ##
==========================================
- Coverage   62.08%   61.39%   -0.70%     
==========================================
  Files          80       81       +1     
  Lines        8459     8573     +114     
==========================================
+ Hits         5252     5263      +11     
- Misses       2715     2816     +101     
- Partials      492      494       +2     
Flag Coverage Δ
combined 61.39% <21.87%> (-0.70%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@claude

This comment was marked as resolved.

@claude

This comment was marked as resolved.

@claude

This comment was marked as resolved.

tac0turtle pushed a commit that referenced this pull request Oct 8, 2025
<!--
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

With the fix from #2736, the
`--skip-p2p-stores` flag isn't needed.
Additionally, this bump go-header to the latest changes from
celestiaorg/go-header#347

<!-- 
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>
-->
github-merge-queue bot pushed a commit that referenced this pull request Oct 9, 2025
…ze (#2747)

<!--
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

Extract fixes from #2736 to make
PR clearer:

- Remove unused arguments from da retreiver + p2p retriever ->
improvement
- Reuse function for empty data hash, and retrieve last data hash
directly in process loop, so it happens for both da and p2p (was only
p2p before) --> bug fix
- Send p2p retrieved info directly to cache instead of batching them ->
improvement

<!-- 
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>
-->
@julienrbrt julienrbrt closed this Oct 13, 2025
@github-project-automation github-project-automation bot moved this to Done in Evolve Oct 13, 2025
@tac0turtle tac0turtle reopened this Oct 13, 2025
Copy link
Member Author

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

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

LGTM

@tac0turtle tac0turtle merged commit 0dc7b27 into main Oct 13, 2025
28 of 29 checks passed
@tac0turtle tac0turtle deleted the julien/sync-p2p branch October 13, 2025 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants