1

Found such a problem if one operation is wrong then the whole transaction is wrong.

ZuluCrypto\StellarSdk\Horizon\Api\PostTransactionResponse Object
(
    [result:protected] => 
    [rawData:protected] => Array
        (
            [type] => https://stellar.org/horizon-errors/transaction_failed
            [title] => Transaction Failed
            [status] => 400
            [detail] => The transaction failed when submitted to the stellar network. The `extras.result_codes` field on this response contains further details.  Descriptions of each code can be found at: https://www.stellar.org/developers/learn/concepts/list-of-operations.html
            [extras] => Array
                (
                    [envelope_xdr] => AAAAAG................................................==
                    [result_codes] => Array
                        (
                            [transaction] => tx_failed
                            [operations] => Array
                                (
                                    [0] => op_success
                                    [1] => op_success
                                    [2] => op_malformed
                                    [3] => op_success
                                )

                        )

                    [result_xdr] => AAAAAAAAAZD/.....................................=
                )

        )

)

1 Answer 1

6

This is as per design.

Operations are executed in order as one ACID transaction, meaning that either all operations are applied or none are. If any operation fails, the whole transaction fails.

https://www.stellar.org/developers/guides/concepts/transactions.html#list-of-operations

4
  • Is this not a horizon developer bug?
    – Minherc
    Mar 12, 2019 at 11:27
  • 1
    No. The transaction is atomic. All operations must succeed for the transaction to be accepted.
    – Synesso
    Mar 12, 2019 at 12:48
  • Thank you very much for the help, as I understand it is necessary to check the response from transaction and if [transaction] => tx_failed, look for which operation is wrong
    – Minherc
    Mar 12, 2019 at 13:43
  • – Synesso, Maybe you know why op_malformed ? i make topic here stellar.stackexchange.com/questions/2312/…
    – Minherc
    Mar 12, 2019 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.