UP | HOME

Blockchains

The principle behind a blockchain is quite straightforward. It is of unique identity for a given sequence of data.

A sequence as an abstract concept, implies the notions of a particular order of bytes and of having no gaps. This is technically the same notion as linearity, while the content (interpretation) of a sequence may denote (or represent) a hierarchical, graph-like structure.

A fixed-length sequence can be represented as a file or a continuous “chunk” of memory.

An arbitrary-length sequence is usually called a stream and never stored anywhere in its [hypothetical] entirety. It is however almost always have some buffer (or an aggregate) which represents (or summarizes) it “so far”.

Any fixed-length sequence of bytes (abstracting away what it may represent or denote) can be uniquely identified using a “checksum” (also called a cryptographic hash), produced by some particular hash-function (an implementation of an algorithm).

The important part here that good cryptographic hash-functions can produce the checksum (or a “hash”) incrementally, byte-by-byte, so it is possible to compute it for a potentially infinite stream observed “so far” (in a buffer and with the accumulated value).

The ability to compute an unique checksum (or a digest) for an arbitrary sequence of bytes and to use this unique checksum for establishing an identity (of a given sequence) and for checking the integrity (correctness) of the data (of a given sequence) is what enables any blockchain.

A blockchain thus is a particular arrangement of “nested” uniquely identified sequences of data.

The trick is that the hash of all the previous sequences “so far” is incorporated into each new “block”, and the unique hash is computed from this “nested” sequence.

As one may already notice intuitively, there is a fundamental emergent property of such “nested” hashing scheme – change of any single bit (from one to zero, say) in a sequence will “invalidate” the hash (the hash function will produce a completely different output).

This means that the all the hashes of all the blocks “above” (being added after) the changed bit, when recomputed, will be totally different.

This fact is used for a simple and straghtforward procedure of mathematical validation of data integrity of the whole blockchain - by recomputing all the hashes all the way from the beginning, and comparing it to the last one (“so far”).

With these properties we could extend our conceptual definition of a blockchain.

It is an append-only, immutable data structure (a representation), which may denote, encode or represent any graph-like data (an abstraction), together with a mechanism (set of functions) to ensure (and mathematically guaranetee) its data integrity and validity.

Another fundamental principle is that multiple nodes store a full (or partial) copy of the whole blockchain (representation) and extend it (in an append-only way) only after checking the consensus among other nodes, which is basically a majority vote for what each node has “observed” and validated so far.

So, nested cryptographic checksums, being validated for every operation, which are restricted only to extension (immutable, append-only “ledger”).

And this is it. The hundreds of different projects (implementations) differ in the implementation details, but not in these fundamental principles and the resulting properties.

Nesting and an unique identity (two exact copies would have exactly the same hashes) is the universal basis.

The best analogy is knitting, when a thread “knots to itself” and the whole woolen cloth extends in an “append-only” way.

The more subtle analogy, of course, is the DNA, which is also “grows” in an append-only way and has some validation and even repair mechanisms (based on structural arrangement and redundancy instead of mathematical functions – Mother Nature does not count).

Just as DNA is a supposedly immutable store of genetic information (a particular arrangement of molecules), a blockchain is conceptually similar arrangement of information (particular sequences of bits).

This analogy, however, should not been taken too far (as Chuds on the social media do). There are way better specialized well-studied data structures for almost every possible scenario (there is a while branch of computer science devoted to implementation of data structures and related, following from them, algorithms).

So, no, it is neither special or profound or mythical. It is just distributed append-only immutable structures (arrangements of bits), made out of nested cryptographic hashes (outputs of partocular mathematical functions).

Author: <schiptsov@gmail.com>

Email: lngnmn2@yahoo.com

Created: 2023-08-08 Tue 18:37

Emacs 29.1.50 (Org mode 9.7-pre)