cosmos-sdk: Failure to query tx by hash or txs by events via legacy API

Summary of Bug

An attempt to query for a tx by hash or a set of tx(s) by event(s) via the legacy API yields the following error:

{
    "error": "Unregistered interface types.isPublicKey_Sum"
}

Version

master – d4b0e5baa

Steps to Reproduce

  1. Start a local network
  2. Broadcast a valid tx
  3. Query for the tx via the legacy API (either by hash or by event(s))

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 3
  • Comments: 27 (19 by maintainers)

Most upvoted comments

FYI, the latest params of querying txs looks like this: /cosmos/tx/v1beta1/txs?events=message.sender=%27cosmos1ut2jnfjlwpq520y06wyadys8nwg8gk3u74k9tv%27, where %27(') is needed around value. Reference: https://github.com/cosmos/cosmos-sdk/blob/master/x/auth/tx/service_test.go#L257-L304

Addressed in #8039 . events is array now, following requests are valid

  • Using URL escaped : {base_url}/cosmos/tx/v1beta1/txs?event=transfer.amount%3D100node0token%26message.action%3Dsend
  • Using multiple entries: /cosmos/tx/v1beta1/txs?events=message.action=send&events=message.module=bank")

Can someone please post an example URL with the query params? Ideally @faboweb’s initial query

Also, looks like the URL is slightly different. It takes event query params with event key now, ex: https://github.com/cosmos/cosmos-sdk/pull/7842/files#diff-61a9cb62b0e38da35032d7bc195c38b2c35c342c7302bf6dde5a483f63a96186R143

This appears related to marshaling a public key with amino when that isn’t supported. This will be address in #7276.