BIP91 & SegWit2x Lock-in, Activation

There seems to be a lot of confusion about BIP91, SegWit, SegWit2x timelines lock-in and activation dates. This is a quick explainer. BIP91 Explained BIP91 Forces signalling for BIP141. 269/336 blocks are required to lock BIP91 in. Current BIP91 period started at block 476448. If at block 476783 we have 269 blocks that signalled bit 4, then bip91 will be locked-in. Once that (lock-in) happens BIP91 will be activated 336 blocks later (roughly two and one third of a day). BIP91-enabled nodes will reject blocks that do not signal BIP141. BIP91 was devised to avoid BIP148 activation. Once signaling BIP141 becomes “mandatory” we still need to have enough votes for BIP141 to lock it in and activate it. Lock-in happens after

Read more

Bitcoin Privacy & Traceability #001- Untraceable bitcoin Transfer

Recently I have been thinking about privacy in Bitcoin. It seems to me that the general public is not clear as to what degree of financial privacy comes with Bitcoin. As a result i have decided to start another series of posts to talk about Bitcoin privacy. Perhaps the first post should have been about the very basics. However, I felt compelled to point out a way to transfer bitcoins in a way that it is untraceable. There is one caveat, it is between parties that trust each other. So technically the title should have been “Untraceable bitcoin transfer between trusted parties”. We can transfer bitcoins using the blockchain, that is send them from one address to another. By doing

Read more

Decentralized Autonomous Organizations from a legal perspective.

Smart contracts are an idea that date back to the 1990’s [1]. Until very recently and practically speaking even now smart contracts are difficult if not impossible to create in practice. The implementation of a decentralized, trustless public ledger provided an important component for smart contracts to become practically viable. Some thinkers have taken the idea further and envisioned corporations or non-profit organizations structured as smart contracts. In 2014 a project called Ethereum [3][4] set out to create a platform devoted to smart contracts bringing smart contracts a step closer to reality. Ethereum went live on July 30 2015 [5]. It is now possible to create in code (or with visual tools) a Decentralized Autonomous Organization (DAO) [8] on the

Read more

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

Smart Contracts and Insurance on the Blockchain

Introduction Smart contracts are a new and exciting area in computing science. Their application in finance, gambling, e-commerce, and automation of various tasks that are currently performed semi-manually is very promising. Smart contract are computer scripts (software) that aid in the self-execution and self-enforcement of traditional contracts. For the first time in history money or more precisely digital tokens, like bitcoin, are native to these software contracts, opening up wide areas of possibilities. Having money as a native type available to a computer program is a big deal. It allows the removal of the whole complicated layer of payment processing that current websites, apps, and other software systems have to deal with. One area that might benefit immensely from smart

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

Rootstock – Smart Contracts on the Bitcoin Blockchain

by Albert Szmigielski As a concept the Rootstock [1] platform is one of those ideas that once it is proposed it is obvious that it is a great idea. Essentially Rootstock aims to be what Ethereum is, a decentralized, Turing-complete smart contract platform. However, Rootstock aims to utilize the Bitcoin ecosystem rather than creating a new one from scratch. The way this will be accomplished is via the still not fully implemented sidechains technology [2]. This approach presents both advantages, and its own set of challenges. We will briefly outline what the Rootstock platform promises to offer and then will discuss the main points of the proposal. Smart Contract Platform Smart contracts are an active area of interest and research.

Read more

Compiling Bitcoin Classic from Source on Ubuntu

by Albert Szmigielski If you would like to run Bitcoin Classic and you want to build it from source here is the way to do it. In your terminal navigate to the directory you want Bitcoin Classic to reside in. Then clone the GitHub repository:

cd into the Bitcoin classic directory

checkout the branch with 2MB support

Now run the autogen, and configure scripts

If any of the dependencies are missing then configure will let you know, install the dependencies (see below) and try again from ./configure If all the dependencies are met you can now build (this will take a few minutes)

optionally you can also install

If all the dependencies were met

Read more

Bitcoin Block Size Debate – Two sides to each coin.

by Albert Szmigielski As Bitcoin, the secure network and bitcoin, the currency gain in popularity, the number of transactions per time frame, and therefore per block increases. There is a limit to the number of transactions that can be included in a block. As the number of transactions is trending upwards, we are approaching the 1MB per block limit. A natural reaction would be to shrug and say: “so what, just raise the limit, problem solved”. However raising the limit has consequences on the economics of the network. Conversely, not changing the limit presents a different set of consequences. What follows is a summary and a review of arguments for and against the block size increase. Those in favour. The

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 We need to create an object to connect to bitcoind, we will call

Read more