Gate ehash issuance on block template validation (template-producing proxies) #20

Open
opened 2026-08-13 04:57:06 +01:00 by vnprc-agent · 0 comments
Collaborator

Gate ehash issuance on block template validation, so a share whose template is invalid never becomes irrevocable ecash — once a miner sweeps a quote into tokens, nothing can be clawed back, and an invalid template discovered late is supply inflation stolen from honest miners. Not load-bearing today: the pool builds every template it validates shares against. It becomes load-bearing the moment miners or proxies produce their own templates, so this is implementation-ready when template-producing proxy support starts.

Primary goals:

  • Second pay condition on the existing hook — the epoch milestone (#13) already creates provisional-epoch quotes unpaid and pays them at boundary finality; this issue adds a second condition to the same lever: a quote is paid when its epoch boundary is final AND its template is validated. Unpaid quotes are already invisible to sweeping and unmintable through existing CDK state machinery — no new quote state is needed.
  • Validation off the hot path — template checking must not sit in the share-accept path; it runs async against the quote record. The original sketch proposed a task queue plus a separate auditor process; the mechanism is open and decided at implementation time.
  • Failure path — a quote whose template fails validation is never paid; define its terminal handling (void/expire semantics and operator visibility) so failed templates are auditable rather than silently stranded.

Current state and specifics

The pool validates proof-of-work only, and the mint marks ehash quotes paid immediately at creation (roles/mint/src/lib/sv2_connection/quote_processing.rs); the epoch milestone moves that to a pay-now-or-defer branch, which is the seam this issue extends. Ported from the pre-Forgejo tracker after the move to the forge; the original's new-PENDING-state and Redis/auditor specifics are superseded by the deferred-pay design in docs/EPOCH_DESIGN.md.

Scope

In (when triggered): the second pay condition, the async validation mechanism, the failure path. Out: the template-producing proxy itself, epoch mechanics (#13 and children), settlement.

Refs #13.

Gate ehash issuance on block template validation, so a share whose template is invalid never becomes irrevocable ecash — once a miner sweeps a quote into tokens, nothing can be clawed back, and an invalid template discovered late is supply inflation stolen from honest miners. Not load-bearing today: the pool builds every template it validates shares against. It becomes load-bearing the moment miners or proxies produce their own templates, so this is implementation-ready when template-producing proxy support starts. Primary goals: - **Second pay condition on the existing hook** — the epoch milestone (#13) already creates provisional-epoch quotes unpaid and pays them at boundary finality; this issue adds a second condition to the same lever: a quote is paid when its epoch boundary is final AND its template is validated. Unpaid quotes are already invisible to sweeping and unmintable through existing CDK state machinery — no new quote state is needed. - **Validation off the hot path** — template checking must not sit in the share-accept path; it runs async against the quote record. The original sketch proposed a task queue plus a separate auditor process; the mechanism is open and decided at implementation time. - **Failure path** — a quote whose template fails validation is never paid; define its terminal handling (void/expire semantics and operator visibility) so failed templates are auditable rather than silently stranded. ### Current state and specifics The pool validates proof-of-work only, and the mint marks ehash quotes paid immediately at creation (`roles/mint/src/lib/sv2_connection/quote_processing.rs`); the epoch milestone moves that to a pay-now-or-defer branch, which is the seam this issue extends. Ported from the pre-Forgejo tracker after the move to the forge; the original's new-PENDING-state and Redis/auditor specifics are superseded by the deferred-pay design in `docs/EPOCH_DESIGN.md`. ### Scope In (when triggered): the second pay condition, the async validation mechanism, the failure path. Out: the template-producing proxy itself, epoch mechanics (#13 and children), settlement. Refs #13.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#20
No description provided.