Solana 103: State Compression of Blockchain Data and NFTs

Solana 103: State Compression of Blockchain Data and NFTs

By Michael @ CryptoEQ | CryptoEQ | 6 Nov 2023


You are reading an excerpt from our free but shortened abridged report! While still packed with incredible research and data, for just $20/month you can upgrade to our FULL library of 50+ reports (including this one) and complete industry-leading analysis on the top crypto assets. 

67cbbf4723857b85c151585aa280e6d940346c501cef75bafd7dea02b44b24c9.png

Becoming a Premium member means enjoying all the perks of a Basic membership PLUS:

  • Full-length CORE Reports: More technical, in-depth research, actionable insights, and potential market alpha for serious crypto users
  • Early access to future CORE ratings: Being early is sometimes just as important as being right!
  • Premium Member CORE+ Reports: Coverage on the top issues pertaining to crypto users like bridge security, layer two solutions, DeFi plays, and more
  • CORE report Audio playback: Don’t want to read? No problem! Listen on the go.

 

Intro

Optimized storage solutions become invaluable for enhancing operational efficiency in the rapidly-evolving domain of cryptocurrency. Solana offers a compelling solution known as state compression. However, to truly grasp the brilliance of state compression and concurrent Merkle trees, we must discern the nuances between Solana’s ledger and its state.

The ledger, in essence, serves as a chronological catalog of all transactions authenticated by users, extending back to Solana's inaugural block. Unyielding in its integrity, it is irreversible once a transaction finds its place in the ledger. Validators are tasked with authenticating these transactions prior to their incorporation into the ledger. And for the sake of resilience against potential failures, this ledger is disseminated among numerous nodes in the network. However, a validator might only retain the fresher blocks in their ledger copy, deeming older blocks redundant for future validations.

Conversely, the state is a live snapshot, encapsulating every account and program within Solana. Exhibiting mutability, the state undergoes transformation with every processed transaction. Envision the state as a streamlined database, ripe for extraction of data regarding token balances, programs, and accounts.

To encapsulate:

  • The ledger, unwavering in its composition, stands in contrast to the ever-evolving state.
  • While the ledger enshrines every transaction's history, the state mirrors the real-time status of all entities and operations.
  • The ledger's primary role is in verification, while the state oversees transaction execution and program operation.

A Deep Dive into State Compression

At its core, state compression is a technique to economize storage and minimize the volume of data stored on the blockchain. It achieves this by converting a ledger's data into a cryptographic hash and securing it within an account. Indexers play a crucial role in sustaining the current state of the Merkle tree by processing relevant transactions. Users are thus able to swiftly access their data via the indexer. The on-chain root is instrumental in ensuring the validity and security of program interactions, enabling users to cross-verify the data with the on-chain root for accuracy and authenticity.This method capitalizes on the ledger's intrinsic security and unalterable nature, while also furnishing a solid framework to authenticate the stored data.

One notable benefit is the economic advantage it affords, particularly to applications constructed atop Solana, like NFT projects. Rather than resorting to the more expensive account-based storage, developers can allocate ledger storage, offering both cost savings and assurance of data integrity. State compression has made minting NFTs on Solana an order of magnitude cheaper than other top chains.

2c4d43844e0de34121ee2e596474eb2994d68d7af2797d3e2998065b9a014dc4.png

Source: The Tie

What sets Solana's state compression apart is its integration of concurrent Merkle trees. The underpinning structure of a Merkle tree warrants explanation. A Merkle tree is a data structure designed for efficient and swift verification of substantial data volumes. It operates by segmenting the data into smaller units, termed "leaves," and subsequently amalgamating these leaves into progressively larger "nodes." Each node embodies a hash of its child nodes, culminating in a singular hash at the apex of the tree, referred to as the "root hash." This root hash serves as a verifier for the entirety of the data within the tree, negating the need for individual leaf inspections.

Unlike traditional Merkle trees, which render their proofs void with every alteration, concurrent Merkle trees are devised to handle a flurry of transactions in quick succession. Their uniqueness lies in storing an encrypted record of their freshest modifications, inclusive of their root hash and its requisite proof. This record finds its home on-chain within an account earmarked for the tree. 

In real-time operation, when a validator is inundated with several requests to refresh an on-chain Merkle tree in the same time frame, this changelog emerges as a veritable reference point. This facilitates simultaneous modifications to the Merkle tree, up to its buffer limit. The outcome? Even in environments demanding high throughput, the system upholds the integrity of the "proof of inclusion." In simpler terms, it can validate a particular data piece's inclusion within a hashed set of data, condensed into a Merkle root.

 

How do you rate this article?

65


Michael @ CryptoEQ
Michael @ CryptoEQ

I am a Co-Founder and Lead Analyst at CryptoEQ. Gain the market insights you need to grow your cryptocurrency portfolio. Our team's supportive and interactive approach helps you refine your crypto investing and trading strategies.


CryptoEQ
CryptoEQ

Gain the market insights you need to grow your cryptocurrency portfolio. Our team's supportive and interactive approach helps you refine your crypto investing and trading strategies.

Publish0x

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.