Skip to content

adr 005: BadPreimage mirror and SignerCapExhausted are out of step with the wire enum #2172

Closed

Description

@thiras

Summary

ADR 005 §VoucherRejected semantics does not match crates/protocol/src/client.rs and crates/incentive/src/client_bridge.rs. There are two differences.

  1. BadPreimage is a mirrored reason, but the ADR says it has none. adr/005-protocol.md (the paragraph "The first seven VoucherRejectReason variants and UnderFold mirror…", and §Mirror obligation) says the chain variants (BadPreimage, ChainIndexZero, UnanchoredPreimage, ChunkPriceMismatch) have no validation-enum counterpart and are exempt. But PoolError::BadPreimage exists (crates/incentive/src/lane.rs), and voucher_reject_reason maps it one-to-one (client_bridge.rs:125). The bridge doc says "BadPreimage bridges too". The enum listing's comment on BadPreimage ("Handler-emitted; no validation-enum counterpart") is wrong for the same reason.
  2. SignerCapExhausted does not appear in ADR 005. The wire enum has it between PoolExhausted and BadPreimage (crates/protocol/src/client.rs). The ADR's enum listing, the handler-direct paragraph, and the retry-semantics table all leave it out. ADR 003 §Pool solvency describes the condition.

Fix

  • In the ADR 005 enum listing, add SignerCapExhausted in wire order and correct the BadPreimage comment.
  • State that BadPreimage mirrors PoolError::BadPreimage. Take it out of the "exempt" list in §Mirror obligation.
  • Add a SignerCapExhausted row to the retry-semantics table, matching the VoucherRejectReason::SignerCapExhausted doc: the owner raises the cap or issues a new capability, and the reason is not watermark-gated.
  • Write in ASD-STE100.

Found during review of #2170.

Activity

  1. added
    kind:docs
    design:consistency
    design:adr
    status:mainnet-blocking
    on Sep 26, 2026
  2. self-assigned this
    on Oct 1, 2026
  3. added a commit that references this issue on Oct 1, 2026
    8f3cdca
  4. moved this from In progress to Done in deCDNon Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

design:adrdesign:consistencykind:docsstatus:mainnet-blocking

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions