In this post, we will look in more detail at networking with Docker if communication between a Docker container and either the host or the outside world is involved. It turns out that in these cases, the Linux Netfilter/iptables facility comes into play. This post is not meant to be an introduction into iptables, and…More
Docker internals: networking part I
In this post, we will investigate one of the more complex topics when working with Docker – networking. We have already seen in the previous post that namespaces can be used to isolate networking resources used by different containers as well as resources used by containers from those used by the host system. However, by…More
Setting up and testing our bitcoin network
In the last post in my series on bitcoin and the blockchain, we have successfully “dockerized” the bitcoin core reference implementation and have built the bitcoin-alpine docker container that contains a bitcoin server node on top of the Alpine Linux distribution. In this post, we will use this container image to build up and initialize…More
Learning algorithms for restricted Boltzmann machines – contrastive divergence
In the previous post on RBMs, we have derived the following gradient descent update rule for the weights. In this post, we will see how this update rule can be efficiently implemented. The first thing that we note is that the term that appears several times is simply the conditional probability for the hidden unit j…More
Docker internals: process isolation with namespaces and cgroups
A couple of years back, when I first looked into Docker in more detail, I put together a few pages on how Docker is utilizing some Linux kernel technologies to realize process isolation. Recently I have been using Docker again, so I thought it would be a good point in time to dig out some…More
Building a bitcoin container with Docker
When we are playing with bitcoin transactions, we need some playground where making a mistake does not cost us real bitcoins and therefore money. In addition, we might want to play around with more than one bitcoin server to see how networkings works and how the messages are exchanged in the bitcoin peer-to-peer network. There…More
Restricted Boltzmann machines
In the previous post, we have seen that a Boltzmann machine as studied so far suffers from two deficiencies. First, training is very slow as we have to run a Gibbs sampler until convergence for every iteration of the gradient descent algorithm. Second, we can only see the second moments of the data distribution and…More
Signing and verifying bitcoin transactions
If you have followed my blockchain posts so far, you know how to create bitcoin transactions by assembling transaction inputs and transaction outputs into a transaction data structure and serializing it. However, there is one subtlety that we have ignored so far – what exactly do you sign? You cannot sign the entire bitcoin transaction,…More
Bitcoin security and the Mt Gox incident
In February 2014, the bitcoin exchange Mt Gox – at this time one of the largest trading platforms in the market – had to suspend withdrawals completely, apparently in an attempt to recover from a massive attack. A few days later, the company filed for bankruptcy, claiming that it had lost 850.000 BTC, at this…More
Turn on the heating – from Hopfield networks to Boltzmann machines
In my recent post on Hopfield networks, we have seen that these networks suffer from the problem of spurious minima and that the deterministic nature of the dynamics of the network makes it difficult to escape from a local minimum. A possible approach to avoid this issue is to randomize the update rule. Intuitively, we want to…More