What is Starknet?
Starknet is a Validity-Rollup (aka ZK-Rollup) Layer 2 network that operates on top of Ethereum, enabling dApps to massively scale without compromising on security.
It achieves this by bundling transactions into an off-chain computed STARK proof. This proof is then submitted to Ethereum as a single transaction, resulting in significantly higher throughput, faster processing times, and much lower costs, all while retaining the robust security of the Ethereum settlement layer.
How Starknet Scales Ethereum
1. How Starknet Scales Ethereum
How Starknet Scales Ethereum
02:42
The Starknet Sequencer
02:24
The Starknet Prover
02:26
Secure Settlement on Ethereum
03:28
How Starknet Scales Ethereum
Blockchains aim to achieve three core attributes: security, decentralization, and scalability. In the blockchain world, a well-known trilemma is that it's possible to achieve only two of these concurrently in a given system, inevitably requiring a compromise on the third. Ethereum places a higher emphasis on security and decentralization, impacting its scalability. Growth in the number of Ethereum users leads to slow transaction speeds and high gas prices, hindering Ethereum’s widespread adoption.
How can we make Ethereum scalable without undermining its security and decentralization? This is where the Starknet Validity Rollup comes in. Combining Ethereum and Starknet achieves massive scalability.
Starknet achieves scale by shifting transaction processing off the Ethereum Mainnet (what we call off-chain) while retaining a summary of the transactions onchain. Transactions are grouped in batches into blocks, processed off-chain, and then summarized into a single onchain transaction. Since transactions occur off-chain, it's vital to ensure the integrity of the transactions and their execution without having to re-execute them. Starknet addresses this by employing STARK (Scalable, Transparent ARgument of Knowledge) proofs for verifiable computation. Starknet then transmits only essential information about the block and the proof to Ethereum, where it is verified with minimal computational effort.
The Starknet Sequencer
The first core component of Starknet is the Starknet Sequencer. Sequencers take on the pivotal role of overseeing the validation and execution of transactions and proposing blocks. Their primary function involves grouping transactions and processing them as a collective entity. The unsuccessful transactions are flagged and held back by the Sequencer, allowing only the successful ones to move forward and get included in a block. Starknet’s sequencers can handle substantially more transactions per second than Ethereum nodes.
The next core component in Starknet is the Prover.
The Starknet Prover
The Prover establishes the mathematical validity of the block's transactions by generating a STARK proof, thus ensuring its integrity. Blocks are organized into groups and processed concurrently. During this phase, the Prover documents each step of transaction execution, creating what is known as the Execution Trace, along with tracking the resultant changes in the system's state, termed the State Diff.
An algorithm then meticulously blows up and mixes data from the Execution Trace. This step brings any issues to the forefront, as even a single instance of bad data contaminates the entire expanded dataset, making any issues unmissable. The Prover then selects a set of random samples from this blown-up data to create the STARK proof. This STARK proof asserts the validity of thousands of transactions.
Secure Settlement on Ethereum
The STARK proof and State Diff are transmitted to Ethereum as a transaction, where an Ethereum node accepts the transactions and unpacks the proof and the State Diff. These unpacked components are processed by two Ethereum smart contracts: the Verifier and Starknet Core. The Verifier contract breaks down the proof and analyzes samples within it. Any hint of problematic data in the samples of the proof leads to prompt rejection by the Verifier. Once the proof's validity is confirmed, it advances to the Starknet Core smart contract.
The Core contract verifies the proof's authenticity and confirms receiving the State Diff, subsequently updating the Starknet state on the Ethereum blockchain. This updated state is then added to an Ethereum block, distributed across the node network for validation and voting. When the block accumulates sufficient votes, it achieves "finalized" status, cementing its place as an immutable part of Ethereum.