Parse Bitcoin Ledger To Elasticsearch

來源:互聯網
上載者:User

Dump Bitcoin Mainnet ledger to elasticsearch. constructed specify format so we can query balance and utxo, the main propose of the repo is for wallet or block explorer

Install

Environment require:

  • Golang (compile)
  • Dep (package dependency)
  • Elasticsearch (database)

Before clone the repo, I wanna let claim that there is a bug I have verified the btcd, an alternative full node bitcoin implementation written in Go. See the detail: [RPC] getblock command has been changed, and I have 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 修複開源項目 btcd RPC 實現比特幣擷取區塊的問題.

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 request delay, I hightly recommend you run the three services (btc-chaindata-2ex, bitcoind and elasticsearch) in the same server.

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
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.