net: serve MSG_BLOCK by stripping witnesses in place

bitcoin/bitcoin: PR #36548

1 suggestion

Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive for their assessments.

Optional improvements

Link

[suggestion] · Signet MSG_BLOCK fallback lacks serving coverage

If the Signet exclusion is retained, the new regtest-only serving tests cannot catch disk-backed Signet MSG_BLOCK requests being routed to the non-Signet reader.

Location: src/net_processing.cpp:2647 (head).

Details and suggested fix

feature_signet.py checks block submission rather than getdata. After node 2 accepts the pregenerated blocks, connect a P2P peer, request an older, uncached non-genesis block with MSG_BLOCK, and compare the reply with serialize(with_witness=False). Cache hits bypass the disk reader, and genesis skips solution validation. This exercises the retained fallback and would catch a reject-all implementation or an Assume abort in a Debug build.

A successful reply alone cannot detect a release-build bypass of the solution check. Covering that check requires a more involved case that edits the obfuscated block file to corrupt only the stored solution bytes, preserves the indexed header and transaction encoding, and verifies that the peer disconnects without receiving a block.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.