eos icon indicating copy to clipboard operation
eos copied to clipboard

Improve documentation on when to use send_transaction vs push_transaction

Open matthewdarwin opened this issue 4 years ago • 0 comments
trafficstars

Based on https://eosio.stackexchange.com/questions/6042/difference-between-send-and-push-transaction/6045#6045

On the eosio chain api reference, there is a send_transaction method and a push_transaction method. I'd like to know why there are 2 endpoints instead of 1 when they seem to be the exact same methods.

API Reference: https://developers.eos.io/manuals/eos/v2.0/nodeos/plugins/chain_api_plugin/api-reference/index

Found this: https://github.com/EOSIO/eos/blob/26a4d285d0be1052d962149e431eb81500782991/docs/20_upgrade-guides/1.8-upgrade-guide.md

To quote:

v1.8 changes the structure of transaction traces, even prior to the activation of any protocol features. Clients consuming transaction and action traces made available through history_plugin, mongo_db_plugin, or state_history_plugin should be aware of the changes made to the trace structure (see details at #7044 and #7108). Clients consuming the trace output of the push_transaction RPC from the chain API should not need to do anything since the output of that RPC should be backwards compatible. However, they are encouraged to replace usage of push_transaction with the new RPC send_transaction which uses the new flat structure to store the action traces.

matthewdarwin avatar Aug 06 '21 23:08 matthewdarwin