Skip to content

Fix TypeInfo generated by impl_common_traits!#46

Merged
csmnprschv merged 1 commit intoindividualityfrom
cosmin-fix-typeinfo-impl-common-traits-backport
Apr 16, 2026
Merged

Fix TypeInfo generated by impl_common_traits!#46
csmnprschv merged 1 commit intoindividualityfrom
cosmin-fix-typeinfo-impl-common-traits-backport

Conversation

@csmnprschv
Copy link
Copy Markdown
Contributor

This is a backport of #45. It uses TRUSTED_SOURCE instead of
UNCOMPRESSED, as this branch doesn't have 19397aa.

The TypeInfo impl generated by impl_common_traits! declared the
affected types as a composite struct wrapping Vec<u8>, which tells
metadata-based decoders to expect a Compact<u32> length prefix
followed by bytes.

The Encode impl (via ark_scale::ArkScaleRef) writes raw bytes with
no length prefix, so PJS fails when decoding:
    Compact input is > Number.MAX_SAFE_INTEGER

Delegate to ArkScale's TypeInfo so the type metadata matches the
actual encoding.

Signed-off-by: Cosmin Paraschiv <cosmin@parity.io>
@csmnprschv csmnprschv self-assigned this Apr 16, 2026
@csmnprschv csmnprschv merged commit f1aa46e into individuality Apr 16, 2026
8 checks passed
@csmnprschv csmnprschv deleted the cosmin-fix-typeinfo-impl-common-traits-backport branch April 16, 2026 10:43
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.

2 participants