4

Test Plan:

The testing transactions were all "Pay 0.0001XLM", and there is far enough XLM to send. 5000 channel accounts were set up to try to prevent bad seq, but unfortunately it still happens as TPS > 100. Js-stellar-sdk was used.

On higher TPS testings, I encountered two similar bad sequence error codes.


result_xdr: 'AAAAAAAAAGT////7AAAAAA=='

TransactionResult

feeCharged: 100

result: [txBadSeq]


result_xdr: 'AAAAAAAAAAD////7AAAAAA=='

TransactionResult

feeCharged: 0

result: [txBadSeq]


To my understanding, fee is charged once a tx is submitted to the network for consensus. However, as I tested with Laboratory, if I am NOT using the upcoming seq_num (used or ) for this simple payment, it does not charge the fee... Any idea why the former case happened?

3

When you use a Horizon server to submit a transaction, it preforms some basic checks of the transaction integrity before sending it over to Stellar core. For example, it checks if all mandatory fields (like "source account" or "account sequence") are set.

On the contrary, Stellar core charges fees even for failed transactions. I assume, it's an intentional behavior to prevent flooding.

So if you specify a wrong sequence number, your transaction will pass all basic checks. And then it will be rejected by Stellar Core, fees charged regardless of the operation success.

In case is the account sequence was omitted, the transaction will be rejected before passing to Stellar Core.

  • Thanks @Orbit Lens, but I still could not manage to reproduce this scenario unless under constant high TPS. Just went to testnet laboratory and intentionally use wrong seq_num, but no luck with reproducing the error with fee deducted. – cesarm May 4 '18 at 9:53
  • As I was repeating the same thing (send 1 unit asset "ABC", using channel accounts) over and over again, the error should be often recurring. In reality only a small portion failed with 100-fee deducted... – cesarm May 4 '18 at 9:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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