According to a different StackExchange question, the max transaction weight is half the penalty-free block weight, or was in protocol v8.
Looking into it however, I found check_tx_semantic()
which says:
get_transaction_weight(tx) >= m_blockchain_storage.get_current_cumulative_block_weight_limit() - CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE
Now, get_current_cumulative_block_weight_limit()
gets m_current_block_cumul_weight_limit
which is the max block size, so it seems there are conflicting ideas.
What is the correct maximum transaction weight in protocol v12?
Note: after bulletproofs in protocol v8, transaction size gets inflated when there are more than two outputs. The new metric is called 'transaction weight'.