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

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

@lamafab

Description

@lamafab

[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()),

Metadata

Metadata

Assignees

No one assigned

    Labels

    J0-enhancementAn additional feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions