fix(legacy): remove subtree notification listener causing tx re-broadcasts#735
Merged
Merged
Conversation
…ll txs after each block The subtree notification handler was re-announcing every transaction in block assembly to legacy peers whenever a new block arrived, because block assembly reorganizes remaining txs into new subtrees and fires subtree notifications. The txmeta Kafka path already handles all tx announcements correctly without this re-broadcast problem.
Contributor
|
🤖 Claude Code Review Status: Complete No issues found. The changes are clean and correct:
The fix correctly addresses the re-announcement issue by removing the redundant listener while preserving the primary Kafka-based announcement path. |
icellan
approved these changes
Apr 21, 2026
|
Contributor
Benchmark Comparison ReportBaseline: Current: Summary
All benchmark results (sec/op)
Threshold: >10% with p < 0.05 | Generated: 2026-04-21 13:52 UTC |
5 tasks
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.



Summary
Context
The subtree listener was added in
5d00b079(March 2025) as a redundant announcement path alongside Kafka, relying on the batcher's 1-minute dedup window. However, since reorg'd subtrees contain the same txs under new subtree hashes, and most txs are older than 1 minute, the dedup didn't prevent re-announces.Subtree notifications still fire normally for P2P service (teranode-to-teranode subtree propagation) — only legacy stops listening.
Test plan
TestProcessTXmetaBatchMessagetests pass (Kafka path unchanged)