Why stuff costs gas
"gas" is a term we use to represent "compute power", or "how much load on a node operator this will give". And it's everything from compute power -> data storage. Telling a node "hey, you need to store 1 gigabyte of data forever" is load on the node operators, so we have to pay for that 1 gigabyte of gas.
If we said "hey, you have to store 1 terabyte of data forever" well that may require buying more hardware for the extra storage, and the user should be expected to pay more gas for putting that load on the node operators.
How Rollups work (Before)
Before EIP-4844, rollups did the following:
- Compress a "batch" of transactions into a chunk of
calldata - Post that data to the L1, where it would propagate forever
- Submit fraud/validity proofs to verify/reject the batch
calldata is a form of data on the EVM that is stored forever. Because the EVM currently has no way to prune state, when data is posted to the L1, all L1 nodes have to store that data permanently, which means gas costs need to be higher.
Now for rollups, this compressed batch of transactions only needs to persist for a short duration; it just needs to wait for the fraud-proof window/validity proof to be posted, and then the compressed batch of transactions is no longer needed. So, if we had a location in the EVM where data could be dumped after it was no longer needed, it would be great to put the rollup data there.
How Rollups work (After)
This is where blobs came into play; blobs are locations in the EVM that last for a temporary amount of time, but can store large chunks of data. So the new flow of rollups looks like this:
- Compress a "batch" of transactions into a chunk of
blob - Post that blob data to the L1
- Submit fraud/validity proofs to verify/reject the batch
- (Eventually, like 30 - 90 days or so) Prune the blob
Because blob data is temporary, we can charge less gas for it since nodes don't have to hold on to that data forever.
The EVM has access to specific blob data with new opcodes like BLOBHASH and point evalutation precompile to make sure the blob data includes correct rollup information.
Comparison
If you're solidity developer, consider the gas costs of emitting an event vs committing data to storage. Often, emitting an event is cheaper since the data cannot be accessed by the EVM. In the same sense, I think of blobs like "super temporary logs" where you can dump a large amount of data that will eventually be pruned from the network.
100x cheaper
The 100x cheaper comes exclusively from zk rollups, as they have better data compression techniques. See this line from EIP-4844
Optimism and Arbitrum frequently provide fees that are ~3-8x lower than the Ethereum base layer itself, and ZK rollups, which have better data compression and can avoid including signatures, have fees ~40-100x lower than the base layer.