Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBC send via broadcasting endpoint #8022

Closed
4 tasks
faboweb opened this issue Nov 24, 2020 · 12 comments · Fixed by #8037
Closed
4 tasks

IBC send via broadcasting endpoint #8022

faboweb opened this issue Nov 24, 2020 · 12 comments · Fixed by #8037

Comments

@faboweb
Copy link
Contributor

faboweb commented Nov 24, 2020

Summary of Bug

Using the POST /txs endpoint to broadcast a tx doesn't work for IBC sends. The message type is not recognized.

Message:

{
  "account_number": "68",
  "chain_id": "stargate-4",
  "fee": {
    "amount": [
      {
        "amount": "3500",
        "denom": "umuon"
      }
    ],
    "gas": "350000"
  },
  "memo": "",
  "msgs": [
    {
      "type": "cosmos-sdk/MsgTransfer",
      "value": {
        "receiver": "cosmos1q9wtnlwdjrhwtcjmt2uq77jrgx7z3usrq2yz7z",
        "sender": "cosmos1q9wtnlwdjrhwtcjmt2uq77jrgx7z3usrq2yz7z",
        "source_channel": "THEslipperCHANNEL",
        "source_port": "transfer",
        "token": {
          "amount": "1000000",
          "denom": "umuon"
        }
      }
    }
  ],
  "sequence": "24"
}

Response:

{"error":"unrecognized concrete type name cosmos-sdk/MsgTransfer"}

Version

Steps to Reproduce


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@aaronc
Copy link
Member

aaronc commented Nov 24, 2020

IBC doesn't support Amino. You will need to use a protobuf Tx.

@faboweb
Copy link
Contributor Author

faboweb commented Nov 24, 2020

Anyway to avoid introducing protobuf here?

@faboweb
Copy link
Contributor Author

faboweb commented Nov 24, 2020

Why does the broadcasting endpoint not handle protobuf serialization?

@aaronc
Copy link
Member

aaronc commented Nov 24, 2020

Anyway to avoid introducing protobuf here?

No

Why does the broadcasting endpoint not handle protobuf serialization?

It's an amino endpoint. The JSON you sent was amino and uses undefined types

@aaronc
Copy link
Member

aaronc commented Nov 24, 2020

Can someone post the best available migration guide for @faboweb ? @amaurymartiny @anilcse @clevinson ?

@faboweb
Copy link
Contributor Author

faboweb commented Nov 24, 2020 via email

@amaury1093
Copy link
Contributor

amaury1093 commented Nov 24, 2020

The current docs for REST endpoints migration are here: https://docs.cosmos.network/master/migrations/rest.html

@aaronc
Copy link
Member

aaronc commented Nov 24, 2020

IBC doesn't support amino at all. Other transactions which supported amino before still do but are being deprecated. In general, these endpoints are all deprecated and will stop working. They were left in place to allow for a less dramatic transition but they are basically unsupported and compatibility isn't guaranteed. We advise that you migrate to grpc or grpc gateway REST endpoints.

@faboweb
Copy link
Contributor Author

faboweb commented Nov 24, 2020

oh boy, the pain just never stops...

@aaronc
Copy link
Member

aaronc commented Nov 24, 2020

Sorry 🙁

@fedekunze
Copy link
Collaborator

new modules won't support amino at all as it will be deprecated and grpc/proto has a larger set of libraries for clients

@amaury1093
Copy link
Contributor

amaury1093 commented Nov 25, 2020

We should definitely add a nicer error message here too, linking to the REST migration guide.

Edit: while we're at it, also add to the /txs/{en,de}code endpoints

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants