fix: don't filter block messages from low-reputation peers#661
Conversation
Block validation already handles bad blocks safely. Filtering blocks from unhealthy/low-reputation peers prevents catchup when the node is behind, since the only available peers may have low reputation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
🤖 Claude Code Review Status: Complete Current Review: Summary:
|
…tion - Revert server_helpers.go change (split to separate PR bsv-blockchain#661) - Restore accidentally deleted docs/p2p-silent-mode.md - Remove AGENTS.md from tracking (personal config) - Remove batcher design spec and gitignore docs/superpowers/ Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Benchmark Comparison ReportBaseline: Current: Summary
All benchmark results (sec/op)
Threshold: >10% with p < 0.05 | Generated: 2026-06-04 14:12 UTC |
…cks-from-unhealthy-peers
…cks-from-unhealthy-peers
|
…cks-from-unhealthy-peers
…cks-from-unhealthy-peers
…cks-from-unhealthy-peers
…cks-from-unhealthy-peers
…cks-from-unhealthy-peers
Expand the comment to document the block-vs-subtree asymmetry: block announcements trigger catchup, so filtering them from low-reputation peers would stop a node that is behind from ever catching up. Catchup fetches blocks and their subtrees directly over HTTP rather than via the gossip subtree handler, so the reputation filter retained in handleSubtreeTopic does not affect catchup. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
handleBlockTopic must forward a block announcement to the blocks Kafka topic even when the originating peer's reputation is below the unhealthy threshold, otherwise a node that is behind cannot start catchup when its only available peers have low reputation. Pins a registered peer to a reputation of 5.0 (not banned) and asserts the block is published. Verified the test fails when a shouldSkipUnhealthyPeer filter is reintroduced into handleBlockTopic and passes without it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|



Summary
shouldSkipUnhealthyPeerfilter fromhandleBlockTopicin the P2P serviceTest plan
🤖 Generated with Claude Code