Posts Tagged ‘zapwallettxes

The craze for many forks from the Bitcoin blockchain has resulted in people trying to claim their free coins in various ways, the easiest one is to keep a local wallet and just export your private keys from the Bitcoin wallet and import them to the wallet of the fork. As a security measure it is always advised to first move your Bitcoin (or other coins) to a new address before trying to claim any kind of forked coins, this way you can be safe that your private keys used for the claim cannot be used for stealing your actual BTC. With the recent addition of official support for SegWit addresses it might be a good time to update your Bitcoin Core wallet, generate a new SegWit wallet address and move your coins these and then start claiming some forked coins with the old private keys.

How to export the private keys:
– Start your Bitcoin Core or other QT-wallet
– Click on “Help” in the menu bar of the wallet
– Click on “Debug window” from the menu
– Select the “Console” tab to be able to type commands
– Unlock your wallet (if it is locked) with: walletpassphrase “your wallet password” 600
– Export the private key with: dumpprivkey “your Bitcoin address”
– Copy and keep safe the private key you will get for the respective wallet address you have typed
– Lock the wallet again with: walletlock

How to import the private keys:
– Start your Bitcoin Core or other QT-wallet
– Click on “Help” in the menu bar of the wallet
– Click on “Debug window” from the menu
– Select the “Console” tab to be able to type commands
– Unlock your (if it is locked) wallet with: walletpassphrase “your wallet password” 600
– Import the private key with: importprivkey “your Private key”
– You can check to see that a new receiving address has been added in the wallet
– Lock the wallet again with: walletlock

Make sure you import your private key(s) as soon as you start the local wallet for the fork in order to claim all of the coins properly, otherwise you might have to do a resync of the blockchain. Alternative solution would be to just copy the Bitcoin wallet.dat file, but then you might need to do a zapwallettxes and it can take longer time to claim if you have multiple wallets. Again, make sure you keep your private keys safe and do not share them or use them to try to claim coins unless you have already moved all of the coins to a new address prior to initiating the claiming process, otherwise there is a risk of loosing your BTC or other coins as there are scams out there posing as real forks that are trying to steal your coins. Even with legitimate forks it is always a wise idea to be on the safe side and never share or use a private key for a wallet that still have coins in it, just to avoid possible security risks.

unconfirmed-bitcoin-transaction

With the recent spike in the price of Bitcoin the number of unconfirmed transactions has increased significantly yet again and the Bitcoin blocks are getting closer and closer to being full. This essentially slows down transactions on the network and in order to ensure that your transaction is being processed faster you need to increase the fee over the standard recommended one. While this may be just fine for larger BTC transfers with fewer inputs, if you want to make a small transaction of few Bitcoin cents or a large one with a lot of inputs the network fees can get quite high. If the fee is not large enough and the waiting list is big you can easily end up with your transaction not getting confirmed and included in a block for over a day and that usually causes a problem, especially if you are paying for something in BTC. The solution would be to just cancel any unconfirmed transaction that did not go through for over 24 hours and it is not that hard to do it actually, although the process itself may require some time.

bitcoin-qt-zapwallettxes

Cancelling stuck Bitcoin transaction sent from your local BTC wallet requires you to run the qt wallet client with a special option that would remove all pending transactions that are not included in the blockchain. You need to run bitcoin-qt.exe (or the respective qt executable file depending on the OS you are using) with the -zapwallettxes parameter, but before running it make sure you backup your wallet.dat file. This will take some time as it will initiate a blockchain rescan, so be prepared to wait until the process finishes and do not forget to remove the extra parameter the next time you run your wallet as it is not needed anymore. As a result you will be able to initiate a new transaction with the unspent coins and by increasing the network fee you pay you should be able to move them faster and have the transaction confirmed this time. You will be essentially double spending your Bitcoins, but the second transaction you initiate will cancel out the earlier one. You cannot successfully double spend Bitcoins unless you control more than half of the Bitcoin network, so no worries here. The only thing you will be able to do is free up your coins that were stuck in an unconfirmed transaction for a long time and then be able to initiate a new transaction to send them successfully this time.

Do note that although we are giving this example for Bitcoin, it should work on many other altcoins as well that are based on a more recent forked Bitcoin wallet code as the option we use here is not included in the earlier version of the Bitcoin client. There are some more complex alternatives for performing the same thing described here if your wallet does not support the zapwallettxes option, so you are not out of luck in such cases either. You can do the same thing with the Python-based tool called Pywallet as an alternative to using the qt wallet method described here.


top