Blockchain — Part 1

Acyclic graph

Just had a new insight about Blockchain and I think it’s worth sharing.

Till yesterday, I was thinking of Blockchain as just a distributed database of sorts, and it wasn’t very clear to me what was so revolutionary about this technology? But then, in the evening, I was working on a python code, and as usual, it threw an error code. And the immediate reaction I had was to look at the error traceback and identify the source of the error. Basically, I had misspelled a variable name and by fixing that, my code started working fine. I had this thought out of nowhere, what if in life also, we could have tracebacks like these. But then the challenge is that we should have to be able to record every event as it happened and somehow represent that as a control flow (dependency) graph. If we’re able to do that, in theory, we should be able to traceback actions to particular events in history(or at least assign them probabilities).

Wait…. Isn’t that precisely what Blockchain aims to do? So given a sequence of events, it’s basically storing the events in blocks and chaining them together to create a control-flow graph. In the extreme scenario, every single event would be a single block. But we need to make sure there are no loops since that’d break causality. There’s a name for this kind of structure: Directed Acyclic Graph. Nice. What else do we need to have? We need to make sure at least 3 things: one, we should be able to record every event in the sequence, second, each event recorded should be validated, and third, once added, people shouldn’t be allowed to change the records for their convenience. Trusting a human to maintain that is subject to error coz people’s motivations are subject to change, but computers can be trusted to do that coz they’re not influenced by emotions, once programmed to exhibit a certain behavior, in most cases, it can be trusted to behave in the same way (assuming they’re not hacked). This is precisely what a Blockchain aims to address. Can we achieve that? I want you to try thinking about this first, but here are some hints:

1. Record every event:
Hint(Start with a closed system where you have digitized adding records — Think of purchasing something from a shopping mall. Everything you buy is logged on their system using a barcode)

2. Validate an event before adding — Making sure enough entities agree that this event happened and is valid:
Hint: (Consensus mechanism — Think of how stocks work, democracy, etc.)

3. Make sure the recorded events can’t be modified:
Hint: (How do you add immutability to a data structure?)

There’s one more thing: protecting the blockchain from getting hacked. We’ll also look into that as we move forward. For now, just think about the 3 questions posted above, and we’ll address them in the next part….

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store