2

As far as I know, a miner begins creating a new block as soon as it receives a valid block from another miner. It then begins to construct and hash the next block on top of the block it just received by using all the transactions it has in its memory pool.

However, there are still some transactions that are not easily confirmed (or not confirmed at all), in the BitCoin.

Can anyone explain to me why this can happen? Is it because of some transaction selection mechanism that the miners use? or is it because of the unreliability of the connecitivity between the nodes? or something else?

1

The lifecycle of a transaction is the following:

  1. Transaction creation:
    A sender creates a transaction, he includes a list of recipients, determines which previous transaction outputs to spend, and signs it. The difference between output total and input total determines the transaction fee.
  2. Relay:
    The sender submits the transaction to the Bitcoin network. He simply sends it to his peers, which in turn relay it to theirs. Eventually the transaction will be seen by everyone as it spreads through the network.
  3. Transaction selection:
    From all transactions that a miner is currently aware of (the "mempool"), each miner selects a subset that they want to include in a block. They usually select to include as many as are allowed (1MB), and select to create the most revenue for themselves (highest fee first). The miners are allowed to make any selection they want though, even to include no transactions at all (except the required coinbase transaction).
  4. Block discovery:
    Approximately every ten minutes, one of the miners succeeds at authoring a block. This block confirms the transactions that he previously selected by writing them to the blockchain (as long as this block ends up being part of the chain with the most work). This block in turn is relayed through the network to update all nodes of the new state of the network. The payment is considered settled at this point (with a high degree of confidence, although a few extra confirmations don't hurt).

There are multiple ways for a transaction to fail getting confirmed along the way:

  1. The transaction is invalid, e.g. by spending unavailable money, being malformatted, being in conflict with a confirmed transaction, or the signature being incorrect. Nodes will not relay invalid transactions and if they already have them, drop them from their mempool.
  2. The transaction doesn't get relayed. This happens e.g. when the transaction fee is below the minRelayTxFee of the sender's peers. The senders will not add such a transaction to their mempool and will not relay it.
  3. The transaction doesn't get selected for block templates. If a transaction doesn't belong to the top 1MB by transaction fee rate, it will usually be delayed significantly, until the feerate comes down to its own, it is made invalid by a competing transaction, or a miner is incentivized in another way to include it in a block. Such transactions may time out eventually (How do transactions leave the memory pool?), but can remain valid indefinitely.

So, 1) there is a strict limit in the supply of blockspace with 1MB per ~ten minutes, and 2) Bitcoin transactions are useful in a number ways, it stands to reason that there will always be some sort of minimum bid to use blockspace (e.g. consolidation of low value unspent outputs, timestamping, colored coin applications, decentralized backups, poetry…). It follows that there will always be more demand for blockspace than supply and the price for blockspace will find some sort of balance at a fee rate where demand and supply match. Therefore, there will always be some unconfirmed transaction.

  • Like minRelayTxFee, is there also an upper bound for the fees? – Önder Gürcan Jun 8 '17 at 9:11
  • I believe that some wallets will not relay a transaction with too high a fee in order to protect users from mistakes (e.g. it has happened that users have mixed up transaction fees and send amount and paid 300 BTC transaction fees), but besides that there isn't really one. – Murch Jun 8 '17 at 15:10
1

Transactions selected in mining blocks is not like a queue, where you wait your time and get to the front eventually.

Fees are not mandatory, but should be included in every transaction, if you have sent none, or low fees, you can still be selected (although it's highly unlikely), but the miner would be silly as they could just take the higher fee offered by someone else. Remember when you post a transaction you offer a fee.

If you owned a bakery and made 1000 loaves of bread a day, but had 1500 customers, would you sell them to someone offering $0.10 when other people are offering $1.00+.

  • If this is the case, it means that the system does not gurantee that my transaction will be confirmed. In addition, such a fee policy is creating a free market where fees always go up. In this case, what is the attraction for people to use BitCoin (unless he is not doing some illegal/hidden stuff)? What is the logic behind of such transaction fee policy? – Önder Gürcan Jun 7 '17 at 12:23
  • "What is the logic behind of such transaction fee policy?" Miners have to get paid somehow; they buy and operate expensive, specialized computers, and use lots of electricity, which costs a lot of money. How would you propose that miners get paid if not through fees? – abelenky Jun 7 '17 at 13:54
  • @ÖnderGürcan You're assuming blocks are always full, on days when only 500 people walk into your shop, you can sell to the guy who wants it for $0.10, although you're under no obligation. Once the Bitcoin scaling issue is resolved, fees should start to come down. But it's unlikely to change for the better in the short term, neither solution offers short term resolutions. – Daniel Morritt Jun 7 '17 at 15:01
  • I do understand. But is there any statistics showing how much does it cost for a miner to create a block? We all know that it gets at least 25 BTC for the block generation (which is around 60000 dolars now). I am not againt that miner should earn money but, do they earn a reasonable money or they earn too much? 1 to 10 or 1 to 1 million? – Önder Gürcan Jun 7 '17 at 15:29
  • After the last halvening, miners get 12.5 BTC per block. Block creation is a bit of a hit topic, but usually results in several thousand dollars in fees, personally I think that's excessive, but they might have different opinions. Miners can also mine empty blocks (no transactions), and it could actually be a good idea (if a bit evil from a user perspective) as nodes can relay that faster than a 1MB block. – Daniel Morritt Jun 8 '17 at 11:42
-1

if you dont give enough fee, you can wait a loot of time for the transaction to be completet.

i did yesterday 1000€ transaktion and i gived the fee´s for 100€ - it was in 3-4 hours done and accepted.

.. it gives a queue - if your fee is 0.10 cent and from another guys 1-2-3 euro or more.

they will be first placed befor you !..

so if you are unlucky will be all transaction befor you placed..

i think so becouse since 1 month i bought anythink for 200 euro and it was 2 months unconfirmed transaktion....

i hope i can help you--

do this trick like me - give everytime 3x more fee than normal. and all is okay :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.