cosmos/cosmos-sdk

add transactions concepts doc

Closed this issue · 8 comments

Summary

Problem Definition

Proposal


For Admin Use

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

Should include structure of a transaction as a json object and what needs to be correct to be considered valid. Lots of differing documentation about format. Info about sorting the messages etc. should be included.

Would avoid issues such as #5869

okwme commented

Maybe should just provide links to https://cosmos.github.io/sig/interfaces/stdtx.html?

okwme commented

Any thoughts @gamarin2 @fadeev ?

This is the current transactions doc https://docs.cosmos.network/master/core/transactions.html

We do include several references to StdTx in the doc. What would you add?

okwme commented

In part thinking about the logic required to sign the transaction, there's something that happens with sorting the message objects that I've never been able to find documentation about.

Otherwise I've always wanted to see something equivalent to:
https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sendtransaction
Seeing an example of the JSON object, as well as an example curl feels like a really useful way to understand what the correct format is. I know some of this information is included in the swagger interface but I never really trust the swagger to be correct at this point. I think it will become much more trustworthy with changes like those described in #5911 but it might also be good to have an example somewhere else.

The swagger endpoint might also benefit by being referenced more often throughout the docs, or maybe given better visibility in the side bar or something? Cause it is super helpful (assuming it's showing you the correct information).

Both the description of how txs need to be formatted before they are signed and the JSON object are module specific, which makes it complicated to integrate in the docs. Basically it should be (and is, partially) documented in the auth module. We could integrate this doc in the SDK docs directly, but it would make the auth module canonical.

okwme commented

what about the signing logic? the fields get sorted before signing i think, do you know if that's documented anywhere?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.