Blockchain transaction history secondlife
10 commentsBitcoin mining asic miner block erupter
While that is true in some cases, sometimes a transaction fee is required. The fee, when it is required, is usually worth a few dollars. The fees go to the miners to incentivise them to keep mining, which in turn keeps the Bitcoin network secure.
They already get a reward of The plan is that as the block reward diminishes over the time, it will be replaced by transaction fees. Well, like everything else in Bitcoin, the fee structure is built into the network rules , which are defined as "what the reference client does". When you attempt to send coins using bitcoin core the current reference client , it goes through the following steps:.
The client has to decide which of your coins to use to make up the payment amount. Each time you receive a payment, the payment goes into your wallet and stays there until you spend it. They don't "merge" into a single 5 XBT coin. Over time you'll build up a collection of differently sized amounts in your wallet, and the client needs to decide which ones make the best fit for the amount you're trying to spend.
These amounts are known as the "inputs" of your new transaction, and the amounts you are sending including any change that gets sent back to your own wallet are known as the "outputs". If any of the outputs including any change of your transaction are less than 0.
The coin selection algorithm is careful to avoid selecting coins that result in a change amount of less than 0. If the coins you're spending are too small or too new then your transaction won't qualify as free. Each transaction is assigned a priority, determined by the age, size, and number of its inputs. Specifically, for each input, the client calculates the value of the input in XBT multiplied by the age of the input in blocks.
It sums these products over all inputs and divides the total by the size of the transaction in bytes. If this gives a number less than 0. If step 3 caused a transaction to require a fee when it was originally sent, it's possible that as time passes, and new blocks are found, the transaction's inputs will age, its priority will increase, and as a result step 3 may no longer cause it to require a fee.
The size depends on the numbers of inputs and outputs, and is roughly:. If this size is less than 10, bytes and step 3 found that the transaction's priority was high enough to qualify as free, then the transaction still qualifies as free, otherwise a fee is required. The fee is charged per bytes or part thereof.
The amount charged per bytes defaults to 0. If you set the "fee per kB" to less than 0. When it applies, this fee per kB replaces any fee from step 2, rather than adding to it.
All these rules are visible in the reference client's source code. You want to buy something for 2. The coin selection code has no choice; it has to select both coins to get a big enough total to make the transaction.
That means the change will be 0. As a result your transaction will fail, because the amount you're sending plus the fee is more than you have. What this means is that there's no way of spending 2. You could send the full 3 XBT to the vendor without a fee assuming the outputs are sufficiently old to satisfy step 3 , but some vendors ask you to send the exact amount they specify. Once, someone got lucky and turned 0. When the site paid out the winnings they didn't have a single XBT input lying around in their wallet.
Instead what they had was a whole bunch of various sized outputs from other players' losing bets, as well as a lot of change from paying other winners. Being over bytes, this required a fee of 0.
That's more than the player bet in the first place. Who says Bitcoin transactions are free! Note that the dice game actually included a fee of 0. That's probably because they don't use the standard satoshi client to create their transactions, and the client they used got it slightly wrong. It's bytes long, which is the biggest a transaction can be without requiring a fee. Notice also that all but one of the inputs are only 10 nXBT 0.
Incidentally, the concept of "required fee" isn't strictly enforced. Some miners don't follow the rules about what fees are required, and will include a transaction in their blocks even if it doesn't follow the fee rules. Using the "raw transactions" interface of the reference client it's possible to create transactions with less than the required amount of fee. Such transactions may eventually be included in a block by a maverick miner who doesn't enforce the fee rules, although this could take 24 hours or even much longer.
So it's all pretty complex, but hopefully this gives you a better understanding of how and why the client decides when and how much to charge you. When you attempt to send coins using bitcoin core the current reference client , it goes through the following steps: Pick which coins to spend The client has to decide which of your coins to use to make up the payment amount. Discourage "dust" spam If any of the outputs including any change of your transaction are less than 0.
Prioritize old and high-value coins If the coins you're spending are too small or too new then your transaction won't qualify as free. The size depends on the numbers of inputs and outputs, and is roughly: When Too Much is Not Enough The Big Dice Winner Once, someone got lucky and turned 0.
Are "required" fees really required?