Bitcoin Forum
June 22, 2024, 05:53:20 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why did this transaction need a fee?  (Read 838 times)
SebastianJu (OP)
Legendary
*
Offline Offline

Activity: 2674
Merit: 1082


Legendary Escrow Service - Tip Jar in Profile


View Profile WWW
March 26, 2013, 01:25:52 AM
 #1

Hello,

i did two transactions: aa217196a2e2d9769dc00318c827969a68fa45c4cab1e653f64936f3e745ff20 and 550efa9a890887db0034d9bf1fbc5c59758ae580b3dff45fcaea6e7bd0a66029. They are big enough to not need a fee (over 0.1BTC) and only 224Bytes big. Why did electrum say that it needs a higher fee to be processed? I ended up paying the 0.0005BTC fee but i dont see why it was enforced.

Thanks!
Sebastian

Please ALWAYS contact me through bitcointalk pm before sending someone coins.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
March 26, 2013, 01:34:58 AM
 #2

The tx are low priority.  To avoid the min mandatory fee (anti-spam fee) not to be confused with optional fees paid to increase  chance of faster processing.  A transaction must meet ALL THREE criteria

a) be high priority (priority over 57,600,000 ~= 1 bitcoin day)*
b) all outputs >= 0.01 BTC
c) total size < 10 KB

The first tx has a single input of ~4 BTC which was at the time of the tx 4 blocks "old".  Priority is (4.0E8 * 4) / 250 = 6,400,000 which is less than the threshold for high priority (57,600,000).



* Priority of each transaction is the coin age (in blocks) multiplied by the input value (in satoshi) and each input in a 2+ input tx is calculated independently.  57,600,000 works out to roughly "1 Bitcoin Day" for the average sized transaction (250 bytes).  If you receive 1 BTC and wait 1 day (144 blocks) before spending it will be high priority.  If you receive 20 BTC and wait 1/20th of a day (~7 blocks) before spending it will be high priority.  If you receive 0.1 BTC and wait 100 days before spending it will be high priority.

The exact forumla is:
priority = sum(input_value_in_base_units * input_age)/size_in_bytes

https://en.bitcoin.it/wiki/Transaction_fee
SebastianJu (OP)
Legendary
*
Offline Offline

Activity: 2674
Merit: 1082


Legendary Escrow Service - Tip Jar in Profile


View Profile WWW
March 26, 2013, 01:40:50 AM
 #3

Ah thanks... the explaination is that i made a big transaction a hour before. And the money i sent later was money that was sent to a change address in the transaction before. So the coins i sent were very new at that address.
Good to know. In future i should uncheck the use of change addresses if i want to send more than one transaction.

Please ALWAYS contact me through bitcointalk pm before sending someone coins.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
March 26, 2013, 01:53:02 AM
 #4

Ah thanks... the explaination is that i made a big transaction a hour before. And the money i sent later was money that was sent to a change address in the transaction before. So the coins i sent were very new at that address.
Good to know. In future i should uncheck the use of change addresses if i want to send more than one transaction.

I don't use electrum but I would assume if you uncheck change address the change is sent back to the original address.  When that happens the age is reset.  Bitcoin works on the concept out unspent outputs.  When you spend an output the age of the new unspent outputs is 0.  No way around that. 

By keeping more coins and letting them age you can reduce the amount of fees paid however.  If you had a 5 BTC unspent output with 8 or more confirmations you could have made the first tx without paying a fee.
SebastianJu (OP)
Legendary
*
Offline Offline

Activity: 2674
Merit: 1082


Legendary Escrow Service - Tip Jar in Profile


View Profile WWW
March 26, 2013, 01:59:15 AM
 #5

Ah thanks... the explaination is that i made a big transaction a hour before. And the money i sent later was money that was sent to a change address in the transaction before. So the coins i sent were very new at that address.
Good to know. In future i should uncheck the use of change addresses if i want to send more than one transaction.

I don't use electrum but I would assume if you uncheck change address the change is sent back to the original address.  When that happens the age is reset.  Bitcoin works on the concept out unspent outputs.  When you spend an output the age of the new unspent outputs is 0.  No way around that. 

By keeping more coins and letting them age you can reduce the amount of fees paid however.  If you had a 5 BTC unspent output with 8 or more confirmations you could have made the first tx without paying a fee.

Thanks for the info. So the only way around would be to use different addresses with btc on it.

Please ALWAYS contact me through bitcointalk pm before sending someone coins.
Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
March 27, 2013, 03:35:56 AM
 #6

Just to clarify, if I have a lot of dust, say 10 different addresses got 0.00001, and it has been only a few days, I can't "add" to those 10 addresses some BTC (like 144 BTC, for example), wait for 1 block, then transfer all those coins to another address? In order to consolidate all my dust?

Do you mean, each prior output is separate even on the same address?

SebastianJu (OP)
Legendary
*
Offline Offline

Activity: 2674
Merit: 1082


Legendary Escrow Service - Tip Jar in Profile


View Profile WWW
March 27, 2013, 02:37:29 PM
 #7

I understand it the way that once the amount of bitcoins at an address is changing the timer starts. So once you have paid in the 144BTC and you want to transfer it another way then you have to pay a fee.

Please ALWAYS contact me through bitcointalk pm before sending someone coins.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
March 27, 2013, 03:06:42 PM
 #8

Do you mean, each prior output is separate even on the same address?

Yes.  Bitcoin works on the concept out outputs.  All txs* use as an input one or more outputs of prior tx.  Outputs are either unspent or spent.   Using 2 outputs from the same address for a tx is no different then using two outputs from two different addresses.

Understanding anything about Bitcoin at the nuts and bolts level is very difficult until one grasps that concept. 

If you receive 1 BTC at address X, then 2 BTC at address X, then 3 BTC at address X you don't have "6 BTC".  You have three distinct and unique outputs (which so far happen to be unpent).  The VALUE of those unspent outputs are 6 BTC so your wallet will show 6.0 BTC but at the protocol level you have 3 unique and distinct unspent outputs.

If you create a new transaction you will use one or more of those unspent outputs (and in the process make them spent) as inputs and create one or more NEW unspent outputs.  The fact that they go to a different address or wallet (something the protocol has no concept of) is immaterial.


1) Wallets, addresses, "coins" they are all abstractions. 
2) Bitcoin is ledger of the current ownership of unspent outputs.
3) A tx has as its input one or more unspent outputs (from prior txs).
4) A tx "spends" those outputs used as the input (the purpose of the blockchain is to record they are spent and prevent respending).
5) A tx has one or more new outputs (which eventually will be used as inputs for future txs)

Bitcoin is a public ledger who's various components (digital signatures, p2p network, block generation) record the change in ownership of discrete outputs.
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1025



View Profile
March 27, 2013, 06:23:44 PM
 #9

I understand it the way that once the amount of bitcoins at an address is changing the timer starts. So once you have paid in the 144BTC and you want to transfer it another way then you have to pay a fee.
Just to clarify, if I have a lot of dust, say 10 different addresses got 0.00001, and it has been only a few days, I can't "add" to those 10 addresses some BTC (like 144 BTC, for example), wait for 1 block, then transfer all those coins to another address? In order to consolidate all my dust?

Do you mean, each prior output is separate even on the same address?

The priority is based on the sum of value*# confs for each output that is being redeemed.

To clean up small coins, you just need to redeem them in the same transaction as a large/old transaction to boost the priority.  You don't need to send coins to the same address or anything like that.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
March 31, 2013, 02:33:09 PM
 #10

Oh, okay. I get it now. Follow up question, when I spend an output, it has to take the whole amount of that particular output? Therefore the need for the change address, in case the outputs are larger than the desire amount to send to the other addresses?

So, outputs can't be partially spent. They are either spent or unspent. Correct?

DannyHamilton
Legendary
*
Offline Offline

Activity: 3430
Merit: 4672



View Profile
April 01, 2013, 03:56:00 AM
 #11

So, outputs can't be partially spent. They are either spent or unspent. Correct?

Correct.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!