Bitcoin Forum
June 07, 2024, 11:41:17 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: bitcoin-core doesn't sync blockchain  (Read 2813 times)
AnCapFree (OP)
Member
**
Offline Offline

Activity: 154
Merit: 10


View Profile
October 09, 2015, 06:29:35 PM
 #1

I have about $200 in bitcoin but my wallet (Core) won't synchronize the blockchain (it's been doing this for days) since for some reason it got corrupted (As it tends to do say every other month) and now I'm unable to retrieve my money. I want to transfer it to a lightweight wallet so this won't happen anymore but I don't want to lose the money I have locked in there. How do I transfer this money when I can't synchronize to the current state of the blockchain?

It always syncs until some weeks are left to sync then it shows up an error message, then I try to enter the program again but the splash screen never goes out, it keeps saying "activating best chain..." and that's it. I've been trying to access my wallet for about a week now with no success...

unholycactus
Legendary
*
Offline Offline

Activity: 1078
Merit: 1024



View Profile WWW
October 09, 2015, 07:11:47 PM
 #2

You have 2 options:

Whatever you chose to do backup your wallet first.

1. You recover your private keys from the wallet.dat file (not really user-friendly).
The easiest way I can think of is to use https://blockchain.info/wallet/import-wallet
You should then be able to transfer the funds off blockchain's site and into a more secure wallet.

2. You can clean install Bitcoin core again and transfer your funds (takes more time).

shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
October 09, 2015, 09:52:15 PM
 #3

You have 2 options:

Whatever you chose to do backup your wallet first.

1. You recover your private keys from the wallet.dat file (not really user-friendly).
The easiest way I can think of is to use https://blockchain.info/wallet/import-wallet
You should then be able to transfer the funds off blockchain's site and into a more secure wallet.

That site is no longer operational. But the keys can be exported (WARNING: handling uncrypted private keys can easily lead to lost coins) from core in Wallet Import Format (WIF) with dumpwallet filename from the console.

Full help text:

Quote
dumpwallet "filename"

Dumps all wallet keys in a human-readable format.

Arguments:
1. "filename" (string, required) The filename

Examples:
> bitcoin-cli dumpwallet "test"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "dumpwallet", "params": ["test"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

Keys in WIF can be easily imported into almost all wallets.

2. You can clean install Bitcoin core again and transfer your funds (takes more time).

Option # 3 :

You provide all the address you own (including change addresses) and we manually create you a raw unsigned transaction. You can use your client - yes, unsynced - to verify and sign it. Afterwards you can broadcast the signed raw TX via a pool (or service) interface, e.g. https://insight.bitpay.com/tx/send

Option # 4: You compose the raw TX yourself (advanced).

Option # 5: You send the wallet.dat with the password to someone you deem trustworthy and let them send all coins to your new wallet. (risk of theft)

Option # 6: You figure out the problem with your machine, fix it and sync normally Wink

Im not really here, its just your imagination.
AnCapFree (OP)
Member
**
Offline Offline

Activity: 154
Merit: 10


View Profile
October 09, 2015, 11:45:21 PM
Last edit: October 09, 2015, 11:55:53 PM by AnCapFree
 #4

Thanks. Options 3 and 4 are way over my head. About the dump command line suggestion, I'm trying to run this on a command line promp from both Program Files and %appdata% bitcoin locations but I'm getting 'bitcoin-cli' is not recognized as an internal or external command, operable program or batch file. So I don't know if I'm maybe running this command from a wrong folder

Also, I have tried to uninstall my older version of bitcoin-core and install the current 0.11.0 one but this one is also stuck in "activating best chain". I have a  48.2GB block in my computer already (which is kind of weird since blockchain.info) says the blockchain didn't get to 44GB yet (the site is still alive btw)

achow101
Moderator
Legendary
*
Offline Offline

Activity: 3416
Merit: 6678


Just writing some code


View Profile WWW
October 10, 2015, 02:05:01 AM
 #5

Thanks. Options 3 and 4 are way over my head. About the dump command line suggestion, I'm trying to run this on a command line promp from both Program Files and %appdata% bitcoin locations but I'm getting 'bitcoin-cli' is not recognized as an internal or external command, operable program or batch file. So I don't know if I'm maybe running this command from a wrong folder

Also, I have tried to uninstall my older version of bitcoin-core and install the current 0.11.0 one but this one is also stuck in "activating best chain". I have a  48.2GB block in my computer already (which is kind of weird since blockchain.info) says the blockchain didn't get to 44GB yet (the site is still alive btw)
It can actually take a long time for bitcoin core to startup, so just wait for a while. Also, the data folder contains more than just the raw blockchain, it also contains database files which make up for the extra couple of Gb.

AnCapFree (OP)
Member
**
Offline Offline

Activity: 154
Merit: 10


View Profile
October 10, 2015, 03:40:29 AM
 #6

but shouldn't I be able to just load it up to the bitcoin-core already since I have it synchronized until pretty recently? It happened all of a sudden, the program crashed and it restarted saying that I had still some years to sync up but this happened last week, and I had the program synchronized to the current state of the blockchain back then. Shouldn't the program be reading the blockchain out of this folder AppData\Roaming\Bitcoin\blocks directly instead of trying to sync online?

achow101
Moderator
Legendary
*
Offline Offline

Activity: 3416
Merit: 6678


Just writing some code


View Profile WWW
October 10, 2015, 04:17:46 AM
 #7

but shouldn't I be able to just load it up to the bitcoin-core already since I have it synchronized until pretty recently? It happened all of a sudden, the program crashed and it restarted saying that I had still some years to sync up but this happened last week, and I had the program synchronized to the current state of the blockchain back then. Shouldn't the program be reading the blockchain out of this folder AppData\Roaming\Bitcoin\blocks directly instead of trying to sync online?

It probably had to reindex the databases. Bitcoin core needs to know where each block is in that folder so it creates a database which indexes all of those blocks to efficiently find them. The reindexing process takes a long time, but not as long as an actual full resync. It will do this anytime the program shuts down abnormally, e.g. you don't close it properly. Just wait for it to finish.

Also, about the bitcoin-cli commands, go to the folder where you installed bitcoin core and your should see a folder called daemon. Open that and the bitcoin-cli exe should be there. Open up command prompt in that folder and run whatever command you need.

shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
October 10, 2015, 04:31:26 AM
 #8

-snip-
Also, about the bitcoin-cli commands, go to the folder where you installed bitcoin core and your should see a folder called daemon. Open that and the bitcoin-cli exe should be there. Open up command prompt in that folder and run whatever command you need.

Which also needs bitcoin core to run to work. Once its running you can do it from the "inside".

Help -> Debug Window -> Console

Enter help to get an overview of the commands available and before you can export the private keys you have unlock the wallet with walletpassphrase, if you enter help walletpassphrase in the console you will get a detailed explanation of the common like I posted above.

Im not really here, its just your imagination.
AnCapFree (OP)
Member
**
Offline Offline

Activity: 154
Merit: 10


View Profile
October 10, 2015, 04:46:49 AM
 #9

Thanks. I'm trying both

bitcoin-cli dumpprivkey 18sDqHgssw8MQKpjvUyKPxUPXdP7p9ZuSJ

bitcoin-cli dumpwallet 18sDqHgssw8MQKpjvUyKPxUPXdP7p9ZuSJ

so I can get the WIF to use with Armory or Micellium but I always get error: couldn't connect to server . Is this the right way for me to obtain the WIF?



Core is always failing (rest of computer works fine but Core starts not to respond and closes after a couple of hours all the time, don't know why). If the program is just indexing the files that are already there and not online, can I run a command so it can do this offline? Right now it seems to need an internet connection since I've tried disconnecting the internet and the syncing process stopped

shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
October 10, 2015, 05:02:50 AM
 #10

-snip-
error: couldn't connect to server . Is this the right way for me to obtain the WIF?

Server as in: your local bitcoin core running. Im not entirely sure you can query it from the common line without the following lines in the bitcoin.conf (must be created in the %APPDATA%\Bitcoin Folder)

Code:
# server=1 tells Bitcoin-QT to accept JSON-RPC commands.
server=1
 
# You must set rpcuser and rpcpassword to secure the JSON-RPC api
rpcuser=yourPick
rpcpassword=youMustSetItButNotRememberIt


Core is always failing (rest of computer works fine but Core starts not to respond and closes after a couple of hours all the time, don't know why). If the program is just indexing the files that are already there and not online, can I run a command so it can do this offline? Right now it seems to need an internet connection since I've tried disconnecting the internet and the syncing process stopped

If its syncing I suggest you run the commands from the internal console.


Im not really here, its just your imagination.
AnCapFree (OP)
Member
**
Offline Offline

Activity: 154
Merit: 10


View Profile
October 12, 2015, 09:07:43 PM
 #11

I've tried reindexing but not it shows > "error: a fatal internal error occurred. see debug.log for details"


What do you mean by

rpcuser=yourPick
rpcpassword=youMustSetItButNotRememberIt

can you give me an example?

achow101
Moderator
Legendary
*
Offline Offline

Activity: 3416
Merit: 6678


Just writing some code


View Profile WWW
October 12, 2015, 09:23:56 PM
 #12

What do you mean by

rpcuser=yourPick
rpcpassword=youMustSetItButNotRememberIt
Just set anything you want for those. When using bitcoin-cli, they don't matter.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!