Danksharding 101: How It Improves Ethereum Scalability
Danksharding is a new design for sharding on the Ethereum network. In a sharding system, the network is divided into smaller parts called "shards," which makes it easier to process transactions. The main difference between Danksharding and other sharding proposals for Ethereum is that Danksharding focuses on providing more space for data, rather than more space for transactions. This data space is intended to be used by layer-2 protocols that support high-throughput transactions.
Source of image: Vitalik Blog https://vitalik.ca/general/2021/04/07/sharding.html
One of the key innovations of Danksharding is the concept of a "merged fee market." In this system, only one person (called a "proposer") chooses all the transactions and data for a particular shard. To prevent this from requiring too much processing power from the proposer, Danksharding introduces "proposer/builder separation" (PBS). In this system, a group of specialized actors called "block builders" bid on the right to choose the contents of a shard, and the proposer selects the valid header with the highest bid. The block builder is responsible for processing the entire shard, while all other validators and users can verify the shard efficiently through a process called "data availability sampling."
Proto-Danksharding, also known as EIP-4844, is a proposal to implement most of the logic and infrastructure for Danksharding, but without actually implementing any sharding. In a proto-Danksharding system, all validators and users still have to directly validate the availability of the full data. Proto-Danksharding introduces a new type of transaction called a "blob-carrying transaction," which is like a regular transaction but also carries a large amount of data called a "blob." While blobs are much cheaper to use than similar amounts of data in the Ethereum Virtual Machine (EVM), they are not accessible to EVM execution and can only be viewed as a commitment to the blob. Proto-Danksharding is designed to be less resource-intensive on the network by limiting the amount of data per shard to 1 MB, rather than the full 16 MB.
One reason for this is to avoid overloading the network with too much data. Currently, the average block size on the Ethereum network is around 90 kB, but the maximum possible block size (if all the gas in a block was used for data) is around 1.8 MB. The network has handled blocks approaching this maximum size in the past, but if the cost of using data in transactions (called "calldata") was reduced by 10x, the average block size would increase to acceptable levels, but the worst-case block size would become 18 MB, which would be too much for the network to handle.
To address this issue, Danksharding and proto-Danksharding use a different approach to scaling by providing more space for data rather than increasing the amount of transactions the network can handle. This allows for larger scalability gains without overloading the network, as the data is not competing with the gas usage of regular transactions.