Skip to content

Filecoin.ChainNotify #5975

Description

@freezing

Describe the bug

Filecoin.ChainNotify responses contain payload that escapes JSON. However, this is inconsistent with Lotus, and with a more general expectation that JSON payload of JSON RPC responses is not escaped.

To reproduce

Forest v0.28 example:

wscat -c "ws://forest-node:2345/rpc/v1"
Connected (press CTRL+C to quit)
> {"jsonrpc":"2.0","id":1,"method":"Filecoin.ChainNotify","params":[]}
< {"jsonrpc":"2.0","method":"xrpc.ch.val","params":[5,"[{\"Type\":\"current\",\"Val\":{\"Cids\":[{\"/\":\" ...

Lotus example:

wscat -c "ws://forest-node:2345/rpc/v1"
Connected (press CTRL+C to quit)
> {"jsonrpc":"2.0","id":1,"method":"Filecoin.ChainNotify","params":[]}
< {"jsonrpc":"2.0","method":"xrpc.ch.val","params":[1,[{"Type":"current","Val":{"Cids":[{"/":"bafy

Expected behaviour

I expect JSON RPC responses to not escape JSON, i.e. to be the same as Lotus response.

Environment (please complete the following information):

  • OS: Linux
  • Branch/commit: v0.28

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions