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

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 blockchain.info Over the last two years the Bitcoin Network hashrate increased roughly 50-fold. Image: Bitcoin Hashrate over the past two years. Image courtesy of blockchain.info 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

Pros and Cons of countermeasures to the block and transaction delivery delays attack

by Albert Szmigielski Dynamic Timeouts Pros: Timeouts based on the object size allow individual nodes to dynamically calculate and set a timeout that is most appropriate for the node. This would acknowledge the fact that not all nodes on the network are equal, and that they do not have access to the same resources, be it computing power, memory, or bandwidth. The adversary has no information about the timeout set by the node, thereby making it more difficult to mount the attack. Cons: Requires modification to the protocol, which is not trivial on a system wide basis. Of course individual nodes could implement it partially if object size can be either discovered or calculated. The attacker could play around with

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 0.11.99.0 (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