You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
adr 005: BadPreimage mirror and SignerCapExhausted are out of step with the wire enum #2172
ADR 005 §VoucherRejected semantics does not match crates/protocol/src/client.rs and crates/incentive/src/client_bridge.rs. There are two differences.
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.
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.
Activity
docs(adr): align ADR 005 voucher-reject mirror with the wire enum (#2258