Repository navigation
Description
Summary
PR #95 removes signer-local PQC usage data from portable Qt proofs while retaining local reporting after successful signing. On a failed signing attempt, however, the wallet interface returns only the signing error and discards the recorder/report, so qbit-qt cannot show counters consumed before failure.
This leaves an explicit acceptance criterion from issue #94 unmet: usage must remain visible locally even when no portable proof is produced.
Current behavior
At the reviewed head, src/wallet/interfaces.cpp records PQC counter advances around SignDataPQCHash, but the !proof branch returns only util::ErrorString(proof). PQCUsageReport is built and logged only after success. The Qt error path consequently receives no report to display.
A failure after reservation can therefore consume a stateful signing counter without showing the updated count, remaining budget, state, or warning to the user.
Expected behavior
Failed signing should preserve the minimal local usage state needed for safe operator decisions without adding that state to a portable proof.
Acceptance criteria
- Return a structured failed-signing result that can carry both the error and any recorded PQC usage changes.
- Build/log the usage report whenever a counter was reserved or consumed, including failure paths.
- Display the updated local count, remaining budget, state, and warnings in qbit-qt after failure.
- Keep portable proof output absent on failure and free of local PQC usage metadata on success by default.
- Add a deterministic regression that fails after reservation and proves local usage remains visible.
- Cover multi-leaf retry behavior without exposing non-selected keys in portable output.
Consensus impact
Consensus-adjacent. This does not change signature validity, but it affects stateful PQC wallet-signing safety and the operator's ability to manage limited-use keys.
References
- Original closed contract: Qt proofs export local PQC usage and alternate-key metadata #94
- Related counter-accounting work: Harden signdatapqchash PQC counter accounting and usage reporting #45
- Reviewed implementation: PR qt: minimize P2MR proof exports #95 at
b24a33230a3a254327c753b20b22f72eac6a6bbc
Activity