Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

PubSub API "author_submitAndWatchExtrinsic" says Wasm is unreachable on error #6129

Open
lamafab opened this issue May 25, 2020 · 1 comment
Labels
J0-enhancement An additional feature request.

Comments

@lamafab
Copy link

lamafab commented May 25, 2020

[Improvement]

Example (tested with wscat)

// Request
> {"id":1, "jsonrpc":"2.0", "method": "author_submitAndWatchExtrinsic", "params":["0x2d0284ff78b6dd81f9f55c08fdedb28e5e78e44a1ce6568164d4bd43fa4630a7a388592701e614839715c97beb90ed62b742f12fdcfd3f56d9ce72fefc32588799026c4e0154497063f375d5f49d5a03a921f67a74d0457c97f736b2a8c6ad2e7919e658850000000600ff8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48214e"]}

// Response
< {"jsonrpc":"2.0","error":{"code":1002,"message":"Verification Error: Execution(Wasmi(Trap(Trap { kind: Unreachable })))","data":"RuntimeApi(\"Execution(Wasmi(Trap(Trap { kind: Unreachable })))\")"},"id":1

Expected behavior
The error message should say that the parameters cannot be decoded.

@tomusdrw told me that he suspects it's coming from here:

Err(e) => panic!("Bad input data provided to {}: {}", #fn_name_str, e.what()),

@bkchr bkchr added the J0-enhancement An additional feature request. label May 27, 2020
@Wangmmx
Copy link

Wangmmx commented Jun 5, 2020

Do you know which parameter cannot be decoded? I encountered the same error

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J0-enhancement An additional feature request.
Projects
None yet
Development

No branches or pull requests

3 participants