Given a Tx message, how does one calculate how big a fee one paid for the transaction?
Use the following pseudocode:
TotalOutputValue = 0 For each Output in tx_out array TotalOutputValue += Output[value] TotalInputValue = 0 For each Input in tx_in array PreviousOutput = Input[previous_output] PreviousTransaction = PreviousOutput[hash] OutputIndex = PreviousOutput[index] Look up the transaction with hash PreviousTransaction Output = The output with index OutputIndex in that transaction TotalInputValue += Output[value] Fee = TotalInputValue - TotalOutputValue
you will find more details ( and less technical than pseudocode ) concerning the fee structure on : https://en.bitcoin.it/wiki/Transaction_fees see also https://en.bitcoin.it/wiki/Free_transaction_relay_policy
This isn't possible with just the message.