fix(eth/fetcher): correct propagated block broadcast handling#2472
Open
gzliudan wants to merge 5 commits into
Open
fix(eth/fetcher): correct propagated block broadcast handling#2472gzliudan wants to merge 5 commits into
gzliudan wants to merge 5 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
gzliudan
requested review from
AnilChinchawale,
anunay-xin,
benjamin202410,
liam-lai and
wanwiset25
July 17, 2026 15:16
gzliudan
force-pushed
the
fix-fetcher-insert
branch
2 times, most recently
from
July 17, 2026 16:00
16f4e17 to
940d9bd
Compare
gzliudan
force-pushed
the
fix-fetcher-insert
branch
3 times, most recently
from
July 18, 2026 00:43
2f78bbf to
2db3d4d
Compare
gzliudan
force-pushed
the
fix-fetcher-insert
branch
from
July 18, 2026 01:08
2db3d4d to
438e1a0
Compare
wanwiset25
approved these changes
Jul 19, 2026
Move propagation and announcement timer updates into the branches that actually broadcast blocks, so skipped broadcasts do not record outbound timing.
Announce fast-broadcast blocks after successful import so peers can receive the hash notification and outbound announce timing reflects actual sends.
Reuse the M2 state to drive post-import broadcast behavior and avoid carrying a separate fast-broadcast flag through header retry flow.
gzliudan
force-pushed
the
fix-fetcher-insert
branch
from
July 19, 2026 11:11
438e1a0 to
2cac6fe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Summary
Fix propagated block broadcast handling in the fetcher so outbound propagation metrics are recorded only when a send actually happens, and imported fast-broadcast blocks are announced after successful import.
This also simplifies the post-import M2 broadcast state by reusing the M2 detection result instead of carrying a separate fast-broadcast flag through the header retry path.
Changes
Motivation and Impact
Previously, outbound fetcher timing metrics could be updated even when no broadcast was sent, and fast-broadcast blocks were propagated before import but not announced after import. This made metrics less accurate and skipped the expected hash announcement stage for successfully imported propagated blocks.
With this change, fetcher propagation metrics better reflect actual network sends, and imported propagated blocks follow the intended broadcast/announce flow while preserving the special M2 post-import broadcast behavior.
Types of changes
What types of changes does your code introduce to XDC network?
Put an
✅in the boxes that applyImpacted Components
Which parts of the codebase does this PR touch?
Put an
✅in the boxes that applyChecklist
Put an
✅in the boxes once you have confirmed below actions (or provide reasons on not doing so) that