Dump Bitcoin mainnet Ledger to Elasticsearch. Constructed specify format so we can query balance and Utxo, the main propose of the repo are for wallet or block explorer
Install
Environment require:
- Golang (Compile)
- Dep (Package dependency)
- Elasticsearch (Database)
Before clone the repo, I wanna let claim so there is a bug I had verified the BTCD, an alternative full node Bitcoin im Plementation written in Go. See the detail: [RPC] Getblock command had been changed, and I had given a solution how to fixed the problem
go get -u github.com/wenweih/btc-chaindata-2escd $GOPATH/src/github.com/wenweih/btc-chaindata-2esdep ensure -v -update
After dep ensure -v -update
-to-load the repo dependency, you should modify BTCD package in vendor
fold flowing by fix open source project Btcd RPC implementation Bitcoin acquisition block The problem.
Cross compile, such as for my Ubuntu Server:
GOARCH=amd64 GOOS=linux go build
Usage
Because of btc-chaindata-2es service interacts with Bitcoind by RPC and Elasticsearch by HTTP protocol, to avoid network R Equest delay, I hightly recommend you run the three services (Btc-chaindata-2ex, Bitcoind and Elasticsearch) in the same s Erver.
Copy Configure to ~/directory
cat ~/btc-chaindata-2es.ymlbtc_host: "127.0.0.1"btc_port: "8791"btc_usr: "usertest"btc_pass: "passtest"btc_http_mode: truebtc_disable_tls: trueelastic_url: "http://127.0.0.1:9200"elastic_sniff: false
Start the service:
nohup ~/btc-chaindata-2es sync > /tmp/btc-chaindata-2es.log 2>&1 &
Links
- Wenweih/btc-chaindata-2es