The owners of cryptocurrencies are often faced with the problem of “freezing” of a transaction. Some expectation has been delayed for a week! And it happens most often at the most inconvenient time — when the rate of reeling.

Why is this happening

The root of the problem lies in the structure of the blockchain.

The size of one unit of bitcoin at the beginning of 2019 1 MB, which seats up to 2000-3000 transactions. The creation of the miners of one unit takes an average of 10 minutes. In the blockchain, the transaction was considered successful, confirmation is required 2-6 nodes in the network. Confirmation is not only in error checking of the new unit and his inclusion in the block chain, but in subsequent use chains with this unit. Confirmation each additional node within 10 minutes.

Commission of the network, which pays users, commit the transaction is to pay miners for including the transaction in the blockchain. The more Commission, the more likely the miner will process your transaction.

Mempool

Mempool (mempool) is the place where all transactions until you confirm and include in the block. To view the current status here. The data in the table grouped by the appropriate fee. Each line shows the number of transactions in queue when the respective Commission expected the block inclusion and its associated delay, in minutes. For convenience, allowed selection of the view of the Commission: Satoshi, mBTC (Mili bitcoin), BTC. Checking the current status of Nampula, it is possible to accurately calculate the required Commission the network that the transaction took place, for example, in the next five or six hours. You can visit the website of the blockchain, which presents graphs of the number of transactions pending approval. Changing the time scale of the chart, you can make statistics of the network load hourly and by day of the month.

Acceleration of the transaction

If the transaction with a small Commission is already in the queue and “hung” there for a long time, it can be accelerated in several ways. Consider the example easy e-wallet “Electrum”.

Replace by fee

The first method is to use the function of the purse “Replacement for a fee” (Replace by fee). This method can only be used by the sender.

With this feature somehow already was a good article on habré, therefore here it is described briefly.

It is present not only in Electrum, but also other software wallets such as Bitcoin Core, Airbits, GreenAddress and others. The screenshot below shows how you can enable this feature in Electrum wallet.

Once the option is activated, you can try to speed up the unconfirmed transaction. After pressing the right mouse button on “hung” transactions on the “History” tab will bring up a contextual menu in which there is a line “Increase fee” (the fee Increase).

It should be noted that specifically in the Electrum wallet to use the function “Substitute for compensation” you must have some balance in the wallet balance.

The whole mechanism of Replace-by-fee (RBF) is described in BIP-0125. Briefly, it consists in the following: in mempool sent a new transaction with a higher Commission and a new number nSequence. Note that this number must be less than 0xffffffff — 1. If the transaction sent without the support of RBF, its nSequence automatically becomes the maximum, so this method speed up the transaction becomes impractical. The function “Substitute for compensation” does not create a problem of double payment — a situation when the pool rejects new transaction, because manule still “hanging” unconfirmed.

Child Pays for Parent

The second method is called “Children pay for parents,” he CPFP (Child Pays for Parent). This operation is available to recipients of funds.

The mechanism is as follows: the expected transaction with a low Commission attaches a new transaction (e.g., its addresses) with high Commission. The possibility of obtaining a high fee leads to the fact that the miner probably includes a bunch of transactions in the block.

In the same Electrum wallet see the list of incoming transactions pending approval. When you right-click the transaction you can see the string “Child pays for parent” drop-down menu. Next, we need only establish the Commission, which will speed up confirmation of the transaction by the miners.

After confirming the procedure in the transactions list you will see another pending confirmation. Thus, for these two transactions will take into account the total Commission, the magnitude of which will depend on the speed of the inclusion of bundles of transactions in the block.

To pay the miners

The third way is to use third — party service. For example, go to https://www.btcaccelerator.net/. Referred to the Commission, e-mail ID and bitcoin unconfirmed transactions. Then paid the specified Commission expected to transfer their bitcoins. The service includes paid transactions found in the blocks your mining-pool, providing an interface between the owner of the crypt with the miner.

Sometimes bitcoin happen overload caused by invasion of the users or hacker attacks that cause it to lock up multiple transactions and pay very high fee for rapid inclusion of transaction in the next couple of blocks. Often, if you don’t “burn the pipe”, it makes sense to wait reduce the queue to a lower Commission for sufficient time to make the transfer.