Sidechains: Alpha Sidechain Tutorial

In this tutorial we will take a practical look at sidechains [1]. We will concentrate on the Elements project [2] and its first sidechain known as Alpha . Alpha is a developer sidechain that is pegged to Bitcoin’s testnet [3]. In order to play around with sidechains in general and with Alpha in particular we need to have the mainchain installed on our machine. The mainchain in our case is the bitcoin testnet. Then we will need to install the Alpha sidechain. Let’s proceed. The instructions below are for Linux Ubuntu. Step 1 – Install bitcoind & alphad First we need to get some dependencies:

If you do not have git installed on your machine:

To be organized

Read more

Bitcoin & Blockchain Programming #007 – RPCs via Python

by Albert Szmigielski Previously we issued commands to bitcoind via PHP using Remote Procedure Calls. In today’s tutorial we will do the same using Python. We are assuming you have python installed on your machine. On Ubuntu 14.0.4 Python 3.4 is installed by default. If you do not have Python installed, just do a search on how to do it, there is a number of good tutorials out there. Or depending on your system you can try

If you are not sure if Python is installed on your system you can check by doing:

for versions 2.x or

for versions 3.x The RPCs to bitcoind are accomplished via json format, so we will need a library for

Read more

Bitcoin & Blockchain Programming #006 – Blockchain Notary System Design

by Albert Szmigielski Notary System Let’s design a notary system. A system that can notarize a document and store it. There are three solutions possible: a decentralized one, that can keep functioning for ever, a centralized system that would depend on a company running it, and a combination of both. We would like the system to be decentralized, so that in the event of our company’s demise the system can keep on functioning. This is a desirable property to have as wills may need to exist for decades before they are executed. In addition to this we will have a centralized component where we keep the information stored for our users. Added functionality like storing authorized users able to access

Read more

Fun Facts About Factom

Introduction Innovation is a theme that runs throughout this post. New use cases for Bitcoin* and its underlying blockchain are being actively pursued by hundreds of startups around the world. The market cap of Bitcoin currently exceeds six billion dollars, greater than the total of all altcoins combined [1]. Angel investors, venture capitalists, crowdfunding platforms, big banks, and established tech companies are pouring millions of dollars every month into blockchain research and alternative applications [2]. Note, however, that innovation is not limited to the technology itself. The entire digital currency space is spawning all kinds of creative ways to interact with, and potentially profit from, this “emerging” market sector. Many of the blockchain startups are deploying novel business models, and

Read more

Bitcoin & Blockchain Programming #005 – RPCs via PHP

by Albert Szmigielski It’s time to talk to bitcoind programmatically via RPC. Actually in our last tutorial, the bitcoin-cli calls were made over RPC as well (bitcoin-cli handles all the details). In today’s tutorial we will make RPCs using php. We are assuming you have php installed on your machine, if not you can do that by issuing the following command in a terminal:

If you are not sure if php is installed on your system you can check by doing:

The RPCs to bitcoind are accomplished via json format, so we will need a library for that: jsonRPCClient.php We have downloaded it from http://jsonrpcphp.org/ We need to create an object to connect to bitcoind, we will call

Read more

Bitcoin & Blockchain Programming #004 – Basic Commands

By Albert Szmigielski Last time we saw how to issue a command to bitcoind via the terminal using  bitcoin-cli. Today we will start examining the different commands that bitcoind can accept. Perhaps the most important one to start with will be the help command.

this will print out a list of all the commands that the bitcoind wallet accepts. If you want to save them in a file simply redirect the output to a file.

If you ever need help with a specific command you can get the man page by

for example

So there is our first command getblockcount it returns the number of blocks in our blockchain. Lets execute it.

Currently (jan 30

Read more

Bitcoin & Blockchain Programming #003 – Building bitcoind on Linux

By Albert Szmigielski In this tutorial we will show you how to download and build the bitcoin core reference client on your Linux machine. Let’s get to it. Required Libraries Open a terminal and issue the following commands.

This will download and install build requirements. We will also need boost library development packages

Let’s add the bitcoin repository

Next, we need Berkley DB development libraries

Later on we may want to build the Qt wallet – the GUI version. We will need QT packages for that.

  GIT and Sourcecode

Make a directory for Bitcoin and your code

When you first start bitcoind it is going to create a .bitcoin directory in your

Read more

Bitcoin & Blockchain Programming #001 – Introduction

By Albert Szmigielski It has come to our attention that there is a shortage of Bitcoin and Blockchain programmers. As a result we have decided to post a series of tutorials starting at the very beginning. We will download and set-up a full Bitcoin wallet and then we will proceed to go through all the commands and how to use them. We will show you how to connect to your wallet programmatically via RPC calls (Remote Procedure Calls) , and finally we will put together a couple of projects using the material we have covered. We will work in Linux, for Windows users we will show you how to install a Virtual Machine (VM) so you can run Linux on

Read more