1.2 Labs orange logo

Nevermind the Morlocks! How Ethereum Power Works Off-Grid

By Todd Mei PhD | Crypto U Education | 19 Jan 2023


The Morlocks from H.G. Wells’ Time Machine film adaptation. The Morlocks from The Time Machine (image from BD)

Even with Ethereum’s move to Proof-of-staking via the recent Merge, its processing speed will not signficantly improve until other milestones can be achieved. Users are already looking forward to the reduction of transactions fees, set to occur around March 2023 (a.k.a. the Shanghai upgrade).

In the meantime, the Ethereum mainnet will be continuing to use a few of their off-chain methods to help with processing and validating transactions (or what’s transactions per second, TPS).

It’s a lot like the Morlocks from H.G. Wells’ The Time Machine. The Morlocks live underground and use a lot of labor and technology to keep things functional, especially for their above-ground counterparts, the Eloi (or the Ethereum mainnet in this analogy).

So how do those strange Morlocks work?

When Lightning Strikes More Than Once

You may already be familiar with the monicker “Lightning Network”. So let me begin there. The Lightning Network is Bitcoin’s use of an alternative network to speed up its consensus mechanism (Proof-of-work).

Blockchain networks are complex; as well, the varying terms used to describe its components or associated networks can be confusing. Blockchains can have parachains, which are smaller parallel chains set to accomplish specific tasks and projects and which are connected to the main chain via a relay chain. Yes, a lot of chains. Parachains are also called “shards”, and they help out a great deal with TPS.

Enough of parachains! Another way to help out with processing is to use channels that are off-chain. That way they don’t tie up on-chain resources, as parachains might.

Enter the Lightning Network, which uses a specialized “state channel.” This is a transaction channel between two parties. State channels transact off-chain, and when its transactions are done (when the “session” is done in crypto jargon), the channel posts data to the main chain in one event.

In addition to speeding up the Bitcoin blockchain, the Lightning Network also reduces electricity costs, since the transactions in the state are not on-chain.

Bitcoin miners do not like this, however, since they are not rewarded for any of the transactions that happen off-chain. And if most of those transactions end up being off-chain (for Bitcoin to scale globally), then the miners don’t make most of that money. There was a schism over this point which led to the BTC hard fork that produced Bitcoin Cash (BCH).

From Electricity to Blood

The Plasma Network is Ethereum’s equivalent to Bitcoin’s Ligtning Network. In addition to saving on energy consumption, it also helps to reduce Ethereum’s notoriously expensive “gas”, or transaction, fees.

Essentially, the main dilemma to off-chain solutions like Plasma is security. There is no consensus mechanism to check bad intentions or false transactions because it is off-chain. So any off-chain processing has to be brought back to the main chain (Ethereum) for validation and finalization. Hence, while Ethereum uses Plasma to perform the labor of processing transactions; Plasma uses Ethereum as a truth mechanism for validating the transactions processed.

Ok, so let’s unpack this secuirty issue a little more: Plasma is primarily used for the exchange of ETH or any ERC-20 token. However, it cannot be transferred directly from the Ethereum mainnet to the Plasma network. Instead, a Plasma operator has to make the connection between the chains by recreating the amount concerned “from” the mainnet “to” the Plasma network.

To reiterate what’s important here: The initial record of the exchange exists on the Ethereum mainnet and so benefits from all the transparent, permanent, and immutable ledger-keeping of the main chain. Because the Plasma network is “off-chain” this precaution is absent.

To make up for this deficiency, Plasma networks employ two safeguards.

State Commitment Schemes

The Plasma operator is required to publish periodic statements of the Plasma chain to the Ethereum mainnet. These commitments are binding; and the value of them cannot be changed once submitted. So, in effect, these commitments provide immutable snapshots of a potentially mutable record. Another way of thinking about this is to say that these commitments provide the Plasma network with traction on a truth-validating network.

Exiting Waiting Periods

Moving money in a transaction from the Ethereum mainnet to the Plasma network can occur quickly because the mainnet contains the permanent record. However, moving the money back to the mainnet from the Plasma network suffers from the opposite problem. Because the Plasma chain is not permanent, there is no way to tell if the record is true. Someone moving money could falsely claim a larger amount than they have.

To address this, a waiting or challenge period is required for each transaction requesting to move money from the Plasma network to the mainnet. This mechanism is known as fraud proofing. Its period typically lasts one week, where anyone can challenge the validity or truthfulness of a transaction request. TFraud proofing is used by other side-chain processing methods (as we will see in the next section).

In short, the Plasma network isgood in that it:

  • Helps with mainnet scalability at a cheap cost

But it is problematic in that it:

  • Involves long waiting periods;
  • Requires trusting a centralized Plasma operator (security risk); and
  • Requires data being stored off-chain.

More Options for Being Optimistic

Wait . . . there’s more. Another option for increasing TPS is called an Optimistic Rollup. Sounds like a sugary treat.

Photo by Vicky Ng on Unsplash

Optimistic rollup (OR) is a strategy increasing processing and finalization speeds for the mainnet of a blockchain in a cost-efficient way. So ORs therefore reside on Layer 2 blockchains, but they process and store data off-chain. Once the data is stored and processed, it then posts the data “back” as a single transaction to the mainnet, usually in a compressed format.

ORs are described as “optimistic” because there is an assumption that the transactions they post back to the mainnet are valid. You can think of it like this: a posted transaction is valid unless proven otherwise.

Why this assumption? Remember that like Plasma networks, ORs process data off-chain without the same types of security and consensus mechanisms which exist on-chain. If any transaction is suspected of being compromised, or fraudulent, a fraud proof can be run as a test.

As we saw above, fraud proofs rely on a time duration in which a transaction can be proven fraudulent. This duration is referred to as the Dispute Time Delay (DTD). The longer the duration, which is measured by a number of blocks, the longer it takes for transactions to be processed.

ORs are considered to be an improvement over the Plasma network since even though they both use a “snapshot” method for sending data back to the main net, ORs do so in a more complete way. Plasma networks only send the total balance of all the transactions, while ORs post the minimum amount of data required to validate the transaction.

In short, ORs are good in that:

  • Transaction data, while processed off-chain, is brought back to the mainnet in compressed format.

But they are problematic in that they:

  • Have limited throughput when compare to Plasma networks and ZK-Rollups (see below);
  • Still require a fraud proof.

And Then There Were None . . . Or Zero

Another option for the processing of transactions is the ZK-Snark Rollup. Sounds like an alien named “ZK” from the planet “Snark”.

ZK-Snark is short for “zero-knowledge succinct non-interactive argument of knowledge”. This describes a scenario where two people (or computers, programs, etc) can interact minimally (non-interactive) and, ideally, instantly (succinct) where one person proves they have or know a certain piece of information (argument of knowledge) without revealing what that info is (zero-knowledge).

For example, submitting one’s password to log-in to a website means both the user and the website database know the password. The website fact-checks the submitted password with its own database and confirms that the user is in fact who they say they are (Susy Q logging in to her bank account). If the password is incorrect, the website assumes it is someone other than the proper user (Johnny trying to log in as Susy).

A ZK-Snark allows this to be done without the back and forth of submitting and verifying the password (or piece of data) and with a very small amount of data, making the process very quick. Let’s use movie-like scenario as an example:

Your partner superhero and a shape-shifting villain are in front of you. Neither can reveal their true identities for their own safety. How do you know who is who without this in-depth reveal?

Person 1: “It’s me, that one is the villain! Shoot him!”

Person 2: “No I’m me, that one is the villain! Shoot HIM!”

Person 1: “Los Angeles! 2003!!”

You shoot person 2. Only your real partner could have possibly known what happened in LA of ’03. What are your other options?

“Both of you, pull out your social security cards!”

In sum, a ZK-Snark allows just enough in the way of proof of information without revealing too much detail. Here’s another analogy:

Think of the last time you were asked to verify confirmation of a credit card transaction. Instead of sending your account details (number, balance, etc.), you send a small screen shot of the transaction in question.

In short, ZK-Snarks have the main advantage of

  • being quick, thus
  • allowing for lower transaction fees.

However, they use a different security mechanism than Plasma Networks and Optimistic Rollups. To recall, the latter use fraud proofing, which present evidence that a transaction is incorrect. ZK-Snarks use validity proofing. An in-depth account of their differences can be read here.

For our purposes, we only need to note that while validity proofing presents a more robust mechanism for security, they are more difficult to run. So to get maximum processing and finalization of transactions, ZK-Snarks are best used for “simple transactions like direct transfers and trading.

***  

Phew! That’s a lot of off-chain/off-grid activity! I hope it created more light than heat! I think the Morlocks wish the same.


This article originally appeared on Medium and is a part of the Crypto Industry Essentials educational program presented by The Art of the Bubble.

Though this article is credited to me, it contains some written material by Sebastian Purcell, PhD from his The Art of the Bubble education series on cryptocurrencies.

If you found this helpful, Subscribe to The Art of the Bubble’s free newsletter.

Join us on Discord for live chat and daily updates.

How do you rate this article?

11


Todd Mei PhD
Todd Mei PhD

Todd is a former Associate Professor of Philosophy with over 16 years of research experience in the philosophy of work and economics. He is currently the lead researcher and writer for the Web3 consultancy group, 1.2 Labs.


Crypto U Education
Crypto U Education

Cypto U is a series of blogs providing educational content for crypto enthusiasts. Content and lessons have been taken from The Art of the Bubble and 1.2 Labs.

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.