Thursday, May 17, 2018

"How to Run a Blockchain on a Deserted Island with Pen and Paper"

I have trust issues.

From Hacker Noon:
If you’re ever stranded on a deserted island, knowing how to run the process of decentralized consensus — or in other words, operate a very simple blockchain by hand — can prove to be very useful. All you need is some fellow survivors, this post, a pen and a few pieces of paper.

If you’re not certain this skill is useful for your survival, be sure to read my last post on how blockchain can vastly improve island life.



Let’s go back to that original story and go through the process with our fearless heroes, who just crashed on a deserted island somewhere in the South Pacific — Hugo, Sawyer, Kate and Jack.


A short recap: the gang is trying to implement IslandCoin, a revolutionary new currency that will bring an end to the island’s crippled barter economy. The gang has agreed it’s fair if each of them starts with 100 coins. Since they don’t have metal to mint actual coins, they’ll have to make do with a few pieces of paper. Riddled with trust issues, the gang hasn’t been able to agree on one person to keep track of balances. Their only option is to maintain the balances together.

We’ll start with what is probably the simplest blockchain implementation for our island use case. In future posts we can explore other implementations and tie them to concepts like Proof of Work and Proof of Stake — this will help us see their benefits and drawbacks. But for now, let’s start as simple as it gets.

What are we trying to achieve? It’s very simple actually — all we’re trying to do is maintain a simple table of balances on a piece of paper. This table will show how many coins each of our heroes has. The trick is, because we can’t have one piece of paper that holds the only source of truth — we’re going to have to keep things equal and let each of the gang maintain their own version — this is the decentralized part. And naturally, we’re also going to hope that all 4 pieces of paper eventually show the same thing — this is the consensus part.
So what would this piece of paper look like?
This paper is the first one we agree on — that’s why it’s marked as day 1. Where did these balances come from? We’ve previously agreed it’s fair that each of the gang starts with 100 coins. We’re also going to need one of the survivors to write this paper. It doesn’t really matter who, so let’s take Hugo. He will be the one to publish this paper to everybody and make sure they each save a copy (the island has an amazing photocopy machine, I forgot to mention).

Since coin balances are expected to change, we’re going to create a new updated piece of paper at the end of every day. It may not always be Hugo who publishes the update though — we want to keep things as fair as possible after all.

Another important part, due to the lack of mutual trust in the group, is having each of the gang confirm the status update individually. An easy way to achieve this is having each one of the survivors sign each of the papers — but only if they agree with what’s written on it....MORE
Apparently we must add a fifth option to the four put forth in the sacred text, Series 03 Episode 22 – The Staircase Implementation:
"In a post-apocalyptic world, which task would you assign the highest priority? Locating a sustainable food source, re-establishing a functioning government, procreating, or preserving the knowledge of mankind?" *
*The second of Sheldon Cooper's three barriers, 'Each more daunting than the last.'
  Big Bang Theory-Series 3 Episode 22 – The Staircase Implementation
http://static.tvtropes.org/pmwiki/pub/images/Calvin-worship-TV_3852.jpg