Dear readers,
I received some questions from one of you regarding Optimistic roll-ups. I thought I would take this opportunity to explain a bit more about how challenges work.
Imagine everyone is involved making a giant quilt. Each person (node operator) is assigned to do their own section following some guidelines that needs to be adhered to by everyone. Once each section is completed, everyone has 7 days (waiting period) to inspect the section to see if there is anything wrong with it.
A quilter (Challenger) notices that one of the sections doesn’t look right (invalid /fake transaction). The quilter brings this to the organiser’s (Ethereum validator) attention.
The Challenger backs their claim by staking their week’s wages against it. The organisers verify the claim by checking this section against a duplicate quilt (Optimism Virtual Machine) made with and without it.
If the Challenger turns out to be correct, the quilt is redone to remove the wrong section. The person who made the wrong section gets their wages deducted and the Challenger keeps their wages wagered against the claim.
With this analogy in mind,
Challenges are done by other node operators, not an automatic process by the system.
It is assumed that everyone is on the lookout for fake transactions so these would not slip through the cracks. This is because everyone knows what a good / real transaction looks like.
Invalid transactions occur when someone tries to lie their way through, for example, claiming that a deposit happened with more ETH than it actually has. Will there be some troublemakers who purposely post a false transaction? Yes, it’s a possibility but if the chances of being caught is very high, then they are not incentivised to do so, because who wants to lose their ETH?!
Know that if you use a blockchain project like Arbitrum, the slashing doesn’t affect you as a user, only for validators. If your transaction turns out to be a false one, it doesn’t get written to the blockchain and it gets failed.
Now that we’ve gotten the Optimistic stuff out of the way, it’s time for this issue’s focus on another flavor of roll-ups known as Zk roll-ups.
Roll-ups (part two): Zero-knowledge (ZK)
Proving facts without showing the facts
A friend of mine shared this with me from the Twitter account @l2beatcom about roll-ups sometime ago. The joke pretty much summarises what is a Optimistic Roll-up and a ZK Roll-up, plus the difference between these two. :
Two rollups walk into a bar. The barman asks: "Can I see your ids?".
ZK Rollup says: "I can prove to you I'm over 18, but I won't show you my id".
Optimistic Rollup says: "If nobody can prove I'm underage in 7 days that means I'm over 18".
Since the validators in the Ethereum network need to vouch for the validity of the transactions in L2 done using roll-up technology without checking each one of them themselves, how would do they do that? Optimistic Roll-ups use Fraud Proof. ZK, also known as zero-knowledge, roll-ups use something called Validity Proofs. Let's see how that works!
Transactions are handled by Transactors, similar to the node operators in Optimistic. These transactions contain something called indexed addresses together with other transactional information. The addresses are linked to a Merkle Tree, which is a way of organising encoded data. The ZK roll-up has two such trees: one for accounts and another for transaction values. This is for better security and faster processing times.
Another group of people called Relayers do the actual batching of transactions and create a ZK-SNARK proof. Short for Zero-Knowledge, Succinct Non-interactive Argument of Knowledge, it's a fancy way of saying someone can prove they know something without revealing what the information is and without that person having to tell someone about it.
Next, the Relayers will send the batched transactions with the proof to the Ethereum validators to be added to the main Ethereum blockchain. They also need to stake ETH to become one.
In the next issue, we will compare both the Optimistic and ZK roll-ups to see what are their advantages and disadvantages in relation to each other for a more complete picture.
If you are interested to learn more about how Zk-roll-ups work in detail, here are two articles to feed your interest:
https://learn.bybit.com/blockchain/zk-rollups-eth-scalability/
https://medium.com/fcats-blockchain-incubator/how-zk-rollups-work-8ac4d7155b0e (more technical)
As always, feel free to pass this to anyone who’s interested in blockchain technology and crypto. :)
Cheers,
HappyStakeFarmer