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

After upgraded node to v5.43.0, the signedRawTx can't be accept by node #1344

Closed
lajiww opened this issue Aug 29, 2024 · 16 comments
Closed

After upgraded node to v5.43.0, the signedRawTx can't be accept by node #1344

lajiww opened this issue Aug 29, 2024 · 16 comments

Comments

@lajiww
Copy link

lajiww commented Aug 29, 2024

Node version: v5.43.0
after we upgraded node to v5.43.0, the signedRawTx can't be accept by node. I used polkadot.js to decode this signedRawTx and
found it got error.
signedRawTx:
0x4d028400ac64926676a413a99c7e5c00244fcbbd7a72f3488cd97bf65643667ba5c63a470126480008ea5c52d480ef403f324fd75e6772e19698b451fb77c4bc906d3a5a6dd4f76c07e498db9f716114f5d3c08d6f561d9114f57ed81d50cb776bd67a148b00b0001f03001e343e84e457800805cbc9230cddfe799f5e8ab9594424e23187aaa5b9b17d42170000c83dcc27016518
decode:
image

so I used polkadot.js to generate a transfer, I decoded it and found this tx has a new filed "mode". i changed my code to add "mode" filed when generate transfer. It can be decoded correctly after that. But when i called submitExtrinsic rpc, it still got error.
signedRawTx:
0x55028400f2a3d477b1003c890f105a9abc61751f49d7d283d81c31788bf7e88ae65ffa08014435836f3ca06fb881220d20e2c1c212bb9966fec600447a5e5e9baf725f7b65dd71ede9f80e2b7584ef671e2f9fb16651d2ef7c97b655507f6b99607f2ab58c000000001f0300ac64926676a413a99c7e5c00244fcbbd7a72f3488cd97bf65643667ba5c63a471b00400a9c73d146dcaf01
decode:
image
submit:
image

Plz help me to solve this. Thanks

@Dinonard
Copy link
Member

Did you manually add the mode after generating the signature?

What version of polkadot.js are you using?

@lajiww
Copy link
Author

lajiww commented Aug 29, 2024

No, we add mode field and use it to generate signature
I think the polkadot.js version should be
image

@Dinonard
Copy link
Member

I meant the polkadot.js library your code is using.

Anyways, this issue seems to be completely related to your code.
You also haven't specified which version of the node you've been using before the upgrade.

@ermalkaleci
Copy link
Contributor

@lajiww have you made sure to update tx version as well?

@lajiww
Copy link
Author

lajiww commented Aug 29, 2024

I meant the polkadot.js library your code is using.

Anyways, this issue seems to be completely related to your code. You also haven't specified which version of the node you've been using before the upgrade.

image

I am not sure which version, i used this chrome extension to sign to test. My own code doesn't use polkadot.js. so when there are something changed, my code doesn't work. for node version before upgraded, i need to ask my colleague. once i get reply, i will post it

@lajiww
Copy link
Author

lajiww commented Aug 29, 2024

@lajiww have you made sure to update tx version as well?

Every time when i construct tx, i will get specVersion and transactionVersion from chain

@lajiww
Copy link
Author

lajiww commented Aug 29, 2024

For spec_version 90, we have sent tx to node successfully. For spec_version 91, we didn't try it. now spec_version is 92

@ermalkaleci
Copy link
Contributor

how do you sign tx for polkadot? it should work the same

@ermalkaleci
Copy link
Contributor

@lajiww you can fork locally on your browser and test it. No need to send it on-chain.
Screenshot 2024-08-29 at 12 27 23 PM

@lajiww
Copy link
Author

lajiww commented Aug 29, 2024

before node upgraded, version should be v5.38.0

@ermalkaleci
Copy link
Contributor

This has nothing to do with node version. Validation is done by runtime.

@Dinonard
Copy link
Member

@lajiww please provide step-by-step how to reproduce your issue locally.
This means code/script, tools, etc. that you're using.

So far we've been guessing, as you've omitted lots of information.

@lajiww
Copy link
Author

lajiww commented Aug 30, 2024

This is the code which we encode tx to sign. the var assetID is same to mode
img_v3_02e8_7cca77ff-1f4a-4bf7-8233-21f647e3e5hu

@Dinonard
Copy link
Member

I'm not sure what this screenshot represents.

Please don't post screenshots of the code, but provide either a github link, whole source or a gist.

In my previous message I asked for a step-by-step guide to reproduce your issue so please provide that.
Since this seems like an error with your code it's imperative you provide the requested info.
Otherwise we'll close this issue since it's not related to Astar.

@lajiww
Copy link
Author

lajiww commented Sep 1, 2024

Sry. i can't supply the whole code. If can't find a problem from above information,plz close this issue

@Dinonard
Copy link
Member

Dinonard commented Sep 2, 2024

We cannot debug based on what you provided since the issue is with your code or the way you use some libraries.

Make sure to update them and recheck the docs of what's new.

@Dinonard Dinonard closed this as completed Sep 2, 2024
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

No branches or pull requests

3 participants