Remove unwired quote-dispatch hook scaffolding #47

Closed
vnprc-agent wants to merge 0 commits from agent/delete-quote-hook into master
Collaborator

Deletes the never-wired quote-dispatch hook scaffolding: roles/pool/src/lib/mining_pool/quote_dispatch_hook.rs, the unused share_hooks field on Pool (plus its import and Vec::new() init), the share-hooks dependency from the pool manifest, the workspace member entry, and the roles/roles-utils/share-hooks crate. Nothing else imported any of it.

For a running machine nothing changes: the live quote path is and remains the direct dispatcher.submit_quote(...) call on the share-accepted path in message_handler.rs. The deleted hook had never been registered anywhere and credited shares against the previous block hash instead of the share hash, so leaving it invited a wrong-wiring accident during a future refactor; the architecture direction in vnprc/hashpool#46 is one path per concern, unwired alternatives deleted.

Risk

Low. Pure deletion of unreachable code plus two manifest entries; the only behavioral surface is the pool package's own unit tests, which pass unchanged in count minus the hook's self-tests.

Validation

cargo check -p pool_sv2 clean; cargo test -p pool_sv2 --lib 35 passed, 0 failed. Full suite and integration runs not exercised — no behavior was touched. Refs vnprc/hashpool#46 (first application of the one-path-per-concern principle; the principles doc itself lands via the doc PR).

Deletes the never-wired quote-dispatch hook scaffolding: `roles/pool/src/lib/mining_pool/quote_dispatch_hook.rs`, the unused `share_hooks` field on `Pool` (plus its import and `Vec::new()` init), the `share-hooks` dependency from the pool manifest, the workspace member entry, and the `roles/roles-utils/share-hooks` crate. Nothing else imported any of it. For a running machine nothing changes: the live quote path is and remains the direct `dispatcher.submit_quote(...)` call on the share-accepted path in `message_handler.rs`. The deleted hook had never been registered anywhere and credited shares against the previous block hash instead of the share hash, so leaving it invited a wrong-wiring accident during a future refactor; the architecture direction in vnprc/hashpool#46 is one path per concern, unwired alternatives deleted. ## Risk Low. Pure deletion of unreachable code plus two manifest entries; the only behavioral surface is the pool package's own unit tests, which pass unchanged in count minus the hook's self-tests. ## Validation `cargo check -p pool_sv2` clean; `cargo test -p pool_sv2 --lib` 35 passed, 0 failed. Full suite and integration runs not exercised — no behavior was touched. Refs vnprc/hashpool#46 (first application of the one-path-per-concern principle; the principles doc itself lands via the doc PR).
The QuoteDispatchHook, the Pool share_hooks field, and the share-hooks
crate were never referenced by any accept path; the hook also credits
shares by the previous block hash instead of the share hash. Delete all
three. The live quote path in message_handler is unchanged.

Refs vnprc/hashpool#46
vnprc approved these changes 2026-10-18 04:39:10 +01:00
vnprc-agent closed this pull request 2026-10-18 05:04:17 +01:00
Owner

merged

forgejo somehow got stuck with a stale merge flag

merged forgejo somehow got stuck with a stale merge flag

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
vnprc/hashpool!47
No description provided.