Search code examples
blockchainbitcoin

Does each transaction take more than a few minutes to finish in blockchain?


I am new to blockchain and have a question about the performance.

Miners in blockchain needs to solve a mathematic puzzle in order to create a block and the process may take a few minutes to finish.

Does this mean it takes a few minutes to complete a transaction?

For example, if I buy a pizza with bitcoin, do I need to wait for a few minutes before I can get the pizza?


Solution

  • Firstly, "injecting" a transaction into the blockchain network does not mean that it will be immediately accepted for execution (included in the block) - it depends on the queue size determined by the current load, as well as on the transaction prioritization capabilities determined by the protocol used.

    Secondly, the most popular blockchain networks based on the Bitcoin and Ethereum protocols use conditional finalization of the transaction - the block in which the transaction was included can be excluded from the main chain due to a fork and, thus, the transaction becomes unexecuted again and returns to the pending queue. In order to make sure that the transaction is finally included in the main chain (more precisely, with a sufficiently high probability), it is recommended to wait until another 4-6 blocks are added "on top" of the block with the transaction. For Bitcoin, this time will be 40-60 minutes, and for Ethereum - 60-90 seconds.