DRKLord
Member
"Frozen Transactions" : Why it Happens and How to Fix it!
Have you ever tried to send a regular Darkcoin or Bitcoin transaction only to discover, much to your dismay, that the transaction becomes "frozen" at 0/6 confirmations? You wait and wait, but the transaction still receives no confirmations. Then you start getting worried, so you go to block explorer and enter the transaction ID but the search tool says "No results found"! Now you really start worrying... did my transaction just "disappear" into thin air? Are my coins going to be stuck in limbo forever?! Will they ever reach their destination or will I ever get them back? :'(
Don't worry, there are solutions! And I'm going to help you understand what causes this problem, and share with you a couple simple and easy solutions I have discovered and successfully used to fix this problem...
This problem is most often caused by poor network propagation. When you're using Bitcoin-qt or Darkcoin-qt you are connected to what is called a p2p (peer-to-peer) network. This means there are no servers, but instead there are lots and lots of computers (called "nodes" or "peers") connected to each other in a complex spider-web of connections. It looks something like this example diagram:
To better understand how this "frozen transaction" problem arises, let's examine the way things are supposed to work...
How Transactions Get Sent and Confirmed
When you send a transaction from Darkcoin-qt or Bitcoin-qt, your client software generates a raw binary message describing the transaction. This message indicates the coin inputs (the source of the coins), the recipient address (where the coins are going), the amount being sent and other important information. And just like when you sign a check you wrote to pay someone a certain amount of money, your client uses your private key(s) to "sign" the transaction and authorize it, so the recipient will receive the coins you're sending. This raw binary message (the transaction) is then "broadcasted" to the Darkcoin (or Bitcoin) network by sending it to each of the peers you are connected to. Your peers receive the transaction message and check to make sure it is valid. If it is valid, they make a note of it and then they broadcast it out to all of their peers (invalid, corrupt or double-spending transactions are ignored). Their peers receive it and verify it, make note of it, then broadcast it out to all of their peers... this process continues again and again, until the transaction message has propagated (spread) across the entire network and everyone has acknowledged and made note of the transaction.
During this propagation process, as the transaction message spreads across the network, miners and mining pools will hear the message too. If they deem the transaction to be valid, they will accept it into their current set of work. Each solo miner and mining pool has its own "work data" it is crunching away at as it tries to mine a new block. This "work data" includes the hash of the previous block, the current time-stamp, a list of all the valid pending transactions their peers have sent, a "coinbase" transaction (transaction which pays the miner the block reward if he solves the block) and a special number called a "nonce". Basically, as the miners work, they keep changing the nonce number and re-hashing their work data over and over and over, hoping they will get lucky and find a nonce value that creates a hash output with a lot of zeros at the beginning. If the hash has enough leading zeros to meet the current difficulty requirements, then the miner has solved a valid block. When this happens, the miner who found it submits his finding to the network by broadcasting his new block out to his peers. It spreads from peer to peer, much like a transaction message does. If the block is indeed valid, each node in the network will accept it as the next valid block in the block chain! Your transaction will now have it's first confirmation, and in your client it will now say the transaction has 1/6 confirmations!
Further confirmations require that more valid blocks are found which build upon the block in which your transaction was first confirmed. So when a miner finds a new, valid block which uses the hash of the block in which your transaction appears as the "hashPrevBlock" value, your transaction will then have 2/6 confirmations. When a new block is found that uses that block's hash as the hashPrevBlock field, your transaction then has 3/6 confirmations... and so on and so on it grows, like a chain, until the transaction has 10 confirmations, 20 confirmations, 100 confirmations, etc... Once the transaction has 120 or more confirmations, it is safe to assume that it is now a permanent part of the blockchain and will exist there forever and ever, until the end of time...
How Transactions Can Become "Frozen"
So why do some transactions get "frozen" and stay stuck at 0/6 confirmations?
Since Darkcoin and Bitcoin are based on a p2p (peer-to-peer) network system, everything relies on good communication between peer nodes. We have to have a strong "spider web" of peer connections between all the peers on the network for information to spread thoroughly and make sure everyone receives it. But sometimes there can be gaps in communications between peers, and information may get delayed or lost (not lost permanently, just lost in the network)! There can be a variety of causes for communication problems between nodes in the Darkcoin and Bitcoin networks. Sometimes your client software may be having trouble finding "good peers" to connect to. Sometimes your connection to the internet may be experiencing "hiccups" which cause your client to lose connection to your peers and you have to search for new peers to connect to all over again. Sometimes the "spider web" of p2p network connections may have some holes or gaps in it temporarily which hinder the flow of information from peer to peer. And sometimes weird things can happen for which we cannot identify a cause...
But no matter what the cause, when connection and communication problems affect our link to the p2p networks of Bitcoin or Darkcoin, we can have problems with our transactions. When we are having communication problems with the network and try to send a transaction to spend some of our coins, the propagation process we learned about above can be slowed down or even choked off completely. This means that when we try to send some coins to someone, the binary transaction message we try to broadcast out to the network doesn't get properly echoed and spread around the entire network. Our peers may not receive the message for some reason, or maybe our peers are having communication problems with their peers, or maybe we're not even really connected to any peers at all and no one hears it! When this happens, the transaction message may get stuck "in limbo" for hours, days or even weeks in some extreme cases. Since the transaction did not propagate through the network, miners' nodes will not hear the message and thus it will never make it into their work data and never receive any confirmations!
How to Fix a "Frozen" Transaction
Many times, when a transaction becomes "frozen" as described above, the problem will eventually fix itself. The Bitcoin and Darkcoin clients will automatically re-broadcast any transactions stuck at zero confirmations after a certain length of time (I believe it is 90 minutes by default). But sometimes this does not work, or maybe you're in a hurry and don't have 90 minutes to sit around waiting...
Solution A:
A very simple and easy solution that many users have had success with is the -rescan method. Basically, you force your client to rescan and re-validate your local record of the blockchain and re-broadcast any unconfirmed or frozen transactions. To do this, follow the steps below:
1) Shut down your Bitcoin or Darkcoin client completely by clicking File >> Exit. Make sure it is shut down completely not minimized to tray or taskbar.
2) Open your operating system's command prompt console or terminal. For Windows users, you must open cmd.exe to get the black console window which allows you to input commands. Linux users should already be familiar with their system console/terminal.
3) Launch Darkcoin-qt or Bitcoin-qt (whichever one you had the problem with) using the -rescan command line option.
If everything goes smoothly, your client/daemon should execute a rescan and re-broadcast the transaction that got frozen and (hopefully) it will fully propagate across the network and soon get confirmed. But sometimes this does not work and you may need to try the next method...
If my walk-through is helpful to you and saves you some tears and grief, I would be most grateful for any tips or friendly donations you send my way:
XvWrvpERfUN8r1LB9JDMZS3Yu2rSfEYrHk
:grin:
XvWrvpERfUN8r1LB9JDMZS3Yu2rSfEYrHk
:grin:
Have you ever tried to send a regular Darkcoin or Bitcoin transaction only to discover, much to your dismay, that the transaction becomes "frozen" at 0/6 confirmations? You wait and wait, but the transaction still receives no confirmations. Then you start getting worried, so you go to block explorer and enter the transaction ID but the search tool says "No results found"! Now you really start worrying... did my transaction just "disappear" into thin air? Are my coins going to be stuck in limbo forever?! Will they ever reach their destination or will I ever get them back? :'(
Don't worry, there are solutions! And I'm going to help you understand what causes this problem, and share with you a couple simple and easy solutions I have discovered and successfully used to fix this problem...
This problem is most often caused by poor network propagation. When you're using Bitcoin-qt or Darkcoin-qt you are connected to what is called a p2p (peer-to-peer) network. This means there are no servers, but instead there are lots and lots of computers (called "nodes" or "peers") connected to each other in a complex spider-web of connections. It looks something like this example diagram:
To better understand how this "frozen transaction" problem arises, let's examine the way things are supposed to work...
How Transactions Get Sent and Confirmed
When you send a transaction from Darkcoin-qt or Bitcoin-qt, your client software generates a raw binary message describing the transaction. This message indicates the coin inputs (the source of the coins), the recipient address (where the coins are going), the amount being sent and other important information. And just like when you sign a check you wrote to pay someone a certain amount of money, your client uses your private key(s) to "sign" the transaction and authorize it, so the recipient will receive the coins you're sending. This raw binary message (the transaction) is then "broadcasted" to the Darkcoin (or Bitcoin) network by sending it to each of the peers you are connected to. Your peers receive the transaction message and check to make sure it is valid. If it is valid, they make a note of it and then they broadcast it out to all of their peers (invalid, corrupt or double-spending transactions are ignored). Their peers receive it and verify it, make note of it, then broadcast it out to all of their peers... this process continues again and again, until the transaction message has propagated (spread) across the entire network and everyone has acknowledged and made note of the transaction.
During this propagation process, as the transaction message spreads across the network, miners and mining pools will hear the message too. If they deem the transaction to be valid, they will accept it into their current set of work. Each solo miner and mining pool has its own "work data" it is crunching away at as it tries to mine a new block. This "work data" includes the hash of the previous block, the current time-stamp, a list of all the valid pending transactions their peers have sent, a "coinbase" transaction (transaction which pays the miner the block reward if he solves the block) and a special number called a "nonce". Basically, as the miners work, they keep changing the nonce number and re-hashing their work data over and over and over, hoping they will get lucky and find a nonce value that creates a hash output with a lot of zeros at the beginning. If the hash has enough leading zeros to meet the current difficulty requirements, then the miner has solved a valid block. When this happens, the miner who found it submits his finding to the network by broadcasting his new block out to his peers. It spreads from peer to peer, much like a transaction message does. If the block is indeed valid, each node in the network will accept it as the next valid block in the block chain! Your transaction will now have it's first confirmation, and in your client it will now say the transaction has 1/6 confirmations!
Further confirmations require that more valid blocks are found which build upon the block in which your transaction was first confirmed. So when a miner finds a new, valid block which uses the hash of the block in which your transaction appears as the "hashPrevBlock" value, your transaction will then have 2/6 confirmations. When a new block is found that uses that block's hash as the hashPrevBlock field, your transaction then has 3/6 confirmations... and so on and so on it grows, like a chain, until the transaction has 10 confirmations, 20 confirmations, 100 confirmations, etc... Once the transaction has 120 or more confirmations, it is safe to assume that it is now a permanent part of the blockchain and will exist there forever and ever, until the end of time...
How Transactions Can Become "Frozen"
So why do some transactions get "frozen" and stay stuck at 0/6 confirmations?
Since Darkcoin and Bitcoin are based on a p2p (peer-to-peer) network system, everything relies on good communication between peer nodes. We have to have a strong "spider web" of peer connections between all the peers on the network for information to spread thoroughly and make sure everyone receives it. But sometimes there can be gaps in communications between peers, and information may get delayed or lost (not lost permanently, just lost in the network)! There can be a variety of causes for communication problems between nodes in the Darkcoin and Bitcoin networks. Sometimes your client software may be having trouble finding "good peers" to connect to. Sometimes your connection to the internet may be experiencing "hiccups" which cause your client to lose connection to your peers and you have to search for new peers to connect to all over again. Sometimes the "spider web" of p2p network connections may have some holes or gaps in it temporarily which hinder the flow of information from peer to peer. And sometimes weird things can happen for which we cannot identify a cause...
But no matter what the cause, when connection and communication problems affect our link to the p2p networks of Bitcoin or Darkcoin, we can have problems with our transactions. When we are having communication problems with the network and try to send a transaction to spend some of our coins, the propagation process we learned about above can be slowed down or even choked off completely. This means that when we try to send some coins to someone, the binary transaction message we try to broadcast out to the network doesn't get properly echoed and spread around the entire network. Our peers may not receive the message for some reason, or maybe our peers are having communication problems with their peers, or maybe we're not even really connected to any peers at all and no one hears it! When this happens, the transaction message may get stuck "in limbo" for hours, days or even weeks in some extreme cases. Since the transaction did not propagate through the network, miners' nodes will not hear the message and thus it will never make it into their work data and never receive any confirmations!
How to Fix a "Frozen" Transaction
Many times, when a transaction becomes "frozen" as described above, the problem will eventually fix itself. The Bitcoin and Darkcoin clients will automatically re-broadcast any transactions stuck at zero confirmations after a certain length of time (I believe it is 90 minutes by default). But sometimes this does not work, or maybe you're in a hurry and don't have 90 minutes to sit around waiting...
Solution A:
A very simple and easy solution that many users have had success with is the -rescan method. Basically, you force your client to rescan and re-validate your local record of the blockchain and re-broadcast any unconfirmed or frozen transactions. To do this, follow the steps below:
1) Shut down your Bitcoin or Darkcoin client completely by clicking File >> Exit. Make sure it is shut down completely not minimized to tray or taskbar.
2) Open your operating system's command prompt console or terminal. For Windows users, you must open cmd.exe to get the black console window which allows you to input commands. Linux users should already be familiar with their system console/terminal.
3) Launch Darkcoin-qt or Bitcoin-qt (whichever one you had the problem with) using the -rescan command line option.
For Windows users, you must type the following line into the console and hit the Enter key:
darkcoin-qt.exe -rescan
For Linux users, you must type one of the following lines into the terminal (depending on whether you're using daemon or GUI):GUI Client: darkcoin-qt -rescan
Daemon: darkcoind -rescan
Daemon: darkcoind -rescan
If everything goes smoothly, your client/daemon should execute a rescan and re-broadcast the transaction that got frozen and (hopefully) it will fully propagate across the network and soon get confirmed. But sometimes this does not work and you may need to try the next method...
Last edited by a moderator: