Skip to content

Send not_found for unservable get_data. - #7

Closed
echennells wants to merge 1 commit into
masterfrom
ech99-send-not-found
Closed

Send not_found for unservable get_data.#7
echennells wants to merge 1 commit into
masterfrom
ech99-send-not-found

Conversation

@echennells

@echennells echennells commented Aug 25, 2026

Copy link
Copy Markdown
Owner

The node stops the channel when a peer requests a block or transaction that it cannot serve. bitcoind replies notfound and stays connected. Implements libbitcoin#986.

The node now replies and resumes the send loop at four sites: a hash that resolves to no header, a pruned block, a block that cannot be read from the archive, and an absent transaction. Each reply is sent from the send completion handler, as a block is, so nothing is produced until the prior write completes.

The hash that resolves to no header is tested first, because the checkpoint height query faults the store on a terminal link. Such a hash is ordinary peer input, so the query is no longer reached with one.

protocol_block_out_106 is attached without a version condition, so its peer may be below bip37, where not_found is undefined. It captures the negotiated level at construction and retains the existing stop below that level. protocol_transaction_out_106 is attached only above bip37, so the level is asserted there.

A request is already bounded by max_inventory at deserialization, so no additional limit is imposed.

Four cases cover the block sites, including a peer below bip37. The transaction site awaits a fixture that negotiates relay.

@echennells echennells changed the title Send not_found for unservable get_data instead of stopping the channel. Send not_found for unservable get_data. Aug 25, 2026
@echennells
echennells force-pushed the ech99-send-not-found branch from a5e5984 to fbb8ad2 Compare August 25, 2026 00:12
@echennells echennells closed this Aug 25, 2026
@echennells echennells reopened this Aug 25, 2026
@echennells
echennells force-pushed the ech99-send-not-found branch 3 times, most recently from 59915ef to fc7aff3 Compare August 25, 2026 18:34
@echennells
echennells changed the base branch from master to relay-handshake-argument August 25, 2026 20:32
@echennells
echennells force-pushed the ech99-send-not-found branch from fc7aff3 to 1690c41 Compare August 25, 2026 20:32
@echennells
echennells changed the base branch from relay-handshake-argument to master August 25, 2026 20:34
@echennells
echennells force-pushed the ech99-send-not-found branch 4 times, most recently from ed32c58 to ffa2c08 Compare August 26, 2026 21:05
@echennells

Copy link
Copy Markdown
Owner Author

Closing — this branch is now the upstream PR.

ech99-send-not-found is the head branch of libbitcoin#1106. It was force-pushed on 2026-09-08 to carry the reworked implementation (0f6b385e3), so this fork PR and #9 now point at the same commit, and the title here describes the superseded design. Track it at libbitcoin#1106.

@echennells echennells closed this Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant