ELI5: The data availability problem.
Ever heard "Zk rollups", "Validiums", "Volition", "DAC", "Data availability layer" but not sure what they are?
~15 tweets and you'll know ๐งถ
By now maybe you know what a validity proof is:
Alice executes a program, then sends the output + a proof of execution to Bob.
Bob verifies the proof, and has certainty that the output is correct
And it is cool because
1) Bob does not have to run the program and
2) Verifying the proof takes fewer steps than running the program and
3) Ethereum smart contracts are able to verify such proofs.
Cool.
What, then, is the data availability problem?
Here's the thing, I simplified how it works in my second tweet.
The PROOF and the OUTPUT of the program can be independant.
Bob can check that Alice executed her program correctly, without knowing what the output of the execution is
As an example.
Alice and Bob are playing cards.
Alice is counting the points.
She can give Bob a PROOF she counted correctly
Bob can be mathematically sure she is honest, without him knowing how much points each has (the OUTPUT).
For each round they play, Alice sends a PROOF to Bob that she moved from round N to round N+1 correctly.
Bob can check that this transition is correct.
But what happens if Alice loses her scoresheet?
They get stuck.
The only way to generate a new proof to move the game forward to state N+1 is to know what state N is; if it is lost, no proof can be generated.
In other words, they need the OUTPUT of the transition from N-1 to N to generate the new proof
This, in a nutshell, is the data availability problem: you proved a state transition, but you still need the state to be widely available so that a subsequent state can be computed afterwards.
What about blockchain networks?
When StarkNet settles on Ethereum, it COULD send a proof of correct execution "I correctly moved from block N to block N + 1" without sending block N+100.
But if block N+100 gets lost, then it'll be impossible to move StarkNet forward.
So StarkNet sends a proof of correct execution "I correctly moved from block N to block N + 1" as well as the output "Here are the differences between state at block N and N+1"
Data is stored on Ethereum, foreva.
Problem solved!
This is called a "Validity rollup" or "ZK rollup". With these we achieve, today, cost reduction of 500-1000x.
But can we do better?
After all, storing data on chain is expensive.
Maybe storing data offchain without losing it isn't hard?
So you have "Data availability layers" like @CelestiaOrg being designed, offering guarantees on data being available.
Others design DAC (Data Availability commitees), which are sets of entities in charge of safekeeping the data
It's an interesting design space.
These designs - Proof validated by Ethereum, data stored elsewhere - are called "Validiums".
With these you get, today, cost reduction of 20 000x
twenny
thousands
times
cheaper
Amazing righ ??!! Yes, that much. This is what @Sorare or @Immutable use.
Last point.
In both Validity rollups and Validiums, these design choices affect the whole chain.
But what if, inside a single chain, you could chose which variable goes where?
eg "NFT owner goes on L1, NFT metadatas sits offchain"
โ๏ธ ZK Rollups
โ๏ธ Validiums
โ๏ธ DAC
โ๏ธ Data availability layer
โ๏ธ Volition
Now you know what these are.
Let us know if you have any questions or corrections to this great thread written by @henrlihenrl!
Have a good day!