Coding for Better Regulatory Outcomes in The Internet Age of Bitcoin and Blockchains

Background From globally diverse legal perspectives, the current regulations affecting Bitcoin and blockchains are quite disparate, ranging on the spectrum from laissez-faire to outright prohibition, enforced with severe criminal penalties. The conundrum, however, lies with the fact that Bitcoin and blockchains are really an extension of the ever more ubiquitous Internet, albeit a radical extension, permitting digital value to be transmitted peer-to-peer, and diminishing the need for third-party intermediaries, who too often exploit their power and privilege. Given that access to the Internet is proclaimed as a fundamental human right by the UN [1], and that non-profit initiatives from high-profile tech giants such as Google, Facebook, and Microsoft are on a mission to bring the Internet to all corners of

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

Milestone: The Bitcoin Network Reaches One Exahash

By Albert Szmigielski Sometime around January 24th 2016 the Bitcoin Network reached one Exahash per second for the first time ever. That is 1 quintillion, a 1 followed by 18 zeros or 1018 hashes per second. That is just an insane amount of computing power. Image: Bitcoin Network reaches ONE exahash. Image courtesy of Over the last two years the Bitcoin Network hashrate increased roughly 50-fold. Image: Bitcoin Hashrate over the past two years. Image courtesy of Why is this a big deal? Bitcoin currently has the most secure network in the world. To duplicate the network it would take a lot of resources. At a low price of $150 per Terahash, it would cost approximately $150 million

Read more

Bitcoin local reputation management system for peer nodes

by Albert Szmigielski  Recently I have heard about a Bitcoin local reputation management system for peer nodes , so i decided to look into it. The system is in the source code, mainly in main.cppI looked at Version (from clientversion.h) main.h /** Increase a node’s misbehavior score. */ void Misbehaving(NodeId nodeid, int howmuch); main.cpp int nMisbehavior; void Misbehaving(NodeId pnode, int howmuch) { if (howmuch == 0) return;     CNodeState *state = State(pnode); if (state == NULL) return;     state->nMisbehavior += howmuch; int banscore = GetArg(“-banscore”, 100); if (state->nMisbehavior >= banscore && state->nMisbehavior – howmuch < banscore) { LogPrintf(“Misbehaving: %s (%d -> %d) BAN THRESHOLD EXCEEDED\n”, state->name, state->nMisbehavior-howmuch, state->nMisbehavior); state->fShouldBan = true; } else LogPrintf(“Misbehaving: %s (%d -> %d)\n”, state->name, state->nMisbehavior-howmuch, state->nMisbehavior);

Read more