Skip to content

Make Tendermint HTTP RPC arguments not take JSON? #346

@jaekwon

Description

@jaekwon

When running https://tendermint.com/intro/getting-started/deploy-testnet , and attempting to run dummy to query for "abcd", it doesn't work.

broadcast_tx_sync?tx="abcd" is actually posting the hex bytes, 0xabcd as the transaction, not the string "abcd". We should probably fix this to be more intuitive. We should also update the tutorial.

So, to query, you have to do:

query 0xabcd

The return says, {"index":0,"value":"\ufffd\ufffd","exists":true}, the \ufffd is an artifact of stringifying 0xabcd in JSON. This is also confusing.

Ideally we can call broadcast_tx_sync?tx=0xabcd, which would be consistent w/ tmsp-cli query. I think we can make a rule in go-rpc HTTP handler.go that anything preceded by "0x" is to be interpreted as bytes, otherwise is a JSON thing.

Also, https://tendermint.com/intro/getting-started/deploy-testnet still refers to "broadcast_tx", when it should be broadcast_tx_sync.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions