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

Support multimessage transactions #2149

Closed
fedekunze opened this issue Mar 4, 2019 · 5 comments · Fixed by #2336
Closed

Support multimessage transactions #2149

fedekunze opened this issue Mar 4, 2019 · 5 comments · Fixed by #2336
Assignees
Labels
design-work-needed 🎨 issues that require design work before development high priority ❗ transactions Improvement of the transaction index and displaying

Comments

@fedekunze
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Some transactions have multiple msg values, which we do not support yet as we're relying only on the first message. For eg:

{
  "height": "193168",
  "txhash": "7E129DFC4EC8887E50136E51252EA50F95FE3ECCEE1F56F722914975913E9106",
  "log": "[{\"msg_index\":\"0\",\"success\":true,\"log\":\"\"},{\"msg_index\":\"1\",\"success\":true,\"log\":\"\"}]",
  "gas_wanted": "200000",
  "gas_used": "96158",
  "tags": [
    {
      "key": "action",
      "value": "withdraw_delegation_reward"
    },
    {
      "key": "delegator",
      "value": "cosmos185n9jln2g4w79w39m0g85x2tns6uekqgzrhnap"
    },
    {
      "key": "source-validator",
      "value": "cosmosvaloper185n9jln2g4w79w39m0g85x2tns6uekqg8hrx3j"
    },
    {
      "key": "action",
      "value": "withdraw_validator_rewards_all"
    },
    {
      "key": "source-validator",
      "value": "cosmosvaloper185n9jln2g4w79w39m0g85x2tns6uekqg8hrx3j"
    }
  ],
  "tx": {
    "type": "auth/StdTx",
    "value": {
      "msg": [
        {
          "type": "cosmos-sdk/MsgWithdrawDelegationReward",
          "value": {
            "delegator_addr": "cosmos185n9jln2g4w79w39m0g85x2tns6uekqgzrhnap",
            "validator_addr": "cosmosvaloper185n9jln2g4w79w39m0g85x2tns6uekqg8hrx3j"
          }
        },
        {
          "type": "cosmos-sdk/MsgWithdrawValidatorCommission",
          "value": {
            "validator_addr": "cosmosvaloper185n9jln2g4w79w39m0g85x2tns6uekqg8hrx3j"
          }
        }
      ],
      "fee": {
        "amount": [
          {
            "denom": "photino",
            "amount": "10000"
          }
        ],
        "gas": "200000"
      },
      "signatures": [
        {
          "pub_key": {
            "type": "tendermint/PubKeySecp256k1",
            "value": "AgwqSG/R/k+kUtxO1tVqAMwGvuTDGslMGHdyr8gV7GY7"
          },
          "signature": "aa1hCv1TAEyAr/KYB3bHwX5t+drIKF6u0heeD+vzlUUKUez55w9gJBsf2MORBC5JtnH2ATh+wF3ieKudwH2FkQ=="
        }
      ],
      "memo": ""
    }
  }
}

Describe the solution you'd like

Support multiple message transactions on Voyager

Describe alternatives you've considered

a. Display both messages on the transaction (separated by a divider), or
b. Display multiple transactions with the same tx height and metadata (Li transactions)

Additional context

Mintscan explorer uses the a. approach:

screen shot 2019-03-04 at 9 40 06 am

@fedekunze fedekunze added the transactions Improvement of the transaction index and displaying label Mar 4, 2019
@faboweb
Copy link
Collaborator

faboweb commented Mar 4, 2019

Are multi messages even used by the SDK as of right now?

@faboweb
Copy link
Collaborator

faboweb commented Mar 4, 2019

I like the idea of just using the LiTransaction and wrapping them in a container. 👍

@fedekunze
Copy link
Contributor Author

Are multi messages even used by the SDK as of right now?

yes, I've seen lots of those txs on the explorers recently

@fedekunze fedekunze self-assigned this Mar 11, 2019
@fedekunze fedekunze changed the title Support multi message transactions Support multisend transactions Mar 14, 2019
@faboweb faboweb added the design-work-needed 🎨 issues that require design work before development label Mar 15, 2019
@fedekunze fedekunze changed the title Support multisend transactions Support multimessage transactions Mar 23, 2019
This was referenced Mar 23, 2019
@ebuchman
Copy link
Contributor

ebuchman commented Mar 23, 2019

Are multi messages even used by the SDK as of right now?

gaiacli tx distr withdraw-all-rewards tends to be multi msg (one msg per validator you're delegated to), eg. https://stargazer.certus.one/transactions/122219:4554CDD3DDFD1DF897DB654EB0616A6BCEC6FBA52200F63291D516E5AE412FD8

Also certain power users (cough cough) are manually constructing multi-msg txs: https://stargazer.certus.one/accounts/cosmos1unc788q8md2jymsns24eyhua58palg5kc7cstv

@fedekunze
Copy link
Contributor Author

Thanks @ebuchman ! I opened a PR to display them as "separate txs" until the final designs form @jbibla are done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design-work-needed 🎨 issues that require design work before development high priority ❗ transactions Improvement of the transaction index and displaying
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants