github.com/dawnbass68/myfirst@v0.0.0-20200312013042-216d947956bd/README.md (about)

     1  [![Go Report Card](https://goreportcard.com/badge/trezor/blockbook)](https://goreportcard.com/report/trezor/blockbook)
     2  
     3  # Blockbook
     4  
     5  **Blockbook** is back-end service for Trezor wallet. Main features of **Blockbook** are:
     6  
     7  - index of addresses and address balances of the connected block chain
     8  - fast searches in the indexes
     9  - simple blockchain explorer
    10  - websocket, API and legacy Bitcore Insight compatible socket.io interfaces
    11  - support of multiple coins (Bitcoin and Ethereum type), with easy extensibility for other coins
    12  - scripts for easy creation of debian packages for backend and blockbook
    13  
    14  ## Build and installation instructions
    15  
    16  Officially supported platform is **Debian Linux** and **AMD64** architecture.
    17  
    18  Memory and disk requirements for initial synchronization of **Bitcoin mainnet** are around 32 GB RAM and over 180 GB of disk space. After initial synchronization, fully synchronized instance uses about 10 GB RAM.
    19  Other coins should have lower requirements, depending on the size of their block chain. Note that fast SSD disks are highly
    20  recommended.
    21  
    22  User installation guide is [here](https://wiki.trezor.io/User_manual:Running_a_local_instance_of_Trezor_Wallet_backend_(Blockbook)).
    23  
    24  Developer build guide is [here](/docs/build.md).
    25  
    26  Contribution guide is [here](CONTRIBUTING.md).
    27  
    28  ## Implemented coins
    29  
    30  Blockbook currently supports over 30 coins. The Trezor team implemented 
    31  
    32  - Bitcoin, Bitcoin Cash, Zcash, Dash, Litecoin, Bitcoin Gold, Ethereum, Ethereum Classic, Dogecoin, Namecoin, Vertcoin, DigiByte, Liquid
    33  
    34  the rest of coins were implemented by the community.
    35  
    36  Testnets for some coins are also supported, for example:
    37  - Bitcoin Testnet, Bitcoin Cash Testnet, ZCash Testnet, Ethereum Testnet Ropsten
    38  
    39  List of all implemented coins is in [the registry of ports](/docs/ports.md).
    40  
    41  ## Common issues when running Blockbook or implementing additional coins
    42  
    43  #### Out of memory when doing initial synchronization
    44  
    45  How to reduce memory footprint of the initial sync: 
    46  
    47  - disable rocksdb cache by parameter `-dbcache=0`, the default size is 500MB
    48  - run blockbook with parameter `-workers=1`. This disables bulk import mode, which caches a lot of data in memory (not in rocksdb cache). It will run about twice as slowly but especially for smaller blockchains it is no problem at all.
    49  
    50  Please add your experience to this [issue](https://github.com/trezor/blockbook/issues/43).
    51  
    52  #### Error `internalState: database is in inconsistent state and cannot be used`
    53  
    54  Blockbook was killed during the initial import, most commonly by OOM killer. By default, Blockbook performs the initial import in bulk import mode, which for performance reasons does not store all the data immediately to the database. If Blockbook is killed during this phase, the database is left in an inconsistent state. 
    55  
    56  See above how to reduce the memory footprint, delete the database files and run the import again. 
    57  
    58  Check [this](https://github.com/trezor/blockbook/issues/89) or [this](https://github.com/trezor/blockbook/issues/147) issue for more info.
    59  
    60  #### Running on Ubuntu
    61  
    62  [This issue](https://github.com/trezor/blockbook/issues/45) discusses how to run Blockbook on Ubuntu. If you have some additional experience with Blockbook on Ubuntu, please add it to [this issue](https://github.com/trezor/blockbook/issues/45).
    63  
    64  #### My coin implementation is reporting parse errors when importing blockchain
    65  
    66  Your coin's block/transaction data may not be compatible with `BitcoinParser` `ParseBlock`/`ParseTx`, which is used by default. In that case, implement your coin in a similar way we used in case of [zcash](https://github.com/trezor/blockbook/tree/master/bchain/coins/zec) and some other coins. The principle is not to parse the block/transaction data in Blockbook but instead to get parsed transactions as json from the backend.
    67  
    68  ## Data storage in RocksDB
    69  
    70  Blockbook stores data the key-value store RocksDB. Database format is described [here](/docs/rocksdb.md).
    71  
    72  ## API
    73  
    74  Blockbook API is described [here](/docs/api.md).