Cannot calculate suggested fees for inner transactions

Thanks for the reply. :slight_smile:

The simplest solution for that is to set:

suggested_params.min_fee = suggested_params.min_fee * 2

I have been trying this, but the min_fee has no effect on whether the transaction is accepted or rejected.

For example, I have tried:

# Delete Application Txn which contains one Inner Transaction

suggusted_params = algod.suggested_params()
suggusted_params.min_fee *= 2
txn = transaction.ApplicationDeleteTxn(
    sender=sender.address,
    sp=suggusted_params,
    index=application_id
)

# ...
# Application Call Txn which contains one Inner Transactions

suggusted_params = algod.suggested_params()
txn_1 = transaction.PaymentTxn(
    sender=sender.address,
    sp=suggusted_params,
    receiver=utils.get_application_address(application_id),
    amt=amount
)

suggusted_params = algod.suggested_params()
suggusted_params.min_fee *= 2
print(suggusted_params.min_fee, '!!!') # 2000 !!!
txn_2 = transaction.ApplicationNoOpTxn(
    sender=sender.address,
    sp=suggusted_params,
    index=application_id,
    app_args=['return_to_sender']
)

# ...

But they still throw: logic eval error: fee too small. Even multiplying min_fee by 1000 shows the same result.

However, setting suggusted_params.fee = 10 does work.

I am testing on the Sandbox Release network currently.

Unless I am mistaken, the issue is still remains:

  • The only way to pay for inner transaction fees is to set suggusted_params.fee
  • Which is problematic because there is no way to obtain the fee per byte
    • algod.suggested_params() (and REST API) only returns fee=0 on all networks

Checking the fee via side note

This looks acceptable is you’re ready to accept paying 100 times the min fee.

To clarify, I set the max fee on the application call to 100x because I assumed:

  • The fees will still be quite low
  • It will definitely pay for all inner transactions
  • The user can decide how much they want to pay for transaction speed
  • It is future-proof

So I was just wondering if this intuition was accurate.

I would say that in general I would just either force Txn.fee() == 0 or Txn.fee() <= Global.min_txn_fee() and expect the user to pay the required extra fees via fee pooling in the outer transaction in case of congestion.

If there is only one outer transaction (the application call), I need the at least: Txn.fee() <= Global.min_txn_fee() * (1 + NUM_INNER_TXNS).

My intention was to pay for inner transactions using the fees on a standalone Application Call Transaction.

When I have multiple outer transactions, and there are congestion benefits to pooling, I’ll keep that in mind. :slight_smile: