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

Bad input data provided to validate_transaction: Codec error #463

Closed
mrcnski opened this issue Sep 12, 2021 · 7 comments
Closed

Bad input data provided to validate_transaction: Codec error #463

mrcnski opened this issue Sep 12, 2021 · 7 comments

Comments

@mrcnski
Copy link

mrcnski commented Sep 12, 2021

I'm trying to run the ocw example but every time I submit a transaction I get:

2021-09-12 14:34:15.755 ERROR     txpool-verifier1 runtime: panicked at 'Bad input data provided to validate_transaction: Codec error', /Users/marcin/Sync/Repos/github.com/substrate-developer-hub/recipes/runtimes/super-runtime/src/lib.rs:412:1    
2021-09-12 14:34:15.755  WARN tokio-runtime-worker sc_rpc::author: Failed to submit extrinsic: Extrinsic verification error: Runtime error: Execution failed: Wasmi(Trap(Trap { kind: Unreachable }))  

Version: version 3.0.0-98d3625-x86_64-macos
Runtime: Native runtime: ocw-runtime-1 (ocw-runtime-1.tx1.au1)

@apopiak
Copy link
Contributor

apopiak commented Sep 14, 2021

This sounds wrong. If you're running the ocw runtime the super-runtime should not be used.

@apopiak
Copy link
Contributor

apopiak commented Sep 14, 2021

One source of failing transactions is type incompatibility.
Make sure you're using the correct types.json if you're using Polkadot-js to interact with the chain.
(i.e. https://github.com/substrate-developer-hub/recipes/blob/master/runtimes/ocw-runtime/types.json for the ocw runtime)

@mrcnski
Copy link
Author

mrcnski commented Sep 14, 2021

Thanks. I did specify the ocw runtime -- I followed the instructions in the docs and commented out the super-runtime:

https://substrate.dev/recipes/off-chain-workers/transactions.html

The runtime in the output is:

Native runtime: ocw-runtime-1 (ocw-runtime-1.tx1.au1)

Make sure you're using the correct types.json if you're using Polkadot-js to interact with the chain.

How do I do this? I didn't see this mentioned in the docs.

@apopiak
Copy link
Contributor

apopiak commented Sep 14, 2021

Yeah, sorry it's not mentioned explicitly.
You copy and paste the contents of the types.json into Settings > Developer (e.g. https://polkadot.js.org/apps/#/settings/developer)

@mrcnski
Copy link
Author

mrcnski commented Sep 14, 2021

Thanks, that resolved my issue!

@jimmychu0807
Copy link
Collaborator

It seems is issue is resolved. Closing it now. Please open this issue if there is still any problem. Thanks.

@icodezjb
Copy link

I had a similar problem.
Using the wrong or outdated polkadot.js types via polkadot.js.org.
Resolved it by cleaning and configuring the correct type

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

4 participants