This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Compact SQL layer for Bitcoin blockchain.

Project Description

sqlChain is a compact SQL layer that runs on top of bitcoind. It extends the query options on the blockchain with a priority placed on low storage overhead. It provides multiple API (compatible) interfaces:

  • Insight API (plus some extensions, like /api/closure)
  • Blockchain.info API (including websocket)
  • RPC via POST, GET urls
  • Web Interface (using bootstrap, integrated with API backend, primarily a demo)
  • Electrum Server

sqlChain currently consists of three daemon programs.

  • sqlchaind - monitors bitcoind and updates a mysql database
  • sqlchain-api - provides multiple API interfaces over the mysql database
  • sqlchain-electrum - runs a private electrum server over the sqlchain-api layer

Recent Updates

Pruning mode now supported with bitcoind >= 0.14.1 with manual pruning mode. This allows deleting block files as they are processed by sqlchain and cuts down on total disk usage by about 50%. Most of the “witness” data is stored in the sqlchain blob file(s).

Split blobs are now supported by default allowing more flexible locations - you can put recent blobs on SSD and older ones on slower disks or even Amazon S3. You can move a blob and replace with a symlink (but probably should only do that when sqlchain stopped).

Direct block file mode allows processing blocks even when bitcoind is syncing. This would otherwise be difficult due to how syncing impedes RPC call usage.

The blkbtc utility blocks bitcoin network traffic. This allows sqlchain to catch up while pruning block files thereby cutting down on transient storage needs (and sqlchain can also use more cpu resources).

Improved sync speed with another thread to handle output inserts/updates. These can happen “out of band” with the blocks/txs as long as in order. My testing on a “hybrid” 2 Core (8GB, SSD) server showed about double the tx/s conversion rate. I’ll post some test results soon when it’s fully sync’d again.

Added sqlchain-init and installation guide (INSTALL.md) to help users get up and running. I’ve tested some more on Amazon EC2 and now also on a regular VPS account. So it’s starting to get some workout and more bugs fixed. It sure runs faster on the VPS. I’ve found you can build a custom bitcoind and then rsync it up to the server and place in /usr/local/bin to override the default package install. That works.

sqlChain is still Alpha level software under active development (not ready for prime time) - but I’m busy on getting it there. For this reason the IRC peer discovery for public Electrum servers is not yet implemented, and wont be until enough testing has been completed.

TODO

  • more testing on Electrum server operation
  • look further into pruning spent trxs (most of blob.dat) for a wallet api with even lower storage needs
Release History

Release History

This version
History Node

0.1.41

History Node

0.1.40

History Node

0.1.39

History Node

0.1.38

History Node

0.1.37

History Node

0.1.36

History Node

0.1.35

History Node

0.1.34

History Node

0.1.33

History Node

0.1.32

History Node

0.1.31

History Node

0.1.30

History Node

0.1.29

History Node

0.1.28

History Node

0.1.27

History Node

0.1.26

History Node

0.1.25

History Node

0.1.24

History Node

0.1.23

History Node

0.1.21

History Node

0.1.20

History Node

0.1.19

History Node

0.1.17

History Node

0.1.16

History Node

0.1.15

History Node

0.1.14

History Node

0.1.13

History Node

0.1.12

History Node

0.1.10

History Node

0.1.9

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
sqlchain-0.1.41.tar.gz (280.1 kB) Copy SHA256 Checksum SHA256 Source May 11, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting