Blockstack: First Steps

So I’m diving headfirst into Blockstack, because, well, why not?

The idea here is that Blockstack is building a new operating system on top of the blockchain technology, which was first and most famously used as part of Bitcoin.

A blockchain is a secure, open ledger of records updated via distributed consensus that removes the need for a centralized (i.e. “single point of failure”) authority. Bitcoin uses the blockchain to record transactions.

Blockstack is extending the blockchain in a few key ways. First, it introduces the idea of a virtual blockchain that sits on top of an existing blockchain. This allows changing the underlying blockchain, making Blockstack resistant to blockchain failure. Second, the blockchain tracks pointers to the actual data being tracked, rather than the data itself. This keeps the chain relatively small, while expanding the potential uses to large, internet scale applications. Third, like NameCoin before it, Blockstack uses the blockchain to assign human readable names to computer addressable locations. This provides secure identity and ownership of digital assets.

Ok, that was my best entry level summary of a new technology and company that I admittedly barely understand. How did I do?

Well, even if I botched that up, I still think it’s cool, so I’m going to document how I’m getting started with Blockstack. This is day one. Day one is all about installing the tools. Here are the steps I followed:

  1. Install the Windows Subsystem for Linux
    • Enable-WindowsOptionalFeature
      $ Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    • restart Windows
    • run bash, which installs Ubuntu on Windows
    • Create root username and password
  2. Install Blockstack
    $ wget -qO - https://raw.githubusercontent.com/blockstack/packaging/master/repo-key.pub | sudo apt-key add -
    $ echo "echo 'deb http://packages.blockstack.com/repositories/ubuntu/ xenial main' > /etc/apt/sources.list.d/blockstack.list" | sudo -E bash -
    $ sudo apt update
    $ sudo apt install blockstack
  3. Install node.js
    $ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
    $ sudo apt-get install -y nodejs
  4. Install the Blockstack browser
    $ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
    $ sudo apt install blockstack-browser
  5. Install regtest environment and integration test dependencies
    $ sudo apt install software-properties-common
    $ sudo add-apt-repository ppa:bitcoin/bitcoin
    $ sudo apt update
    $ sudo apt install sqlite3 bitcoind
  6. Test blockstack install
    $ blockstack info 

    This command failed with the error: “Failed to contact blockstack daemon. Please ensure that it is running with the ‘api’ command.” My next attempt was to start the blockstack daemon:

    $ blockstack api start

    This command also failed, with the error: “Wallet does not exist. Please create one with blockstack setup”. So I need to setup a wallet. Turns out there is a command for that as well:

    $ blockstack setup

    In doing this, it needs a password to protect your wallet. I saved that to my password manager, and also saved off new wallet information generated by this command.

    Now I could run

    $ blockstack api start
    Enter wallet password:
    {
        "status": true
    }

    And it works!

    And finally, I could run

    $ blockstack info
    {
        "cli_version": "0.14.4.2",
        "consensus_hash": "bc799939a8de6f258a55ea3ef9c32953",
        "last_block_processed": 482868,
        "last_block_seen": 482874,
        "queues": {},
        "server_alive": true,
        "server_host": "node.blockstack.org",
        "server_port": 6264,
        "server_version": "0.14.4.2"
    }

    And it works too!

So there you have it. We’re up and running with Blockstack. Next up, exploring the command line interface.