Skip to content

fix(awm): tighten mpc response codecs - #261

Merged
pranavjain97 merged 2 commits into
masterfrom
pranavjain/harden-awm-response-codecs
Aug 7, 2026
Merged

fix(awm): tighten mpc response codecs#261
pranavjain97 merged 2 commits into
masterfrom
pranavjain/harden-awm-response-codecs

Conversation

@pranavjain97

@pranavjain97 pranavjain97 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Drop combinedKey from the EdDSA MPC finalize handler return. It's an intermediate from keyCombine that's not consumed by any caller (MBE only reads commonKeychain and counterpartyKeyShare).
  • Wrap AWM MPC response codecs in t.exact so encoded responses match their declared contracts. Covers v1/v2 initialize/finalize and mpc recovery. SignMpcResponse union left as-is — its t.any field codecs
    cause union-match regression when wrapped strictly; tracked separately.

Ticket: WCN-1926

@pranavjain97
pranavjain97 requested review from a team as code owners August 6, 2026 20:52
@danielpeng1

Copy link
Copy Markdown
Contributor

lgtm; add description

Drop combinedKey from the EdDSA MPC finalize handler return. It's an
intermediate value from keyCombine that isn't consumed by any caller
(MBE only reads commonKeychain and counterpartyKeyShare), and it was
passing through io-ts identity encoding on the non-exact response
codec.

Wrap MpcFinalizeResponseType in t.exact so the codec matches the
declared contract at the JSON boundary. Tests updated accordingly.

WCN-1926
Wrap the remaining AWM MPC response codecs in t.exact so any undeclared
fields are stripped at the JSON boundary. Applies to initialize/finalize
for v1 and v2, plus mpc recovery. SignMpc union is intentionally left as
non-exact because its branches use t.any field codecs; tightening those
requires narrowing the field shapes and is tracked separately.
@pranavjain97
pranavjain97 force-pushed the pranavjain/harden-awm-response-codecs branch from e37d7fb to 55956d8 Compare August 7, 2026 15:52
@pranavjain97
pranavjain97 enabled auto-merge August 7, 2026 15:53
@pranavjain97
pranavjain97 merged commit 51f456f into master Aug 7, 2026
22 checks passed
@pranavjain97
pranavjain97 deleted the pranavjain/harden-awm-response-codecs branch August 7, 2026 15:55
@linear-code

linear-code Bot commented Aug 7, 2026

Copy link
Copy Markdown

WAL-1872

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.

3 participants