In this video I'm gonna attempt to explain some ideas behind a blockchain to you. I'll try to do this by playing with a system that shares some mayor similarities with it.
A blochchain is a seqeunce (the "chain") of blocks (data structures with information entries).
For cryptocurrencies, the information entries are data like "Alice pays 0.34 BTC to Jerry", i.e. some string/sentence of information , although the nature of the information is not so relevant for the blockchain as such. It could also be something like "Next friday I should go buy milk".
In this thread, we could as information any 3 letter word. Like "man" or "bob".
I'll introduce a very cheap kind of almost hasing. At the bottom we have a list of how to translate letters to numbers. Given two letters, we gonna have one act on the other by adding the numbers and translating it back. Examples
* b=2 and f=6. Now 2+6 is 8, which is associated with h. So we say b+f -> h
* j=10 and c=3. Now 10+3 is 13, which is associated with m. So we say j+c -> m
a = 1
b = 2
c = 3
d = 4
e = 5
f = 6
g = 7
h = 8
i = 9
j = 10
k = 11
l = 12
m = 13
n = 14
o = 15
p = 16
q = 17
r = 18
s = 19
t = 20
u = 21
v = 22
w = 23
x = 24
y = 25
z = 26
We're gonna say 27 maps back to 1 and 28.
We gonna have two lines. One "information line", and one "previous hash" line. On the first block, there is no "previous", so I'll arbitrary set it to "ccc".
Finally, given any three numbers, I'll do some WORK by multiplying them together. For example, ccc translates to 3 3 3 and 3*3*3=27.
I'll now start the block chain, and my first information will be "man"
BLOCK 1:
>"man"
>ccc, 27
->
>pdq
To explain again, m=13 and c=3, so the first hash letter is 16, which is p. And so on.
My second information is gonna be the word bob.
For the "previous hash" line, I obviously take the hash from the last line.
BLOCK 2:
>"bob"
>pdq, 1088
->
>rss
Okay, now the block is on.
Give me a 3 letter word!