Skip to content

Websocket client is unable to subscribe to vote events #1432

@bonedaddy

Description

@bonedaddy

What went wrong?

I'm unable to subscribe to events of type Vote when using WebsocketClient. I have tested against the rpc node using websocat, which correctly prints out votes. However I'm unable to achieve the same functionality using tendermint_rpc.

$> echo '{ "jsonrpc": "2.0","method": "subscribe","id": 0,"params": {"query": "tm.event='"'Vote'"'"} }' | websocat -n -t ws://<RPC>/websocket

Steps to reproduce

This is the code I have that acts as a wrapper around WebsocketClient https://github.com/rangesecurity/ctop/blob/main/ws_client/src/lib.rs

To test clone the repository locally:

$> git clone https://github.com/rangesecurity/ctop
$> cd ctop
$> cargo build --bin cli
$> ./target/debug/cli subscirbe --url <RPC_NODE>

Nothing gets printed to stdout, when the expected result are consensus votes being printed. For reference if I change this line to "tm.event='NewBlock'" I correctly receive events for new blocks.

Definition of "done"

Able to subscribe to vote events ,as well as other custom events (NewRound, NewRoundStep)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions