Skip to content

Forward mint receipt fields through /validate-features (#146 Phase 2)#24

Open
zkr99 wants to merge 1 commit intodevelopfrom
feature/forward-validation-receipts
Open

Forward mint receipt fields through /validate-features (#146 Phase 2)#24
zkr99 wants to merge 1 commit intodevelopfrom
feature/forward-validation-receipts

Conversation

@zkr99
Copy link
Copy Markdown
Member

@zkr99 zkr99 commented Apr 29, 2026

Summary

Phase 2 of master-list #146. Wire-protocol pass-through only — no signing
or verification logic in the executor itself.

  • ValidateFeaturesRequest gains optional commitment_new_hex (forwarded
    unchanged to the validator)
  • ValidateFeaturesResponse gains optional signed_receipt (forwarded
    unchanged from the validator)
  • Success path now parses the validator's JSON body to extract the
    receipt; parse failure or missing field both map to None

Backward-compatible in every direction:

  • Old SDK + new executor + new validator: SDK doesn't send commitment,
    validator doesn't sign, executor returns valid:true with no receipt
  • New SDK + new executor + old validator: validator returns
    { valid: true } without the field, executor returns valid:true with
    no receipt, SDK degrades to the no-binding mint flow
  • New SDK + old executor: old executor strips both fields, same as
    old-SDK behavior

SignedReceiptDto is defined locally as a wire-format mirror so the
executor doesn't take a crate dependency on entros-validation. Field
names and types match byte-for-byte.

Testing

  • 84/84 cargo tests pass
  • cargo clippy --release --all-targets clean
  • No new dependencies

…features

Master-list #146 Phase 2. Adds two transparent pass-through fields:
SDK -> validator commitment_new_hex on the request, and validator -> SDK
signed_receipt on the response. The executor itself takes no signing or
verification position; it just lets the wire contract flow.

ValidateFeaturesRequest gains optional commitment_new_hex (defaulted via
serde so old SDK requests keep working). ValidateFeaturesResponse gains
optional signed_receipt with skip_serializing_if so old SDK clients see
no extra field. The success path now reads the validator response body
to extract the receipt; parse failure or missing field both map to None
(older validators return { valid: true } without the receipt).

SignedReceiptDto is defined locally as a wire-format mirror of the
validator's struct, so the executor doesn't pull in entros-validation
as a crate dep. Field names and types match byte-for-byte.

84/84 tests pass; clippy clean. No new dependencies.
@zkr99 zkr99 force-pushed the feature/forward-validation-receipts branch from fe66a83 to d6de8f3 Compare April 29, 2026 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant