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

ModuleError out of sync, fails to deserialize --dry-run error #533

Closed
ascjones opened this issue Apr 25, 2022 · 0 comments · Fixed by #534
Closed

ModuleError out of sync, fails to deserialize --dry-run error #533

ascjones opened this issue Apr 25, 2022 · 0 comments · Fixed by #534

Comments

@ascjones
Copy link
Collaborator

ascjones commented Apr 25, 2022

Since paritytech/substrate#10242, the error field on ModuleError is now a [u8; 4], and in the released version of sp_runtime we depend upon it is still a u8.

So when we call instantiate/call with --dry-run and it triggers a ContractTrapped or any other internal pallet_contracts error, the returned error fails to deserialize because of the incompatible ModuleError types: it expects a u8 but receives a [u8; 4].

One solution would be to do a new sp_runtime release in substrate with the new struct, though that has the downside of not being backwards compatible. But we may not even want to be backwards compatible until contracts are actually on a production chain somewhere.

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 a pull request may close this issue.

1 participant