citp / BlockSci

A high-performance tool for blockchain science and exploration
https://citp.github.io/BlockSci/
GNU General Public License v3.0
1.34k stars 259 forks source link

BlockSci doesn't parse the block after the height 585755. #434

Closed Natkamon closed 4 years ago

Natkamon commented 4 years ago

At this moment we tried to update BlockSci data with a new version (v0.7.0). However, we cannot parse the Bitcoin data until the latest block. In fact, BlockSci always parsed the block until the height 585755, and then it stopped without any error.

Here is the log file we obtained:

$ blocksci_parser config.json doctor

ubuntu@blocksci:~$ blocksci_parser config.json doctor
125GB of free disk space available.
OK: Open files limit of 64000.

Checking configuration for issues.
OK: Found data directory on disk.
OK: Found disk parser settings in config.

Constructing chain index from scratch. This may take a few minutes.
100.0% done fetching block headers
OK: Most recent block found in coin directory has height 585755 (in file 1723)
Warning: MaxBlock in config is larger than number of blocks found on disk.

Found 1 warnings and 0 errors.
Warnings may be bening, errors must be resolved for BlockSci to run.
ubuntu@blocksci:~$

We also encountered this problem with version 0.5.0 and already spent a few months trying to fix the problem. Unfortunately, we still haven’t found where the problem is.

Moreover, we also tried to install a new Bitcoin core version, then download the entire Bitcoin blocks again and run the BlockSci but it always stopped parsing at the same height.

Here is our config.json file:

{
    "chainConfig": {
        "coinName": "bitcoin",
        "dataDirectory": "/mnt/data",
        "pubkeyPrefix": [
            0
        ],
        "scriptPrefix": [
            5
        ],
        "segwitActivationHeight": 481824,
        "segwitPrefix": "bc"
    },
    "parser": {
        "disk": {
            "blockMagic": 3652501241,
            "coinDirectory": "/mnt/bitcoin-data",
            "hashFuncName": "doubleSha256"
        },
        "maxBlockNum": 646600
    },
    "version": 5
}

Here is our Bitcoin core version:

ubuntu@bitcoin:~$ bitcoind --version
Bitcoin Core version v0.20.0
Copyright (C) 2009-2020 The Bitcoin Core developers

System Information

Using AMI: no BlockSci version: v0.7.0 (HEAD detached at 6d50682) Blockchain: (e.g., Bitcoin, Bitcoin Cash, Litecoin): Bictoin Parser: Disk Total memory: 62 GB

maltemoeser commented 4 years ago

Do you have block files (blkxxxxx.dat) beyond blk01723.dat in your /mnt/bitcoin-data directory? Do they have the correct permissions for BlockSci to read them?

Natkamon commented 4 years ago

Hi maltemoeser,

Thank you for your answer. We found that the block file blk01723.dat is index incorrectly. We remove all files and download block files from the Bitcoin core again. This time it works.