How Tezos Self-Amendment Works

By Lin Oshitani

While the irony of preventing the fragmentation of cryptocurrencies by releasing a new one does not escape us, Tezos truly aims to be the last cryptocurrency.

— L.M Goodman, Tezos: A Self-Amending Crypto-Ledger Position Paper

Why Self-Amending Blockchains?

Blockchains have a problem — It is hard to implement major upgrades. Fundamental changes are possible through socially coordinated hard forks, but this method has several issues:

  • There is a technical risk of a temporary network split due to incompatible nodes running in the network.
  • There is a social and economic risk of a permanent network split due to the lack of a formal process for resolving disagreements.
  • It is unclear who has the final say. The core devs? The stakeholders? Or people with the loudest voice?

This difficulty in updating blockchains hinders their ability to integrate innovations, leading to technical stagnation. What we need is a chain that can seamlessly evolve while minimizing technical and social risks.

And from this need, Tezos, the self-amending blockchain, emerged.

What are Blockchains?

What are “self-amending blockchains”? To understand what they are, we must first take a step back and revisit what blockchains are in abstract terms.

The Apply Function

At the core, blockchains consist of a state, blocks, and an apply function:

The state (the yellow table on the left) contains information such as “Alice has 9XTZ and Bob has 1XTZ”. There are also operations like Transfer (Alice, Bob, 1), which means “Alice sends 1XTZ to Bob”. Furthermore, we have blocks, a collection of such operations (the blue box in the middle).

Now, by applying the state to the block with apply (state, block), a new state state' is created (the yellow table on the right). In the new state, the operations in the block get executed, hence the balance of Alice is decreased by one and the balance of Bob is increased by one.

Chain of applies

Now where does the “chain” in “blockchain” come from? It comes from the fact that we apply apply(state, block) successively and form a “chain” of blocks and states, as displayed below:

The Score Function

Is the apply function sufficient to define a blockchain? The answer is no, as it doesn’t address how to handle branching. Because blockchains are distributed, two blocks can be created simultaneously at different parts of the network, leading to a branch in the chain:

In the diagram above, blocks block a and block m are generated around the same time. Some parts of the network extend blocks after block a (up to block b), while others extend blocks after block m (up to block n). To resolve the branching, the network needs to agree on which branch is the canonical branch to build upon.

If you want to read the full blog post, please visit Marigold website :point_right: How Tezos Self-Amendment Works