fix(sdk-coin-polyx): transferAllowDeath in getFee and remove double Ed25519 prefix - #9655
Merged
Merged
Conversation
…d25519 prefix Two bugs that together block POLYX MPCv2 recovery end-to-end: 1. getFee used api.tx.balances.transfer which was renamed transferAllowDeath in Polymesh v8 (same call slot 0x0500). Blocked recovery at fee estimation with TypeError before any transaction was produced. 2. MPCv2 signing path manually prepended the Ed25519 MultiSignature discriminant (0x00) to rawSig before addSignature, but Transaction#constructSignedPayload already prepends that byte. The double prefix shifted the on-wire signature by one byte and dropped the last byte of sigma, causing 1010: Bad signature. Mirrors the fix applied to abstractSubstrateCoin in WCI-1454. Ticket: WCI-1437
Contributor
Contributor
|
|
vibhavgo
marked this pull request as ready for review
September 4, 2026 10:49
ArunBala-Bitgo
approved these changes
Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two bugs that together block POLYX MPCv2 recovery end-to-end, discovered during WCI-1437 staging tests.
Linear: WCI-1437
Changes
1.
getFee:balances.transfer→balances.transferAllowDeathPolymesh v8 renamed
balances.transfertobalances.transferAllowDeath(same call slot0x0500). The old name no longer exists on the runtime, causingTypeError: api.tx.balances.transfer is not a functionat fee estimation — preventing any recovery JSON from being produced. Already documented inpolyx/src/lib/iface.ts:72. This is a dry-run.paymentInfo()call only, not a transaction submission.2. Remove double Ed25519 discriminant in MPCv2 signing path
Transaction#constructSignedPayloadin abstract-substrate already prepends0x00(theMultiSignature::Ed25519variant byte) to whatever buffer is passed toaddSignature. The MPCv2 path inpolyx.tswas also manually prepending0x00, producing a double discriminant. This shifted the on-wire signature by one byte, dropped the last byte of sigma, and caused1010: Invalid Transaction: Transaction has a bad signatureon broadcast. Mirrors the fix applied toabstractSubstrateCoin.tsin WCI-1454 — POLYX overridesrecover()entirely so it was not covered by that fix.Test Plan
signSubstrateMpcV2Recoveryto return a controlled 64-byte buffer and assertsaddSignaturereceives exactly that buffer (no prefix)