dashpay / dash

Dash - Reinventing Cryptocurrency
https://www.dash.org
MIT License
1.49k stars 1.2k forks source link

How do coins upgrade there blockchain from 10v or 11v to 12v #1912

Closed KolbyML closed 6 years ago

KolbyML commented 6 years ago

Hi am a 15 year old who wants to do this for a living so i don't read much so i learn better by doing it. So i wanted to upgrade a wallet to a newer version. So i did it all after my 1000th attempt it worked but then i found a problem which just didn't make sense how do i upgrade the blockchain from an 11v or 10v to 12v I tried 10 and it tells me

` root@guest:~/learning-0.12.0.0/src# ./learningd -daemon learning Core server starting root@guest:~/learning-0.12.0.0/src# : Error loading block database. Please restart with -reindex or -reindex-chainstate to recover.

root@guest:~/learning-0.12.0.0/src# ./learningd -reindex-chainstate learning Core server starting root@guest:~/learning-1.0.0/src# Warning: Failed to create backup, file already exists! This could happen if you restarted wallet in less than 60 seconds. You can continue if you are ok with this. : Error loading block database. Please restart with -reindex or -reindex-chainstate to recover.

Please restart with -reindex or -reindex-chainstate to recover.

root@guest:~/learning-1.0.0/src# `

So i get that In the debug log i get this

`

2018-02-09 20:20:54 learning Core version v0.12.2.2-2ec8504-dirty (2018-02-05 17:18:13 -0700) 2018-02-09 20:20:54 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1 2018-02-09 20:20:54 Assuming ancestors of block 000000000000001c172f518793c3b9e83f202284615592f87fe3506ce964dcd4 have valid signatures. 2018-02-09 20:20:54 Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010) 2018-02-09 20:20:54 Default data directory /root/.learning 2018-02-09 20:20:54 Using data directory /root/.learning 2018-02-09 20:20:54 Using config file /root/.learning/learning.conf 2018-02-09 20:20:54 Using at most 256 connections (1024 file descriptors available) 2018-02-09 20:20:54 Using 0 threads for script verification 2018-02-09 20:20:54 Binding RPC on address 0.0.0.0 port 9998 failed. 2018-02-09 20:20:54 HTTP: creating work queue of depth 16 2018-02-09 20:20:54 Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcuser for rpcauth auth generation. 2018-02-09 20:20:54 HTTP: starting 4 worker threads 2018-02-09 20:20:54 Failed to create backup, file already exists! This could happen if you restarted wallet in less than 60 seconds. You can continue if you are ok with this. 2018-02-09 20:20:54 Warning: Failed to create backup, file already exists! This could happen if you restarted wallet in less than 60 seconds. You can continue if you are ok with this. 2018-02-09 20:20:54 Using wallet wallet.dat 2018-02-09 20:20:54 init message: Verifying wallet... 2018-02-09 20:20:54 CDBEnv::Open: LogDir=/root/.learning/database ErrorFile=/root/.learning/db.log 2018-02-09 20:20:54 scheduler thread start 2018-02-09 20:20:54 Bound to [::]:9365 2018-02-09 20:20:54 Bound to 0.0.0.0:9365 2018-02-09 20:20:54 Cache configuration: 2018-02-09 20:20:54 Using 37.5MiB for block index database 2018-02-09 20:20:54 Using 8.0MiB for chain state database 2018-02-09 20:20:54 * Using 254.5MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space) 2018-02-09 20:20:54 init message: Loading block index... 2018-02-09 20:20:54 Opening LevelDB in /root/.learning/blocks/index 2018-02-09 20:20:54 Opened LevelDB successfully 2018-02-09 20:20:54 Using obfuscation key for /root/.learning/blocks/index: 0000000000000000 2018-02-09 20:20:54 Wiping LevelDB in /root/.learning/chainstate 2018-02-09 20:20:54 Opening LevelDB in /root/.learning/chainstate 2018-02-09 20:20:55 Opened LevelDB successfully 2018-02-09 20:20:55 Wrote new obfuscate key for /root/.learning/chainstate: 00105db002ad62c7 2018-02-09 20:20:55 Using obfuscation key for /root/.learning/chainstate: 00105db002ad62c7 2018-02-09 20:20:55 ERROR: LoadBlockIndexGuts: failed to read value 2018-02-09 20:20:55 : Error loading block database. Please restart with -reindex or -reindex-chainstate to recover. 2018-02-09 20:20:55 Aborted block database rebuild. Exiting. 2018-02-09 20:20:55 scheduler thread interrupt 2018-02-09 20:20:55 PrepareShutdown: In progress... 2018-02-09 20:20:55 Verifying mncache.dat format... 2018-02-09 20:20:55 Loaded info from mncache.dat 0ms 2018-02-09 20:20:55 Masternodes: 0, peers who asked us for Masternode list: 0, peers we asked for Masternode list: 0, entries in Masternode list we asked for: 0, nDsqCount: 0 2018-02-09 20:20:55 Writing info to mncache.dat... 2018-02-09 20:20:55 Written info to mncache.dat 0ms 2018-02-09 20:20:55 Masternodes: 0, peers who asked us for Masternode list: 0, peers we asked for Masternode list: 0, entries in Masternode list we asked for: 0, nDsqCount: 0 2018-02-09 20:20:55 mncache.dat dump finished 0ms 2018-02-09 20:20:55 Verifying mnpayments.dat format... 2018-02-09 20:20:55 Loaded info from mnpayments.dat 0ms 2018-02-09 20:20:55 Votes: 0, Blocks: 0 `

I think i did it all correct but now i cant figure out how to upgrade the blockchain being a 15 year old i believe the bests way to learn from is experience. I want to do this when am an adult and i find the best way to learn is by doing it.

So any help would be awesome. Most people don't help because they say its too hard but i always do it anyways this is a harder task but that has never stop me before probably not going to get help but how do you know if you don't try :) have a great day thank you.

ezaruba commented 6 years ago

Do what it says,

Please restart with -reindex or -reindex-chainstate to recover.

Make sure you have enough HD drive space too

nmarley commented 6 years ago

As the previous commenter stated, you should be able to start the new 12.2 daemon with -reindex to rebuild the index. Otherwise you can re-sync the blockchain from scratch.