Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mastercored takes 5 days (!) to reindex the blockchain #216

Open
kostaz opened this issue Nov 28, 2014 · 3 comments
Open

Mastercored takes 5 days (!) to reindex the blockchain #216

kostaz opened this issue Nov 28, 2014 · 3 comments

Comments

@kostaz
Copy link

kostaz commented Nov 28, 2014

Issue

The daemon is run with the below command:
'./mastercored -daemon -datadir=/home/mastercore/.bitcoin -reindex'

Reindexing of 330,000 blocks takes 5 (!!) days

Reindexing of 1018 blocks takes 23 minutes (as see from 'getinfo' snapshot), => reindexing of 330,000 blocks takes 5 days!
What is wrong here?
How to fix it?
Can it help to use better PC?

root@ubuntu:/home/mastercore/.bitcoin# ~/msc_0.0.8.2/mastercore/src/mastercored getinfo ; date
{
    "mastercoreversion" : 12008,
    "version" : 90200,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 318790,
    "timeoffset" : 0,
    "connections" : 31,
    "proxy" : "",
    "difficulty" : 27428630902.25787354,
    "testnet" : false,
    "keypoololdest" : 1417119409,
    "keypoolsize" : 101,
    "paytxfee" : 0.00010000,
    "relayfee" : 0.00001001,
    "errors" : ""
}
Fri Nov 28 11:43:38 IST 2014
root@ubuntu:/home/mastercore/.bitcoin# 
root@ubuntu:/home/mastercore/.bitcoin# 
root@ubuntu:/home/mastercore/.bitcoin# 
root@ubuntu:/home/mastercore/.bitcoin# 
root@ubuntu:/home/mastercore/.bitcoin# 
root@ubuntu:/home/mastercore/.bitcoin# 
root@ubuntu:/home/mastercore/.bitcoin# 
root@ubuntu:/home/mastercore/.bitcoin# ~/msc_0.0.8.2/mastercore/src/mastercored getinfo ; date
{
    "mastercoreversion" : 12008,
    "version" : 90200,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 319808,
    "timeoffset" : 0,
    "connections" : 30,
    "proxy" : "",
    "difficulty" : 27428630902.25787354,
    "testnet" : false,
    "keypoololdest" : 1417119409,
    "keypoolsize" : 101,
    "paytxfee" : 0.00010000,
    "relayfee" : 0.00001001,
    "errors" : ""
}
Fri Nov 28 12:06:45 IST 2014

Thanks,
--- Kosta

@kostaz
Copy link
Author

kostaz commented Nov 28, 2014

This issue seems related to the issue #215.

@dexX7
Copy link

dexX7 commented Nov 28, 2014

The v0.0.8 branch (and release) is based on Bitcoin Core 0.9.2~ and the Master Core related logic doesn't have much relevance in this context, so I tend to say: yes, that's to expect.

But it's extreme nevertheless. Did you wait 5 days or extrapolated based on the first few thousand blocks?

There are basically four mechanisms in place (based on the other thread from you):

  1. block download
  2. script verification
  3. transaction indexing
  4. (later) Mastercoin transaction processing

In my experience step 3, transaction indexing, with a fully synchronized client, takes about 3-8 hours on a $ 20 Digital Ocean VPS. Assuming step 1-3 are done or you delete all Mastercoin related files (the MP_ folders), the actual Mastercoin related processing is done in 2-5 minutes.

I once noticed step 1 (and as consequence 2) at the very beginning are quite slow, but it speeds up later: http://sourceforge.net/p/bitcoin/mailman/message/32701295/

@zathras-crypto
Copy link

Hi,

The extrapolation of 5 days I don't think is quite accurate.

FYI for re-indexing, the time it takes to index a block is dependent on the size and number of transactions within the block. Recent blocks around 300,000 are large and carry many transactions as the popularity of Bitcoin increases, vs the first Bitcoin blocks that carried few transactions and low difficulty.

TL:DR; during a re-index, the first 150,000 to 200,000 blocks are processed within a couple of hours, then blocks start to take longer and longer to reindex the more difficult and populated the block. It's absolutely hardware dependent (a good SSD and CPU will help things along greatly).

Also FYI MasterCore takes no additional action during a re-index (starts parsing when re-index is complete) so time to re-index should be identical to Bitcoin Core.

Thanks
Zathras

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants