Atomic transaction error: rejected by logic err=assert failed pc=701


I am trying to submit a group with multiple transactions.

The group I am testing with looks like this: [PaymentTxn,ApplicationNoOpTxn,PaymentTxn, AssetTransferTxn] and it works well. Transaction goes through as expected (signed)

If I try to double up the transactions as such: [PaymentTxn,ApplicationNoOpTxn,PaymentTxn, AssetTransferTxn,PaymentTxn,ApplicationNoOpTxn,PaymentTxn, AssetTransferTxn]

I get the following 400 error message when submitting the grouped signed transactions.

transaction DJWLUFT3JL4TFFDYSXSUZDQ2ZNLU5FCQL322PUPFPXK6Y4F4BWEA: rejected by logic err=assert failed pc=701

where DJWLUFT3JL4TFFDYSXSUZDQ2ZNLU5FCQL322PUPFPXK6Y4F4BWEA is always the 3rd signed PaymentTxn

Any insight on what this error means?

here is the relevant stack trace:

  File "/usr/local/lib/python3.9/site-packages/tinyman/v1/", line 31, in submit
    txid = self.algod.send_transactions(transaction_group.signed_transactions)
  File "/usr/local/lib/python3.9/site-packages/algosdk/v2client/", line 307, in send_transactions
    return self.send_raw_transaction(
  File "/usr/local/lib/python3.9/site-packages/algosdk/v2client/", line 237, in send_raw_transaction
    return self.algod_request("POST", req, data=txn, **kwargs)["txId"]
  File "/usr/local/lib/python3.9/site-packages/algosdk/v2client/", line 89, in algod_request
    raise error.AlgodHTTPError(e, code)

This error means the smart contract rejected your transaction.

The reason may depend on the exact smart contract.

But many smart contracts nowadays check that the size of the group is a specific number (in your case = 4 transactions). With such smart contracts you cannot combine two sets of transactions like you did in a single atomic group.

See Transaction Group for multiple LogicSig signed transactions - #6 by fabrice for the same issue with TinyMan.

Note: Ideally smart contracts should not enforce the size of the group to allow such uses. This will be the recommendation in the ABI.