fix: facilitate extrinsic decoding#2
Conversation
🤖 Augment PR SummarySummary: This PR fixes Quip block decoding in Apps by patching Changes:
Why: Quip blocks can mix 🤖 Was this summary useful? React with 👍 or 👎 |
| "@polkadot/rpc-provider": "^16.5.6", | ||
| "@polkadot/typegen": "^16.5.6", | ||
| "@polkadot/types": "^16.5.6", | ||
| "@polkadot/types": "patch:@polkadot/types@npm%3A16.5.6#~/.yarn/patches/@polkadot-types-npm-16.5.6-6fe2703ed8.patch", |
There was a problem hiding this comment.
Using the patch: protocol can introduce a distinct package locator; it’s worth confirming the dependency graph doesn’t end up with both patched and unpatched @polkadot/types copies, since mixed instances can lead to inconsistent extrinsic decoding and/or codec type mismatches at runtime.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
Summary
Fix Quip block decoding in Apps by patching
@polkadot/typesto respect the wire-levelisSignedflag when decoding extrinsic signatures.Why
Quip blocks can contain V5 bare inherents (
0x05) alongside V4 signed transactions (0x84). Quip also uses a custom hybrid transaction signature envelope instead of the standardMultiSignature.The upstream decoder inferred signed-ness from whether the decoded signature object looked empty. That heuristic breaks for Quip’s struct-like hybrid signature: a default struct can look non-empty even when the extrinsic version/type byte marks the extrinsic as bare/unsigned. Apps then misclassifies a bare V5 inherent as signed V5 and fails with:
Signed Extrinsics are currently only available for ExtrinsicV4Changes
@polkadot/types@16.5.6.isSignedflag..yarn/patchesin git.Validation
api.rpc.chain.getBlock(...)succeeds againstwss://bootnode-1.testnet.quip.network:20049/rpc.timestamp.set, followed by V4 signed transactions.yarn install; it completed with existing peer warnings and optional native build warnings.