Blockstack-resolver is a highly scalable server for querying Blockstack, the global Internet database. It resolves names to data records. Resolver is primarily meant for scaling read-only calls to Blockstack and introduces a caching layer. For achieving high throughput the resolver loads the entire namespace into memcached and then keeps the local copy consistent with the blockchain. Read-only calls don't hit the blockchain daemon and their scalability is completely decoupled from the scalability properties of the underlying blockchain software. It is blockchain-agnostic, but currently uses the Bitcoin blockchain.
We welcome all contributions! to this open-source software! Some things to note:
- The develop branch is the most active one and uses Bitcoin. Please use that branch for submitting pull requests.
- We no longer support Namecoin.
Example API call:
http://localhost:5000/v2/users/fredwilson
pip install -r requirements.txt
./runserver
For deploying the resolver in production, see this page.
If you're having issues installing pylibmc on OS X, try:
brew install memcached
brew install libmemcached
pip install pylibmc --install-option="--with-libmemcached=/usr/local/Cellar/libmemcached/1.0.18_1/"
Currently, the resolver indexes all valid names in a local file which can be populated by running
$ ./refresh_names.sh
On a production deployment, you should add a crond job to periodically run this script. You can edit your crontab file by:
$ crontab -e
Here is a sample crontab file that runs the refresh script every two hours:
SHELL=/bin/bash
HOME=/home/ubuntu
#This is a comment
0 */2 * * * /home/ubuntu/resolver/resolver/refresh_names.sh
MIT. See LICENSE.
Copyright: (c) 2016 by Blockstack.org