What to do if the transaction is not confirmed? Bitcoin transaction confirmation time: how long to wait? Why does it take a long time for a Bitcoin transaction to be confirmed?

Many people have probably already encountered the problem of frozen cue balls (while sending and receiving).
In most cases, this is due to network spam and low fees for miners (hereinafter referred to as commission).
Before sending bitcoins, I would advise you to look at the state of the network and set the commission that these services recommend:
https://btc.com/stats/unconfirmed-tx

If it so happens that you sent a commission less than the recommended one or simply your transaction is stuck in unconfirmed and is not included in the block, then use this service to “push”:

Take your th(id) transaction:
Example:

And enter the id here:


Note!

When the network is congested, it is not always possible to enter Bitcoin successfully the first time using this service.

You may receive a message like this:

Submissions are beyond limit. Please try later.

Click to expand...

You need to drive until you get the status: Successful.

After this, your transaction will be picked up and drawn into the block for processing.

What to do if your Bitcoin transaction is not confirmed ("stuck")?

At first you can just wait. If several hours (or even days) have passed and you’re tired of waiting, then there are several options:

  1. Make a doublespend. Features: can only be done by the sender.
  2. Use CPFP. Features: can be done by the recipient and usually by the sender.
  3. Use replace-by-fee. Features: only the sender can and if he has taken care in advance; not all wallets can.
  4. Use the "accelerator" from viabtc. Features: the recipient and the sender can, but the service is often overloaded and there are restrictions on the transaction.
How to make a doublespend (double spend)?

We proceed according to the following algorithm (the algorithm is described for the Bitcoin Core wallet; for other wallets the actions are similar, but the commands will be different):

SpoilerTarget"> Spoiler: algorithm

1) Make sure that it is waiting for confirmation. To do this, copy your transaction id and paste it into the search bar of the blockchain.info service (as well as bitaps.com, blocktrail.com/BTC or similar). Next, we look for the line “unconfirmed transaction”. Found it? This means the transaction is waiting for confirmation.
Note. We don’t look at the “Estimated Confirmation Time” on the page with your blockchain.info transaction - we don’t know what’s there.

2) Now close the wallet and launch it from the command line with the -zapwallettxes parameter and wait until it opens. When the wallet starts, all unconfirmed transactions from it will disappear (but they are still on the network!). For bitcoin core 0.14, you will need to rename or move the mempool.dat file before launching (the mempool in this version is saved to a file and the old transaction remains there).
Note. Why not with the -salvagewallet parameter? -zapwallettxes will not affect your key names, but -salvagewallet will remove them. Also, bitcoin core sometimes crashes when running with - salvagewallet and then your wallet.dat will be damaged. True, a copy will be created next to it in advance.

3) Now you can create a new transaction, not forgetting to set an adequate commission. But! Since your old transaction is still online, it may be unexpectedly confirmed someday. If this does not suit you, then the new transaction will have to have at least one of the inputs match one of the inputs of the old one. To do this, look at the “inputs” column on your transaction page on the website blocktrail.com/BTC or an analogue, and enter the exact size of the input in cue balls. After that, when creating a transaction in the wallet, click on the “inputs...” button, find the same exact number in cue balls in the list and select it (if there are several of them, then select with the same receiving address and time). After this, we select some more inputs so that the total amount is greater than the transaction amount with the future commission; It’s better to choose with a reserve. Next, fill out all the fields as usual (don’t forget about the commission!) and send.


How to use CPFP? What if I am not the sender, but the recipient of the transaction?

There is such a method and it is suitable for recipients; It is also suitable for the sender if your transaction had “change” (usually there is). This method is a little more expensive and how many pools support it is unknown (as of the beginning of 2017, at least two pools support it). You can try using the CPFP (child pays for parent) mechanism. To do this, you must spend one of the outputs of the problematic transaction with a commission that is enough for both transactions at once - the new and the old. That is, you simply create a transaction with one input (this should be one of the problematic outputs, for example, change) and send the bitcoins to yourself. Set the commission so that it is enough for both at once: to do this, sum up their sizes, multiply by the number from the paragraph “How to choose an adequate commission?”, divide by the size of the new one in kilobytes and enter it in the “custom transaction fee” column when sending the transaction. More details for the Bitcoin Core wallet under the spoiler:

SpoilerTarget">Spoiler

For example, let's say you are the recipient and should receive 0.08500148 btc. In order to use CPFP, in Bitcoin Core click "Settings" -> "Options" -> "Wallet" ("Settings" -> "Options" -> "Wallet"); check the boxes for “Enable coin control features” and “Spend unconfirmed change” if they are not checked (then you can remove them); Now close the settings window and click “Send”, then click the “Inputs...” button and check the amount 0.08500148; then “OK”, put your address as the recipient; quantity set to 0.08500148 and the “subtract fee from amount” checkbox; set the commission “selectively” (“custom”), “per kilobyte” (“per kilobyte”) and write it based on 2 transactions using the formula ((size of the old transaction)/(size of the new transaction) + 1)*(adequate commission for kilobyte or better). Sending.

All. Now you wait. Those pools that “understand” this scheme will happily accept both transactions at once. This may not be fast if there are few such pools.


How to cancel a transaction? Can a transaction cancel itself?

Once a transaction is confirmed (included in a block), it cannot be reversed or reversed. To cancel an unconfirmed transaction, you need to create a transaction competing with it and ensure that it is included in the block - see point (2) of the answer to the question “What to do if the Bitcoin transaction you sent is not confirmed (“stuck”)?”. In any case, there is no guarantee of success here.

An unconfirmed transaction itself cannot be canceled - only the display in your wallet can change. Next, see the answer to the question “My transaction was unconfirmed for several days, and then disappeared and the money was returned. Now everything is fine and can I just send the money again?”

My transaction remained unconfirmed for several days, and then disappeared and the money was returned. Now everything is fine and can I just send the money again?

No! Your old transaction is still online and may unexpectedly be confirmed. To avoid this, see point (2) of the answer to the question “What to do if the Bitcoin transaction you sent is not confirmed (“stuck”)?” (under the spoiler). If you change your mind about making that translation, you can make the translation yourself.

How to protect yourself from frozen transactions?

  1. Set an adequate commission.
  2. Enable the replace-by-fee mechanism in your wallet and mark all transactions as replaceable if your wallet supports it (electrum seems to support it). This will allow you to easily increase the commission if a problem arises.


An unconfirmed Bitcoin transaction is a transaction in the cryptocurrency network that, after initiation, did not receive a place in the next block of the chain. The number of transactions with Bitcoin is growing, so competition appears when filling out the elements of the blockchain. The block size remains unchanged and is only 1000 KB (1 MB). It is not surprising that the crypto network is increasingly experiencing delays that last for 5–7 hours or more.

Such situations create difficulties for people who were planning to transfer money quickly but are faced with an unexpected pause in the transaction. What to do? What to do if the payment is stuck? What are the features of each method? We will consider these and other nuances below.

Why might a Bitcoin transaction get stuck?

The time to send cryptocurrency to another user depends on a number of factors - network congestion at the time of transfer, the size of the installed one, the volume of the transaction, as well as the priority of the payment. To clarify the time remaining for confirmation (at least approximately), you can go to a special service (for example, blockchain.info), and then indicate the operation ID in the search term.

There are many reasons why a Bitcoin transaction is not confirmed:

  1. The transaction is pushed out of the block by another operation, which has priority. This is possible when the size of a chain element approaches the limiting parameter, and the transfer of a network participant was the last.
  2. The “lifetime” of the payment, which is equal to 72 hours, is ending.
  3. A conflict appears between the current transaction and another transaction that was previously confirmed.
  4. The payment is replaced by the sender with another payment.
An operation that is "squeezed out" of a block may return to the sender's storage (when it receives a failed transaction status) or hang. Sometimes the payment is sent by the wallet again and again. In such a situation, the money is “frozen” and cannot be used. The following information appears in the wallet: “Status:0/unconfirmed, in memory pool.”

The latter situation rarely occurs. As a rule, after 3 days the money is returned to the sender’s storage. This happens if a person sent a small amount and set too low or zero commission.

What to do if a Bitcoin transaction is stuck - all options


The increase in demand for Bitcoin and delays in confirming transactions have led to a new round of discussions about Bitcoin's scalability issues. The current block size of 1 MB is not enough to cover the needs of users who make millions of transfers every day. If we assume that the average transaction size is 0.5 KB, one block can accommodate 2000 transactions, and there are tens of times more real requests. As a result, large payments with high commissions “make their way” to the next node, while the rest hang in the status of unconfirmed and await their turn. Below we will consider how to act in a situation if a Bitcoin transaction is stuck.

Wait for the transaction to complete

If time is pressing, you don’t have to force things and just wait. A common reason for the delay is related to the network load and the limited number of miners involved in the formation of the next block. If the network is not highly volatile or congested, the reason may be low fees. You can find out the optimal premium at btc.com/stats/unconfirmed-tx. As of April 11, 2018, the recommended payment amount is 0.00001 Bitcoin per 1 KB. Therefore, when conducting a transaction with a volume of 500 KB, the commission should be at least 0.0005 BTC.

Replace by fee

For you can replace the commission. This option is available to the sender of funds. The official name of the option is Replace by fee (RBF). If it is absent, the repeated transfer will not pass verification and will be discarded by the blockchain. This is due to the fact that double spending of the same funds is prohibited. Enabling this option informs the system that the transaction is correct.

The essence of the function is simple. It is known that payments with a lower commission take longer to complete than transactions for which a higher premium is assigned. If the user increases the reward, the transaction will move forward in the queue and will be one of the first to be completed. This feature is called “selective replacement of commission” (Replace by fee). The point is that the operation does not change - additional commissions are simply added to it.

When carrying out such a manipulation, it is important to be careful, because the system may perceive the action as double spending and block the payment. If you use the RBF option, transaction rejection is excluded. When the function is enabled, the network sees an operation that has a large commission, after which the transaction moves forward in the queue and is executed faster.

The presence of such an option does not yet guarantee a quick transfer, because it depends on the miners who form the blocks. The reason is that not all network participants work with Replace by fee. In addition, RBF is not relevant for all wallets. Today it is supported by Electrum and GreenAddress wallets. As for Bitcoin Core, this feature is available by enabling additional scripts.

To activate the option, just go to your wallet and activate the Replace by fee option. As a rule, this is enough to speed up the translation and prevent it from getting stuck on the network.

Accelerators

Unconfirmed Bitcoin transactions can be “pushed” using special accelerators. One of the options is the viaBTC mining pool, which allows you to reduce the transfer time. Despite its relative youth, the service has earned popularity in wide circles and is often used to speed up stalled transactions in the cryptocurrency network. If the transaction does not reach the recipient within a day or more, the help of such a pool will be useful.

Disadvantages of viaBTC to speed up Bitcoin transaction:

  1. The service is difficult to manage, so it’s worth taking the time to consider its capabilities before using it.
  2. The program works with a small number of transactions, which leads to periodic freezes during application. In practice, the accelerator processes several trades within 60 minutes, which limits its capabilities.
  3. It is not always possible to enter the pool. For example, on April 11, 2018, problems arose with this. The system asks you to log in to the page later.
  4. In the future, a fee will be charged for the platform’s services, depending on the size of the transaction.
To launch the accelerator, an operation ID is required, as well as entering a captcha. The service examines the entered information and queues the transfer. If the transaction is marked by the service, it is transferred to the block received by the pool.

An alternative for the site considered is the AntPool pool. In addition, you can find aggregator resources on the Internet (for example, perenosi.com), accelerator bots are being developed for the Telegram messenger (for example @FastTXbot).

Double Spending

If a Bitcoin transaction is stuck, you can use another technique - transfer the money a second time using the same service. For example, a network participant sees that the payment does not go through for a long time and is in limbo. Here you can take advantage of the features of blockchain - carrying out several operations at once.

The point is that the amount of funds in the account is checked at a certain point in time. If the first transfer was unsuccessful, the sender has the right to change some parameters, for example, increase the premium amount and make the payment again. There is no need to worry that both operations will work. According to the rules of the cryptocurrency network, when sending the same asset, a transaction is carried out that has more favorable conditions for network participants (miners). The remaining analogues are destroyed. The only risk is chain branching, so using the Double Spending option should be approached with caution.

Let's look at what needs to be done to apply the technique using Bitcoin Core as an example. Note that for other wallets the approach remains similar. The difference may lie in the names of the commands, but the general sequence does not change. The algorithm is like this:

  1. We are preparing for Double Spending. To do this, it is important to ensure that the transaction is stuck. There are cases when a transaction is confirmed, but for various reasons does not reach the recipient. To check, it is recommended to use the previously mentioned website blockchain.info. If the transaction has the phrase “unconfirmed transaction” next to it, proceed to further steps. In addition, you can pay attention to the time of the transaction, but it is approximate.
  2. Close the Bitcoin storage program, after which we enter the word “zapwallettxes” in the command line. It is prohibited to use other command options, as it is possible that the key will be accidentally deleted and you will lose access to money.
  3. We are waiting for the launch of the wallet. After launch, there will no longer be frozen transactions. But you shouldn’t rejoice ahead of time, because they are still stored in the cryptocurrency network. By the way, users of Bitcoin Core old version 0.14 must change the name or send the mempool.dat document to another folder, and then enter the program.
  4. We carry out a new transaction indicating a higher commission. Remember that the risk of confirming the previous transaction after some time remains. To exclude such a situation, it is important to indicate in the new payment parameters that are as similar as possible to the previously performed (unsuccessful) operation. In this case, the system will not allow it to be executed. For example, it is important to specify the identical input size in Bitcoin (you can find the required parameter in the inputs section). As for the transaction size, it can be increased to speed up the transfer.
  5. Fill in the required fields according to the usual plan (as when conducting a standard transaction).
  6. We are waiting for the operation to complete, which should go faster.

CPFP

A popular payment push method is Child Pays for Parent. It is suitable in a situation where the storage used does not allow enabling the RBF option discussed above. The disadvantage of this method is that you have to pay for it. In addition, only a small number of pools support the use of CPFP. To “promote” a transaction that is having difficulty, you must use any of the transaction outputs. It is important that the amount in the account is sufficient to carry out two transactions.

The point is that the sender creates another transfer using the output to complete a new transaction. Bitcoins can be sent to any address. The main thing is to use the change from the stuck payment. An equally important nuance is the size of the commission payment, which must be specified for two operations at once.

Let's consider the application of this method using the Bitcoin Core wallet as an example. The initial condition is a transaction of 0.095 Bitcoins. The algorithm is like this:

  1. Go to the settings section and select the options button.
  2. We enter the “Wallet” subcategory and enable input management (check the special field). Here we put a check mark, allowing you to spend unconfirmed change. There are situations when the mentioned checkboxes are already checked (in this case, we do not change anything).
  3. Close the window and click on the send button.
  4. Go to the inputs section and put a checkmark next to the amount of interest (in our case, 0.095 BTC).
  5. We indicate the address of the receiving party, after which we approve the actions by clicking on the “OK” button.
  6. Set the number to 0.095 and click on the checkbox next to the “Subtract commission from amount” command. Here we note a selective commission payment per kilobyte. It is important to note that the premium is calculated based on two transactions. The calculation is carried out as follows. First, the amount of the previous transaction is divided by the amount of the new payment. One is added to the resulting number, and the total is multiplied by the optimal commission for 1 KB.
As noted, not all pools work with this scheme, but if such an option is available, it is worth using it.

Dynamic commission change

One of the reasons why Bitcoin transactions are not confirmed is the low commission. To change the situation in your favor, you can dynamically change this parameter through your wallet. To do this, the wallet must support such a function. The essence of special storage is that they automatically calculate the optimal amount of remuneration at which the operation in the cryptocurrency network proceeds faster. If the wallet owner agrees with the proposed parameter, the transaction is included in the next block without delay.

Dynamic commission editing allows you to calculate the priority of a transaction. The approach here is simple. The higher the premium, the higher the priority. This rule is especially relevant during periods of maximum network load. If a user has specified a high reward and the transaction is still stuck, this requires urgent action. Often the problem is related to the use of older versions of Bitcoin wallets. In this case, there are two ways - update the existing one or install a new wallet.

Rollback an unconfirmed transaction

Another way to solve the freezing problem is to cancel the Bitcoin transaction. For example, in the case of Bitcoin Core you need to do the following:

  1. We make sure through the blockchain website that the transaction is not confirmed.
  2. We enter the wallet, and then into the debugging section, for which we go along the path “help, debug window and console”. If the wallet is encrypted, access is required. To do this, enter the command walletpassphrase< passphrase >.
  3. We receive a personal key from the required address. To do this, specify the phrase dumpprivkey< address >. We change the word in curly brackets to the address used for the transaction. The resulting key must be copied to a separate location. In the case of a group operation, when Bitcoins were sent from several accounts, keys are needed for each of them. Having this data at hand allows access to the account.
  4. We close the office and remove the wallet. The only thing worth saving is wallet.dat. It is recommended to rename this file in advance and move it to another folder.
  5. We restart the program and wait for the creation of a new wallet. We paste the received keys into it, go to the debugging panel and enter importprivkey< privkey >. Transferring information takes some time. It is important that the process is not interrupted.
  6. Let's check the account. Stuck transactions are deleted, and blocked money is available for transfer. Now you can complete the transaction again, but with a higher commission.
The considered method does not give results if cloud storage is used for translation.

How to protect yourself from unconfirmed Bitcoin transactions?


To protect yourself from problems with stuck Bitcoin transactions in the future, you need to do the following:
  1. Immediately set the optimal premium for the transaction. The desire to save money can result in a long time spent waiting for confirmation of the operation. Decide right away what is more important - speed or savings.
  2. Before making a transaction, it is important to enable the RBF option mentioned above. Further, when conducting transactions through the wallet, it is recommended to mark Replaceable. But you should make sure that your wallet supports this option.
If an adequate commission has been set, but the transaction is still stuck, you cannot remain idle. In this case, there is a high risk of the translation being stuck for a long time. To solve the problem, the methods discussed in the article will be useful. The main thing is not to panic, because transaction delays are common in the Bitcoin cryptocurrency network. First you need to figure out the cause of the problem, and only then begin to solve it. As a rule, an accelerator or double spending helps. But it is better to avoid such delays and immediately set the current commission.

What to do if a Bitcoin transaction is stuck, see the following video:

This means more blocks are filled. And since all transactions cannot be immediately included in the blockchain, a nuisance arises, which miners call a “mempool” (a type of “transaction queue.”)

Miners usually choose those transactions that have higher commissions and include them in the block first. Transactions that have lower fees are “sent” to the so-called “fee market”, and remain in the miner mempool until a new block is found. If the transaction is sent again, it will again have to wait for the next block.

This may result in a less than optimal user experience. Transactions with very low fees may take hours or even days to confirm, and in some cases may not be confirmed at all.

And here's what you can do today to stop your transaction from getting stuck.

Before you send it

During the early years of Bitcoin, most wallets added a fixed fee for outgoing transactions: typically 0.1 mBTC. Since the miners had enough space in the blocks, they had no problem including these transactions in the first block they were able to mine. (In fact, transactions with even lower fees or even no fees were included in blocks just as quickly.)

With increasing competition for block space, the fixed fee of 0.1 mBTC became insufficient for a transaction to immediately be included in the next block; they are outpaced by transactions whose fees are higher. While a low-fee deal is likely to be confirmed, it may take quite some time.

Try increasing your commission

If you want your transactions to be confirmed faster, the obvious solution is to add a higher fee to that transaction. If your wallet (with default settings) does not add enough commission, you can configure this setting manually, both in the wallet settings and when sending the transaction (or both.)

Sites like 21.co monitor the state of the network and suggest what level of commission per byte of transaction will be sufficient, and also show what speed of network confirmations you can expect at different levels of commissions attached.

If you want the payment to end up in the next block or across the block, you need to pay a relatively high fee. For less urgent payments, you can add a lower fee; it will just take a little longer to confirm.

Check if your wallet supports dynamic fee changes

Nowadays, most wallets support dynamic changes in commissions. Based on the state of the Bitcoin network, these wallets automatically include a fee that will be sufficient to include the transaction in the next block, or at least one of the next blocks.

Some wallets also give you the option to choose fee priority. Again, higher fees will allow the transaction to be confirmed faster, transactions with low fees will take a little longer.

If transactions from your wallet are often delayed during peak hours and you don't have the option to charge a higher fee, your wallet is likely outdated. Check if there is an update available or switch to a new wallet.

Consider switching to another wallet

When you switch to a new wallet, then of course you need to transfer funds from your old wallet to the new wallet. If you don't mind spending a little, you can transfer funds from your old wallet to your new wallet through the Bitcoin network. They will eventually arrive - even if the commission is low.

Also, some wallets allow you to export your private keys or use a private key seed and then import the keys into a new wallet. In this case, you will not need to make transactions on the Bitcoin network. Using your new wallet, you can start transactions immediately.

After you sent it

If you have already sent a transaction and it gets stuck, then that transaction may, in some cases, make a "queue jump."

Selective replacement of commissions

To get your transaction to jump in line, the easiest way is to use an option called Opt-In Replace-by-Fee (Opt-In RBF). It gives you the opportunity to resend the same transaction, but with higher fees.

In most cases, when the same transaction is sent across the network but with higher fees, the new transaction is rejected by the network. Bitcoin nodes usually decide that the new transaction is an attempted double spend, so they don't accept or process it. But when you forward a transaction using the RBF Opt-In option, you are essentially telling the network that you are forwarding the same transaction, only with a higher fee. As a result, most Bitcoin nodes accept the new transaction instead of the old one; allowing a new transaction to jump in the queue.

Whether your new transaction will be included in one of the upcoming blocks will depend on the miner who is counting the next block: not all miners support Opt-In RBF. However, quite a few miners also support this option, so one way or another your transaction will be included in the upcoming blocks.

Opt-In RBF is currently supported by two wallets: Electrum and GreenAddress. Depending on the wallet, you may need to enable Opt-In RBF in the menu settings before you send your (first) transaction.

Children pay for their parents

If your wallet doesn't support Opt-In RBF, things get a little more complicated.

Children Pays for Parents (CPFP) can be a gimmick. By using CPFP, miners do not necessarily accept those transactions that have the highest fees, but instead they can accept a set of transactions that have generally higher fees.

Without getting too technical, most outgoing transactions not only send Bitcoin to the recipient, but they also send change back to you. You can spend this change in your next transaction.

Some wallets give you the option to spend that change right away without waiting for confirmations, so you can send that change to yourself in a new transaction. This time, make sure you include a fee large enough to offset the initial low transaction fee. The miner in this case will take the entire set of transactions and confirm them all at once.

If the wallet doesn't allow you to choose which bitcoins were spent - meaning you can't confirm where the unconfirmed change is - you can try sending all the funds in the wallet to yourself; in this case the change will be included.

As with Opt-In RBF, not all miners currently support CPFP. But they are enough for you to be sure that your transaction will be confirmed in one of the following blocks.

Or..

If neither the RBF nor CPFP Opt-In option is available, you can technically still try and pass on the original transaction with higher fees. This is commonly referred to as "full fee replacement" and some miners accept it. However, available wallets do not have this option.

Otherwise, you will probably just have to wait - for the transaction to be confirmed or for the bitcoins to be returned to your wallet. It's important to note that until the transaction is confirmed, the bitcoins are technically in your wallet - they're just not accessible through this method. Bitcoins literally do not get stuck in the network and cannot get lost in it.

Also, the ViaBTC mining pool began offering a “transaction accelerator.” If your transaction that is stuck involves a fee of at least 0.1 mBTC per kilobyte, you can submit that transaction ID to ViaBTC and the pool will give it higher priority than other transactions. Since ViaBTC controls about seven percent of the hashing power of the Bitcoin network, there is a good chance that a block containing your transaction will be found within a couple of hours. However, this service has a limitation of a maximum of 100 transactions per hour.

For the recipient

Of course, the transaction can get stuck even if you are the recipient. If your wallet allows you to spend unconfirmed transactions, then you can also use the CPFP method. In much the same way as mentioned above, you can resend incoming unconfirmed bitcoins to yourself, with fees high enough to compensate for the initial low transaction fee. If the new fee is sufficient, the transaction is usually confirmed in the next blocks.

It also makes sense to ask the sender of the funds if he is able to use the Opt-In RBF option. If so, he can resend the transaction with a higher fee. Of course, the ViaBTC transaction accelerator (which was mentioned above) also works for incoming transactions.

Want more news?

As fate would have it, I had the chance to deal with cryptocurrencies. It’s not that I work closely with them, but sometimes I send and receive coins. Let’s just say that I’m little by little testing a new area from the inside.

And then one day trouble happened. I sent crypto coins, but they did not reach the recipient. Actually, the post is about how the funds were returned. Well, thoughts and advice on the current situation for dessert. Let me immediately note that the following does not apply to any specific currency, but to most forks (if not all).

Let me start by saying that the post is riddled with speculation in places about what is happening. I could be wrong somewhere. Objective corrections and additions are welcome.

A little about terminology.

  • I will call the file wallet.dat a wallet.
  • The public key (the address to which funds are transferred, for example) is sometimes also more convenient to call a wallet, but to avoid confusion, let it simply be an account number.
  • Commission - Transaction Fee. To call this thing a commission, I think, is not entirely correct, but this is the most familiar and less offensive option, so let it be a commission.
  • Transaction size is the size of the data block that contains all the information about the transaction.
I initially approached this whole cryptocurrency kitchen as a typical user - without really delving into the system. Installed, launched, works - and okay. Sometimes, when trying to send funds somewhere, the client would display a message like “ The size of the transaction is too large, you can’t just send it. But you can add a commission of N and then everything will be fine“- I agreed with the addition of the commission, and everything was really good.

It would seem that if I am asked to pay extra when it is necessary, then I will pay when asked (if the commission suits me). This was the main mistake.

I am making another transfer for an amount much larger than usual. Funds leave the account, there was no offer to pay a commission and... Nothing. The funds do not reach the recipient, the transaction status is “0/Not confirmed”. And I observed this picture for more than a week, simultaneously googling and re-reading the Internet in search of information on solving a similar problem. Moreover, I was looking for a specific cryptocurrency, and for all in general - there are a lot of problems, there is no solution.

And, actually, what kind of commission is this? The idea is that transactions can take place without commission, but only if certain conditions are met:

  • The transaction size must not exceed a certain amount.
  • The transferred amount must be greater than a certain threshold.
  • The transaction must have sufficient priority.
If the first two points are more or less clear (I didn’t give specific values, I believe they can vary from fork to fork), then the third is the rub. Roughly speaking, when transactions are created, they are queued, sorted by priority. When the next block is generated, it includes transactions with a commission (which goes as a reward to the one who found the block), as well as transactions without a commission with the highest priority.

The priority itself directly depends on the volume of transferred funds and on the number of their confirmations (the longer this money has been in your account, the higher the priority should be, in fact) and inversely depends on the size of the transaction. Thus, in an unfortunate set of circumstances, a transaction without a commission may end up in a stuck unconfirmed state, which is what I encountered.

The search for a solution showed that this is a relatively common problem for cryptocurrencies. Unfortunately, all the advice boiled down to the following and often did not help:

  • Wait a day or two, your transaction will be included in the next block.
  • Wait a day or two, the client program will get tired of waiting and will cancel the transaction itself.
  • Redownload the entire block chain.
  • Start the client with some magic key (-rescan / -reindex / -salvagewallet).
I waited more than a week. The transaction was not included in any block. Even after repeated submissions via sendrawtransaction. The blockchain said that it knew nothing about that transaction, and the same funds were in the account, they had not gone anywhere. And only the client stood his ground: “I sent the transaction, proceed as you wish. I will not allow you to manage the money that has already been spent.”

So, what is the essence of the problem? The transaction did not get into the block and will not get there again. The wallet stores information that the transaction actually took place, so the funds that were supposed to go with it are not available for use. Perhaps after some more time the transaction will be canceled, I have several assumptions about this:

  • Depends on the currency, in some places it is canceled quickly, in others you have to wait a long time.
  • Bug for a specific client.
  • The cancellation information is incorrect.
In any case, a week is quite a long time. If during this time it has not passed by itself, then there is reason to believe that it will not pass.

Like a normal person, after everything had already broken, I finally went to read the manuals. An attempt to repeat the transaction with a commission included was a fiasco. But endless jumping on links between forums (nothing worthwhile was found in Google results) brought me to a certain post, where I found a useful hint. Unfortunately, now I can’t find this post, I don’t even know what kind of forum it was. Some kind of Bitcoin-like one, I guess.

I will describe the solution using the example of the client most common for forks, known as Satoshi Client. As far as I understand, it is applicable to other clients, but perhaps with its own nuances.

Despite the simplicity and obviousness of the solution, few people come to it, judging by the multi-page forum threads. The funds in the account are locked by the wallet, and all that is required is to access the account outside the current wallet.

So, if the transaction is stuck and has no confirmations:

  1. Please be patient. Don't panic right away. Wait a couple of days, and suddenly it will go away on its own.
  2. Verify that the transaction is stuck. Go to Block Explorer (usually Google for “blockchain %cryptocurrency name%)” and check that they don’t know anything about the stuck transaction, and that there is actually money in the account.
  3. Go to the debug console (Help - Debug Window - Console)
  4. If the wallet is encrypted (is it encrypted?), then first you need to gain access using the command walletpassphrase .
  5. Now you need to get the private key for the desired account. dumpprivkey
    . Instead of
    you need to enter the public account number on which the blocked funds are located. In response, you will receive the private key of this account. You need to copy it somewhere, you will need it later. If funds for a transaction were taken from several accounts, then they all need to be imported. And yes, never store private keys in a place accessible to anyone. Knowing the key gives full access to the corresponding account.
    Please also note that each command in the debug console receives a response. It may be empty, but it is always there. Later it will be clear what I mean.
  6. Close the client and delete the wallet. The wallet location (wallet.dat) depends on the specific client and OS. Naturally, you shouldn’t delete it completely; it’s better to rename it or move it to a safe place.
  7. Restart the client. A new wallet will be created. You must import the previously obtained key(s) into it. We go to the debug console and write importprivkey . Imports can take quite a long time. Let it complete - wait for a response to the command.
  8. An account with its real state should appear in the new wallet. To be on the safe side, you can restart the client with the -rescan switch, but I think this is unnecessary. Previously blocked funds are again available for sending, send them again, this time do not forget to include the commission. ( there are important additions on this point in upd3)
  9. If you still have other used and important accounts on your old wallet, you can return to it again.
In this simple way we managed to return the crypto coins. Although I was already beginning to think that they were completely lost. In general, don't expect miracles; before using a new client, make sure that the commission is always included. I think it is better to look for the recommended commission size on resources dedicated to the cryptocurrency you are using.

Upd: The need for the described operation depends on the client used (and since many cryptocurrencies have one client, also on the currencies used). It appears that in some cases the transaction information is not written to the wallet file, but only to the local blockchain. In this situation, deleting the existing chain or launching a client with keys can help.

Upd2: The -salwagewallet key, already mentioned earlier, can significantly simplify the described process of transferring accounts to a new wallet. When the client is launched with this key, a new wallet.dat is created, into which all accounts from the old one are imported, and the transaction history for it is taken from the block chain (thanks to grich for the description). Unfortunately, launching with this key is not implemented in all clients.

Upd3: If after import you do not transfer the entire amount in the account, then part of the funds (change from the outputs used) will be transferred to another account of the new wallet. Keep this in mind if you plan to return to your old wallet:

  • After importing the account into the new wallet, transfer all funds from it to your other account, return to the old wallet and then manage the returned funds.
  • After making a transaction from the new wallet, determine which account the change fell into and import that account into the old wallet.

Tags: Add tags

  • Payment systems
  • As fate would have it, I had the chance to deal with cryptocurrencies. It’s not that I work closely with them, but sometimes I send and receive coins. Let’s just say that I’m little by little testing a new area from the inside.

    And then one day trouble happened. I sent crypto coins, but they did not reach the recipient. Actually, the post is about how the funds were returned. Well, thoughts and advice on the current situation for dessert. Let me immediately note that the following does not apply to any specific currency, but to most forks (if not all).

    Let me start by saying that the post is riddled with speculation in places about what is happening. I could be wrong somewhere. Objective corrections and additions are welcome.

    A little about terminology.

    • I will call the file wallet.dat a wallet.
    • The public key (the address to which funds are transferred, for example) is sometimes also more convenient to call a wallet, but to avoid confusion, let it simply be an account number.
    • Commission - Transaction Fee. To call this thing a commission, I think, is not entirely correct, but this is the most familiar and less offensive option, so let it be a commission.
    • Transaction size is the size of the data block that contains all the information about the transaction.
    I initially approached this whole cryptocurrency kitchen as a typical user - without really delving into the system. Installed, launched, works - and okay. Sometimes, when trying to send funds somewhere, the client would display a message like “ The size of the transaction is too large, you can’t just send it. But you can add a commission of N and then everything will be fine“- I agreed with the addition of the commission, and everything was really good.

    It would seem that if I am asked to pay extra when it is necessary, then I will pay when asked (if the commission suits me). This was the main mistake.

    I am making another transfer for an amount much larger than usual. Funds leave the account, there was no offer to pay a commission and... Nothing. The funds do not reach the recipient, the transaction status is “0/Not confirmed”. And I observed this picture for more than a week, simultaneously googling and re-reading the Internet in search of information on solving a similar problem. Moreover, I was looking for a specific cryptocurrency, and for all in general - there are a lot of problems, there is no solution.

    And, actually, what kind of commission is this? The idea is that transactions can take place without commission, but only if certain conditions are met:

    • The transaction size must not exceed a certain amount.
    • The transferred amount must be greater than a certain threshold.
    • The transaction must have sufficient priority.
    If the first two points are more or less clear (I didn’t give specific values, I believe they can vary from fork to fork), then the third is the rub. Roughly speaking, when transactions are created, they are queued, sorted by priority. When the next block is generated, it includes transactions with a commission (which goes as a reward to the one who found the block), as well as transactions without a commission with the highest priority.

    The priority itself directly depends on the volume of transferred funds and on the number of their confirmations (the longer this money has been in your account, the higher the priority should be, in fact) and inversely depends on the size of the transaction. Thus, in an unfortunate set of circumstances, a transaction without a commission may end up in a stuck unconfirmed state, which is what I encountered.

    The search for a solution showed that this is a relatively common problem for cryptocurrencies. Unfortunately, all the advice boiled down to the following and often did not help:

    • Wait a day or two, your transaction will be included in the next block.
    • Wait a day or two, the client program will get tired of waiting and will cancel the transaction itself.
    • Redownload the entire block chain.
    • Start the client with some magic key (-rescan / -reindex / -salvagewallet).
    I waited more than a week. The transaction was not included in any block. Even after repeated submissions via sendrawtransaction. The blockchain said that it knew nothing about that transaction, and the same funds were in the account, they had not gone anywhere. And only the client stood his ground: “I sent the transaction, proceed as you wish. I will not allow you to manage the money that has already been spent.”

    So, what is the essence of the problem? The transaction did not get into the block and will not get there again. The wallet stores information that the transaction actually took place, so the funds that were supposed to go with it are not available for use. Perhaps after some more time the transaction will be canceled, I have several assumptions about this:

    • Depends on the currency, in some places it is canceled quickly, in others you have to wait a long time.
    • Bug for a specific client.
    • The cancellation information is incorrect.
    In any case, a week is quite a long time. If during this time it has not passed by itself, then there is reason to believe that it will not pass.

    Like a normal person, after everything had already broken, I finally went to read the manuals. An attempt to repeat the transaction with a commission included was a fiasco. But endless jumping on links between forums (nothing worthwhile was found in Google results) brought me to a certain post, where I found a useful hint. Unfortunately, now I can’t find this post, I don’t even know what kind of forum it was. Some kind of Bitcoin-like one, I guess.

    I will describe the solution using the example of the client most common for forks, known as Satoshi Client. As far as I understand, it is applicable to other clients, but perhaps with its own nuances.

    Despite the simplicity and obviousness of the solution, few people come to it, judging by the multi-page forum threads. The funds in the account are locked by the wallet, and all that is required is to access the account outside the current wallet.

    So, if the transaction is stuck and has no confirmations:

    1. Please be patient. Don't panic right away. Wait a couple of days, and suddenly it will go away on its own.
    2. Verify that the transaction is stuck. Go to Block Explorer (usually Google for “blockchain %cryptocurrency name%)” and check that they don’t know anything about the stuck transaction, and that there is actually money in the account.
    3. Go to the debug console (Help - Debug Window - Console)
    4. If the wallet is encrypted (is it encrypted?), then first you need to gain access using the command walletpassphrase .
    5. Now you need to get the private key for the desired account. dumpprivkey
      . Instead of
      you need to enter the public account number on which the blocked funds are located. In response, you will receive the private key of this account. You need to copy it somewhere, you will need it later. If funds for a transaction were taken from several accounts, then they all need to be imported. And yes, never store private keys in a place accessible to anyone. Knowing the key gives full access to the corresponding account.
      Please also note that each command in the debug console receives a response. It may be empty, but it is always there. Later it will be clear what I mean.
    6. Close the client and delete the wallet. The wallet location (wallet.dat) depends on the specific client and OS. Naturally, you shouldn’t delete it completely; it’s better to rename it or move it to a safe place.
    7. Restart the client. A new wallet will be created. You must import the previously obtained key(s) into it. We go to the debug console and write importprivkey . Imports can take quite a long time. Let it complete - wait for a response to the command.
    8. An account with its real state should appear in the new wallet. To be on the safe side, you can restart the client with the -rescan switch, but I think this is unnecessary. Previously blocked funds are again available for sending, send them again, this time do not forget to include the commission. ( there are important additions on this point in upd3)
    9. If you still have other used and important accounts on your old wallet, you can return to it again.
    In this simple way we managed to return the crypto coins. Although I was already beginning to think that they were completely lost. In general, don't expect miracles; before using a new client, make sure that the commission is always included. I think it is better to look for the recommended commission size on resources dedicated to the cryptocurrency you are using.

    Upd: The need for the described operation depends on the client used (and since many cryptocurrencies have one client, also on the currencies used). It appears that in some cases the transaction information is not written to the wallet file, but only to the local blockchain. In this situation, deleting the existing chain or launching a client with keys can help.

    Upd2: The -salwagewallet key, already mentioned earlier, can significantly simplify the described process of transferring accounts to a new wallet. When the client is launched with this key, a new wallet.dat is created, into which all accounts from the old one are imported, and the transaction history for it is taken from the block chain (thanks for the description). Unfortunately, launching with this key is not implemented in all clients.

    Upd3: If after import you do not transfer the entire amount in the account, then part of the funds (change from the outputs used) will be transferred to another account of the new wallet. Keep this in mind if you plan to return to your old wallet:

    • After importing the account into the new wallet, transfer all funds from it to your other account, return to the old wallet and then manage the returned funds.
    • After making a transaction from the new wallet, determine which account the change fell into and import that account into the old wallet.