Fork of Trezor Blockbook.
 
 
 
 
 
 
Go to file
sidhujag 06e518fe9a add disablewallet=1 2020-09-05 11:37:49 -07:00
api Include eth transactions in unknown status into balance history 2020-09-04 21:32:10 -07:00
bchain Go ethereum v1.9.20 (#482) issue #481 2020-09-04 21:35:20 -07:00
build add disablewallet=1 2020-09-05 11:37:49 -07:00
common Revert "use uint64 for assets" 2020-07-27 11:36:21 -07:00
configs Bump Blockbook version to 0.3.4 2020-07-27 10:45:12 -07:00
contrib/scripts Use "#!/usr/bin/env bash" in shebangs instead of "#!/bin/bash" 2019-06-17 18:30:39 +02:00
db fix test 2020-09-04 21:27:12 -07:00
docs typo 2020-09-02 15:55:49 -07:00
fiat Revert "build: go module support" 2020-05-12 10:46:36 -07:00
server refactor connect/disconnect asset 2020-09-04 18:51:03 -07:00
static refactor connect/disconnect asset 2020-09-04 18:51:03 -07:00
tests update tests 2020-09-03 14:44:19 -07:00
.gitignore Support Polis (#118) 2019-04-06 00:18:24 +02:00
.gitlab-ci.yml base syscoin integration 2020-01-19 21:57:28 -08:00
CONTRIBUTING.md update links back to syscoin 2020-03-06 22:22:46 -08:00
COPYING Add license file 2018-05-31 12:53:27 +02:00
Gopkg.lock base64 fixes 2020-09-02 13:47:23 -07:00
Gopkg.toml Revert "build: go module support" 2020-05-12 10:46:36 -07:00
Makefile Fixed issue with folder containing spaces in the path of the repo 2020-05-11 22:34:01 -07:00
README.md Update README.md 2020-04-15 22:00:31 -07:00
blockbook.go Send websocket notification on new tx for input addresses 2020-07-27 10:44:07 -07:00
shell.nix nix: add dependencies to shell.nix 2020-09-04 21:33:38 -07:00

README.md

Go Report Card

Blockbook

Blockbook is back-end service for Trezor wallet. Main features of Blockbook are:

  • index of addresses/XPUBs and address/XPUB balances of the connected block chain (XPUB balances are useful for HD Wallet infrastructure)
  • Ability to filter based on pages, date ranges, token query filters
  • Full support for Syscoin SPTs through indexing and filtering transactions
  • fast searches in the indexes
  • simple blockchain explorer
  • websocket, API and legacy Bitcore Insight compatible socket.io interfaces support of multiple coins (Syscoin/Bitcoin and Ethereum type), with easy extensibility for other coins scripts for easy creation of debian packages for backend and blockbook and blockbook

Build and installation instructions

Officially supported platform is Debian Linux and AMD64 architecture.

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. Other coins should have lower requirements, depending on the size of their block chain. Note that fast SSD disks are highly recommended.

User installation guide is here.

Developer build guide is here.

Contribution guide is here.

Implemented coins

Blockbook currently supports over 30 coins. The Trezor team implemented

  • Bitcoin, Bitcoin Cash, Zcash, Dash, Litecoin, Bitcoin Gold, Ethereum, Ethereum Classic, Dogecoin, Namecoin, Vertcoin, DigiByte, Liquid, Syscoin

the rest of coins were implemented by the community.

Testnets for some coins are also supported, for example:

  • Bitcoin Testnet, Bitcoin Cash Testnet, ZCash Testnet, Ethereum Testnet Ropsten, Syscoin Testnet

List of all implemented coins is in the registry of ports.

Common issues when running Blockbook or implementing additional coins

Out of memory when doing initial synchronization

How to reduce memory footprint of the initial sync:

  • disable rocksdb cache by parameter -dbcache=0, the default size is 500MB
  • 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.

Please add your experience to this issue.

Error internalState: database is in inconsistent state and cannot be used

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.

See above how to reduce the memory footprint, delete the database files and run the import again.

Check this or this issue for more info.

Running on Ubuntu

This issue discusses how to run Blockbook on Ubuntu. If you have some additional experience with Blockbook on Ubuntu, please add it to this issue.

My coin implementation is reporting parse errors when importing blockchain

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 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.

Data storage in RocksDB

Blockbook stores data the key-value store RocksDB. Database format is described here.

API

Blockbook API is described here.