Snark: On-chain data scaling

Snark Network
May 29, 2018 · 2 min read
Image for post
Image for post

On-chain data is growing. Given the deterministic nature of a blockchain, this will keep growing. One strategy is checkpoints. Points in time we all agree to, ignoring historic data. We trust a specific point in time, destroying the nature of a blockchain.

What if we only needed to store states and balances. In “On-Chain data, off-chain execution”, we spoke towards achieving verified computing results which give us a merkle path and a zero knowledge proof. Applying this same logic on-chain, would mean that at any given point, we only needed to store the full merkle, and the current zero knowledge proof.

Let’s consider a block, a block is our proof of transactions in it. A block is proof of a state transition. State S1 when applied with block B1 gives us state S2. So B1 is a state transition. In “on-chain proof, off-chain execution” we showed how a state transition can be represented as a zero knowledge proof. So instead of a block, we could represent this state transition with a zero knowledge proof.

Ethereum block size is currently around 25k bytes, a zk-SNARK proof, would be around 288 bytes. At time of writing Ethereum is 1 099 511 627 776 bytes. By simply replacing the blocks with zero knowledge blocks, you would decrease the system to 12 195 622 907 bytes, 1% of the current size.

The above also considers you want to keep each state transition and merkle from the beginning of time, which isn’t required. This is a different form of verified computing, a full deterministic transaction history isn’t required. All that is required is the most recent merkle and most recent zk proof. So actual size will be less than a megabyte.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store