I did not give fee, the transaction got stuck - what to do? Sometimes in order to save on the transaction fee we can get into trouble. It turns out that more blocks come in, and our transaction is still not approved. We will try to explain why this happens and what you can do in such a case. Each transaction has its size expressed in bytes. The size of a transaction does not depend on its value (how much we send) but on the number of inputs and outputs used in it. In other words: the more complex a transaction is, the bigger it is. The default value of the fee is 0.0001 BTC for each kilobyte of the transaction. A simple transaction with one input and two outputs takes about 300 bytes and you should generally pay this minimum fee for each transaction. Sending 0.00001BTC "on a trial basis" makes absolutely no sense because the fee is greater than the value of the transaction. Transactions can be sent without a fee only in a special case - if their priority is high enough. Transaction priority depends on several factors: transaction size transaction value the age of the entries This is calculated as follows: priority = sum (value * age + ....) / size Value given in satoshi, age in number of transaction confirmations and size in bytes. If the priority is higher than 57`600`000 then Bitcoin Core treats it as free. All other transactions should have a fee charged. For example, we send a total of 0.02 BTC which we received in two parts of 0.01 each yesterday and the day before. The whole transaction will have 2 inputs and one output and will take about 380 bytes. One day is 144 blocks. So Core counts as follows: (0.01*100000000*144+0.01*100000000*288)/380 = 1 136 845 This is far too low for it to go for free. However, if we had the coins for three months, the calculation would be as follows: (0.01*100000000*12960+0.01*100000000*13104)/380 = 68,589,473 and the transaction can go free. For example, if we received a whole bitcoin yesterday and we send it on: (1*100000000*144)/234 = 61,538,461 and the transaction can also be free (the transaction has one input and one output so it is smaller than the previous one). However, the mine that digs up the blocks has the last word, because the configuration of its node determines which transactions are accepted into the block at all. Transactions with sufficiently high priority and no fee are always accepted, but there may be so many of them at any given time that there's not enough space in the block to accept our transaction. It will have to wait for the next block(s). In addition, if our transaction does not have a high priority and there is no fee, it goes into a waiting queue, which actually has no end - the number of transactions waiting for confirmation is about 2000 on average, about a thousand enter each block. So what to do in a situation when our transaction has not gone through for many hours/days? Check if any block has fallen in at all since it was sent. Blocks fall in every 10 minutes on average, but there are cases when we wait even a few hours for a block. It may turn out that we worry unnecessarily check in block viewer e.g. blockchain.info how our transaction is treated. Transactions which are non-standard have an appropriate message in the "priority" field If our transaction is visible in the blockchain browser, it means that it is not bad enough to be completely rejected by the network. Most of the time, waiting is enough. However, if it is still invisible a few minutes after posting, it means that it most likely has no chance of being approved. Since no transaction on the network can be undone, we need to spend some time and effort to fix this. First, we need to make sure that the transaction stops being broadcast. The easiest way to do this is by disabling our own node, as it will broadcast our transaction from time to time. If we used an online wallet (e.g. from blockchain.info) we have to wait patiently (even 2-3 days) until the service "gives up" and stops broadcasting the transaction. The spent funds will automatically be on our account because the transaction that spent them will disappear. However, to prevent the transaction from being sent again from our wallet (e.g. Core) we have to restore a copy of the wallet that does not contain it. Otherwise immediately after connecting wallet will send such transaction again and we will be back to square one. Another way is to import the private key of the address from which the transaction was sent to another wallet (preferably unused without funds) and send the funds again from this address with the correct (higher) payment. However, such an operation causes two different transactions to occur in the network using the same inputs, which is interpreted as an attempt to "double spend" attack. By causing such a situation, we force the mine nodes to choose the "better" transaction, i.e. the one with the higher fee/priority. After they
No comments:
Post a Comment