Adopt architecture principles: track the protocol, not the product #46
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
vnprc/hashpool#46
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Create
docs/ARCHITECTURE_PRINCIPLES.md— the fork's standing policy on upstream tracking, dependency direction, and code shape — so structural decisions are made by rule instead of omission.Primary goals:
protocols/v2(binary_sv2, codec_sv2, noise/framing, channels, roles-logic) tracks named SRI tags and takes cherry-picked correctness/security fixes; the roles diverge freely and are never rebased wholesale.AGENTS.mdso every session starts from them; an unlinked principles doc is a dead letter.Current state and specifics
There is no principles doc.
docs/AGENTS.mddescribes the components but asserts no rules.docs/PLUGIN_ARCHITECTURE_PROPOSAL.mdis a 400-line aspiration whose runtime-plugin machinery (discovery, hot-reload, versioning) is premature for a solo pre-alpha fork; its one artifact — theshare-hookstrait andQuoteDispatchHook— was never wired into the pool (the vec is only everVec::new()), carries a latent prev_hash-instead-of-share-hash bug, and is the exact half-migration the principles should forbid. The upstream relationship is currently decided by omission: nosriremote, frozen snapshot, ~30 commits of custom work on top, last protocol-layer touch two commits after import. Background: the security review (notes/hashpool/security-review-2026-10-15.md) and the strategy discussion that produced "track the protocol, not the product".Draft principles for the doc:
srias a remote pinned to the base tag. Re-sync is triggered by upstream releases touchingprotocols/, not by calendar; take security/correctness/interop fixes in the protocol crates, cherry-pick only; role-level code never merges wholesale.roles/poolet al., the cheaper every future decision (rebase, rewrite, or freeze) stays.ifare the whole feature toggle until then.Scope
In scope: the principles doc;
AGENTS.mdlink plus a one-paragraph pointer replacing any duplicated guidance; a short superseded-banner onPLUGIN_ARCHITECTURE_PROPOSAL.mdpointing at the principles. First concrete application, as its own PR immediately after: deleteroles/pool/src/lib/mining_pool/quote_dispatch_hook.rs, the unusedshare_hooksfield onPool, and theroles-utils/share-hookscrate (nothing else imports it); revisitroles/pool/src/lib/mining_pool/quote_dispatch_hook.rshistory via git when a real second hook appears. Out of scope: any plugin implementation, upstream re-sync execution, and the fixes tracked in vnprc/hashpool#44 and vnprc/hashpool#45.