Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api generate invalid tx on Basilisk #6036

Open
xlc opened this issue Nov 22, 2024 · 4 comments
Open

api generate invalid tx on Basilisk #6036

xlc opened this issue Nov 22, 2024 · 4 comments
Labels
P4 - Needs Investigation Requires analysis to determine cause or feasibility. Not fully understood, needs research first.

Comments

@xlc
Copy link
Contributor

xlc commented Nov 22, 2024

I am investigating why this failed: https://github.com/open-web3-stack/polkadot-ecosystem-tests/actions/runs/11964539727/job/33357037908?pr=112

It is generating a signed tx with hex of 0x9902840088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0001a4c8b0e0e88d68b8e1a990e3bc0b539d95be71c071e27241e16b9217a27a000b88f67541243c434cb87a1e825a04926d60d286c8da706b3737c2657fa7f108450300009a00000000000080c6a47e8d0300000000000000000004010200411f0100d17c2d7823ebf260fd138f2d7e27d114c0145d968b5ff5006125f2414fadae6900, which pjs apps failed to decode it and runtime rejects it as invalid tx

This is a valid one generated from pjs apps: 0x95028488dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0001a4c8b0e0e88d68b8e1a990e3bc0b539d95be71c071e27241e16b9217a27a000b88f67541243c434cb87a1e825a04926d60d286c8da706b3737c2657fa7f108450300009a00000000000080c6a47e8d0300000000000000000004010200411f0100d17c2d7823ebf260fd138f2d7e27d114c0145d968b5ff5006125f2414fadae6900

The invalid one have a extra 00 after extrinsic version byte (84). No idea where it is coming from. And it only happens to Basilisk, not other parachains including hydration. Any ideas?

@TarikGul
Copy link
Member

It is generating a signed tx with hex of 0x9902840088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0001a4c8b0e0e88d68b8e1a990e3bc0b539d95be71c071e27241e16b9217a27a000b88f67541243c434cb87a1e825a04926d60d286c8da706b3737c2657fa7f108450300009a00000000000080c6a47e8d0300000000000000000004010200411f0100d17c2d7823ebf260fd138f2d7e27d114c0145d968b5ff5006125f2414fadae6900, which pjs apps failed to decode it and runtime rejects it as invalid tx

How is this invalid tx being generated? Any snippet would be super helpful.

@TarikGul TarikGul added the P4 - Needs Investigation Requires analysis to determine cause or feasibility. Not fully understood, needs research first. label Nov 25, 2024
@TarikGul TarikGul moved this from In Review to P4 - Needs Investigation in Polkadot-js general project board Nov 25, 2024
@xlc
Copy link
Contributor Author

xlc commented Nov 25, 2024

to reproduce:

and you should see the bad tx logged from https://github.com/open-web3-stack/polkadot-ecosystem-tests/blob/c963d6f2242dd197afc1f729cb7270f1c3658a00/packages/shared/src/xcm/runXtokenstHorizontal.ts#L45

@bee344
Copy link
Member

bee344 commented Nov 28, 2024

To add to this, the issue becomes evident when the tx is signed via signAsync, since the unsigned gets decoded correctly.

When constructing the same tx through apps, the whole flow works correctly, even when signing without submission. Since the latter also uses signAsync, my guess is that the error is linked to the client returned by setupNetworks, and therefore to chopsticks rather than to the api itself.

@xlc
Copy link
Contributor Author

xlc commented Nov 29, 2024

It was working before and stops working after I upgraded Chopsticks & pjs api version.
However, Hydration shares pretty much the same config and is working fine. All other networks are also fine. This troubles me the most. I am not sure what specific thing in Basilisk triggers this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P4 - Needs Investigation Requires analysis to determine cause or feasibility. Not fully understood, needs research first.
Projects
Status: P4 - Needs Investigation
Development

No branches or pull requests

3 participants