laconicd/docs/basics/transactions.md

46 lines
2.0 KiB
Markdown
Raw Normal View History

docs: vuepress setup and section titles (#311) * vuepress * docs: vuepress setup and TODOs * doc scripts * update Makefile and gitignore * more docs updates * gitignore * metamask instructions * update image * updates * updates from call * docs: vuepress config and home.vue (#350) * update uncles return (#337) * x/evm: fix EndBlock consensus failure (#334) * add test for sending tx w/ 21000 gas * improve rpc transfer test * use ctx in EndBlock * UpdateAccounts and ClearStateObjects with passed in context * log ethereum address on error Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Federico Kunze <federico.kunze94@gmail.com> * update Ethermint color variables * add header and footer logo * tweak config.js * WIP custom homepage.vue * add layout to docs/README * update color variables * add eth logo black and white * tweak docs/README * update logo and logo-bw svg * bump 1.0.167 * homepage → home * add icon-code, icon-rocket * layout: home, remove configurable frontmatter: label, read, use * clean up config.js * bump 1.0.168 * fix missing comma from resolving conflicts * update sidebar, config nav, path * remove left whitespace on the header and footer logos * clean up home.vue, docs/README * update ethermint forum url in footer.links * comment out custom true to enable searchbar in subpages * remove external link icon for Guides * comments, revert custom true * clean up config.js, add specifications icon Co-authored-by: noot <36753753+noot@users.noreply.github.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Federico Kunze <federico.kunze94@gmail.com> * final touches Co-authored-by: Cyrus Goh <hello@lovincyrus.com> Co-authored-by: noot <36753753+noot@users.noreply.github.com>
2020-07-02 08:22:45 +00:00
<!--
order: 2
-->
# Transactions
## Routing
Ethermint needs to parse and handle transactions routed for both the EVM and for the Cosmos hub. We
attempt to achieve this by mimicking [Geth's](https://github.com/ethereum/go-ethereum) `Transaction`
structure and treat it as a unique Cosmos SDK message type. An Ethereum transaction is a single
[`sdk.Msg`](https://godoc.org/github.com/cosmos/cosmos-sdk/types#Msg) contained in an
[`auth.StdTx`](https://godoc.org/github.com/cosmos/cosmos-sdk/x/auth#StdTx). All relevant Ethereum
transaction information is contained in this message. This includes the signature, gas, payload,
etc.
Being that Ethermint implements the Tendermint ABCI application interface, as transactions are
consumed, they are passed through a series of handlers. Once such handler, the `AnteHandler`, is
responsible for performing preliminary message execution business logic such as fee payment,
signature verification, etc. This is particular to Cosmos SDK routed transactions. Ethereum routed
transactions will bypass this as the EVM handles the same business logic.
Ethereum routed transactions coming from a Web3 source are expected to be [RLP](./../core/encoding.md#rlp) encoded, however all
docs: vuepress setup and section titles (#311) * vuepress * docs: vuepress setup and TODOs * doc scripts * update Makefile and gitignore * more docs updates * gitignore * metamask instructions * update image * updates * updates from call * docs: vuepress config and home.vue (#350) * update uncles return (#337) * x/evm: fix EndBlock consensus failure (#334) * add test for sending tx w/ 21000 gas * improve rpc transfer test * use ctx in EndBlock * UpdateAccounts and ClearStateObjects with passed in context * log ethereum address on error Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Federico Kunze <federico.kunze94@gmail.com> * update Ethermint color variables * add header and footer logo * tweak config.js * WIP custom homepage.vue * add layout to docs/README * update color variables * add eth logo black and white * tweak docs/README * update logo and logo-bw svg * bump 1.0.167 * homepage → home * add icon-code, icon-rocket * layout: home, remove configurable frontmatter: label, read, use * clean up config.js * bump 1.0.168 * fix missing comma from resolving conflicts * update sidebar, config nav, path * remove left whitespace on the header and footer logos * clean up home.vue, docs/README * update ethermint forum url in footer.links * comment out custom true to enable searchbar in subpages * remove external link icon for Guides * comments, revert custom true * clean up config.js, add specifications icon Co-authored-by: noot <36753753+noot@users.noreply.github.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Federico Kunze <federico.kunze94@gmail.com> * final touches Co-authored-by: Cyrus Goh <hello@lovincyrus.com> Co-authored-by: noot <36753753+noot@users.noreply.github.com>
2020-07-02 08:22:45 +00:00
internal interaction between Ethermint and Tendermint will utilize one of the supported encoding
formats: [Protobuf](./../core/encoding.md#protocol-buffers) and [Amino](./../core/encoding.md#amino).
docs: vuepress setup and section titles (#311) * vuepress * docs: vuepress setup and TODOs * doc scripts * update Makefile and gitignore * more docs updates * gitignore * metamask instructions * update image * updates * updates from call * docs: vuepress config and home.vue (#350) * update uncles return (#337) * x/evm: fix EndBlock consensus failure (#334) * add test for sending tx w/ 21000 gas * improve rpc transfer test * use ctx in EndBlock * UpdateAccounts and ClearStateObjects with passed in context * log ethereum address on error Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Federico Kunze <federico.kunze94@gmail.com> * update Ethermint color variables * add header and footer logo * tweak config.js * WIP custom homepage.vue * add layout to docs/README * update color variables * add eth logo black and white * tweak docs/README * update logo and logo-bw svg * bump 1.0.167 * homepage → home * add icon-code, icon-rocket * layout: home, remove configurable frontmatter: label, read, use * clean up config.js * bump 1.0.168 * fix missing comma from resolving conflicts * update sidebar, config nav, path * remove left whitespace on the header and footer logos * clean up home.vue, docs/README * update ethermint forum url in footer.links * comment out custom true to enable searchbar in subpages * remove external link icon for Guides * comments, revert custom true * clean up config.js, add specifications icon Co-authored-by: noot <36753753+noot@users.noreply.github.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Federico Kunze <federico.kunze94@gmail.com> * final touches Co-authored-by: Cyrus Goh <hello@lovincyrus.com> Co-authored-by: noot <36753753+noot@users.noreply.github.com>
2020-07-02 08:22:45 +00:00
## Transaction formats
<!-- TODO: -->
- Cosmos transactions
- Ethereum transaction
## Signatures
Ethermint supports [EIP-155](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md)
signatures. A `Transaction` is expected to have a single signature for Ethereum routed transactions.
However, just as in Cosmos, Ethermint will support multiple signers for non-Ethereum transactions.
Signatures over the `Transaction` type are identical to Ethereum and the signatures will not be
duplicated in the embedding
[`auth.StdTx`](https://godoc.org/github.com/cosmos/cosmos-sdk/x/auth#StdTx).
## Next {hide}
Learn about how [gas](./gas.md) is used on Ethermint {hide}