TOWARDS GENUINE DECENTRALIZATION: THE UNFINISHED TALE OF STATELESS NETWORKS

TOWARDS GENUINE DECENTRALIZATION: THE UNFINISHED TALE OF STATELESS NETWORKS

Stateless Ethereum - The Promise, Challenges, and Prospects

In the fast-paced world of blockchain development, the pursuit of decentralization has faced numerous hurdles and technical obstacles.

The infamously famous buzzword - decentralization - is often loosely used to describe blockchain networks, but recent incidents and issues have prompted a critical reevaluation of its meaning and realization.

For example, just last year, users of Ethereum in Venezuela faced unexpected disruptions in their access to the blockchain through platforms like MetaMask.

This interruption was caused by a problem with Infura, a central infrastructure provider for on-chain wallets and decentralized applications. Such incidents underscore the risks associated with relying on centralized entities, prompting a ‘reassessment of the fundamental premise and promise of decentralization.’

In 2017, Vitalik Buterin and Ethereum developers introduced for the first time the theoretical concept of 'Stateless Ethereum,' which offered a potential solution to these challenges. 

Stateless Networks seek to diminish dependence on centralized services and empower users to operate their own nodes on basic devices, such as mobile phones, enabling not just blockchain accessibility but also node functionality even in restrictive conditions.

This article will delve into a comprehensive exploration of these topics, ranging from ETH's current challenges to the principles and technicalities of Stateless Networks, their implementation, the benefits they offer, and future prospects. 

The Centralization Paradox and the Promise of Stateless Networks

An in-depth critique of prevailing blockchain networks, such as Ethereum, uncovers a somewhat paradoxical 'centralization dilemma.' 

While these networks are predicated on the concept of decentralization, a considerable portion of the network data finds itself locked within a handful of robust servers. This concentration mostly emerges from the hefty storage requisites and high entry cost needed for running a full node.

For instance, as of February 2023, the operation of a full Ethereum node requires a high-speed 2TB Solid State Drive (SSD). Archive nodes, which retain all network data from inception, have escalated to a staggering 12TB of storage requirements each.

Hence, this circumstance unintentionally fosters a convergence of full nodes among a limited group of entities who have the financial resources to comply with the prerequisites and the operational capability to shoulder the task of maintaining these nodes.

Moreover, the perpetual growth of blockchain state data, encompassing details about accounts, contracts, balances, and storage, intensifies the problem exponentially.

An overlooked fact about blockchain networks is the escalating need for ever more resource-demanding processes and software prerequisites when setting up new full nodes. As transaction volumes rise, the growth of state data becomes inevitable, precipitating a spiral in storage demand, and in the context of AI technology, substantial computational demand.

Stateless networks propose a radical resolution to these current challenges as the load on individual nodes is reduced by eradicating the necessity for storing and processing the entire state, significantly cutting down the hardware requirements, and processing time, for each node.

The introduction of state providers makes it possible to operate a node even on commonplace devices, such as mobile phones, omnipresent in today's global economies. This structural shift opens up a diverse and inclusive path for a significantly larger number of participants to engage in transaction validation and contribute to network security, signifying a 'quantum leap' for blockchain technology towards an unprecedented level of decentralization and security.

ETH2 Validators

In Eth2, the roles of consensus nodes (miners) and block producers are separated. Particularly in the beacon chain, the process of proposing blocks and forming consensus operates differently.

Blocks are proposed every 12 seconds by a randomly selected validator, while consensus is formed through attestations, with each validator voting for a chain every 6.4 minutes.

This separation of block proposers and validators introduces improvements, yet significant design intricacies. For example, a validator could enter a list asserting their capability to produce blocks.

Alternatively, anyone (who has 32 ETH available to stake) could propose blocks, but the content of the block itself would be produced by different entities who bid on getting their pre-packaged blocks proposed.

Several key challenges arise with this transition:

  • Network Latency: In this new model, a considerable amount of communication is required between block proposers and validators, as well as among validators themselves, to maintain consensus and secure the network. This increased communication demand can potentially slow down transaction processing time and introduce latency.
  • Validator Concentration: Another challenge lies in the concentration of validators. The operation of multiple validators requires substantial computational power and storage capacity. This demand may result in a scenario where only a small number of entities have the necessary resources to run multiple validators, creating a risk of inadvertent centralization. The idea then being that a provider owns more of the block formations (we see this today with ETH2 stacking where Lido and Coinbase own a chunk of the network. Rocketpool has been accused of this for ETH1).
  • Data Intensity: The third challenge relates to the escalating data intensity. In the Eth2 design, validators are expected to maintain and verify a significant volume of network data. This obligation increases the hardware and bandwidth requirements for operating a validator, which escalates operational costs. Consequently, this may limit the number of entities capable of fulfilling the role of validators and once again poses a risk of centralization.

Gaining a comprehensive understanding of ETH2 validators is essential for effectively managing the risks inherent in operating blockchain networks. It is crucial to address concerns such as network latency, ensuring a diverse and widely distributed validator set, optimizing data management procedures, and maintaining seamless upgradability. These factors play a vital role in upholding a resilient and decentralized ecosystem.

What are Stateless Networks? 

Legacy stateful blockchain networks require each node to maintain a local copy of the entire blockchain, updating its state with each new block. This model demands substantial resources in terms of storage and computational power, creating scalability and efficiency challenges.

Stateless networks reimagine this architecture.

A stateless network, in general, refers to a network model where nodes in the network do not need to store any information about the network's "state." In other words, the nodes do not maintain any past information about the network's activities.

In the context of blockchain networks, stateless networks rely on 'state proofs' or 'block witnesses' provided by the parties involved to validate a transaction or block against a specific state.

Stateless networks operate on the principle that transactions are independent, isolated events. They don't rely on the prior state of the network for validation, and each transaction is evaluated in its own context without any dependencies on previous transactions.

State Proofs & Block Witnesses

  • State Proofs: State proofs are a fundamental component of a stateless blockchain design. They can be seen as compact representations or 'proofs' that help validate the state of a blockchain at any given point. These proofs are particularly crucial in a stateless model because they remove the need for nodes to maintain a complete copy of the entire state. In a stateless network, state proofs would allow nodes to validate transactions and blocks without needing to store and maintain the complete state data.
  • Block Witnesses: A block witness is a specific form of state proof. In a proposed blockchain stateless model, a block witness would contain all the necessary data required to execute and validate a block, essentially serving as a proof of the state. A block witness is generated by the block producer and is necessary for other nodes to validate the block without needing access to the complete state.

Statelessness in Context

According to classifications found in Ethereum's documents, statelessness denotes a change in how nodes manage state data. This concept can fall into two broad categories: weak statelessness and strong statelessness.

  • Weak statelessness: This method shifts the responsibility of state data storage onto block proposers. Consequently, other nodes can authenticate blocks without needing to store the entire state data. The feasibility of weak statelessness relies on the implementation of Merkle trees, and the division of tasks between proposers and builders, which circles back to the aforementioned challenge.
  • Strong statelessness: Contrarily, strong statelessness eliminates the need for blocks to contain state data. Instead, transactions are sent with accompanying witnesses that block producers can compile. This arrangement means users assume a larger role in managing the state as they provide witnesses and 'access lists' that detail the accounts and storage keys they're transacting with.

Data Expiry in Stateless Networks

Within the sphere of stateless networks, data expiry adopts a unique role as a strategy to manage the burden of ever-growing blockchain state data.

As a principle, it purports that specific pieces of data or states 'expire' — they are removed from active use following a certain time period or under defined circumstances.

The system does not completely erase these 'expired' data pieces or states.

Instead, it relocates them to a different storage area that's less immediately accessible. This storage area could be a separate segment of the network or an entirely different data storage system, often lower cost and slower in retrieval times, but capable of housing large amounts of data.

The motivation behind data expiry is twofold. First, it reduces the active data burden on network nodes. When a state expires, it is no longer part of the active state, meaning nodes no longer need to store or process this information routinely. This practice significantly decreases the storage and computational resources necessary for operating nodes.

Second, it allows for more efficient use of network resources by prioritizing data based on its relevance and usage frequency. More recent or frequently accessed data remains within the 'active' pool, ensuring that the most relevant information is readily accessible, thereby enhancing the network's performance.

However, it's important to note that this system requires careful management to ensure the integrity of the blockchain. The network must keep track of where expired data is stored, ensure its security, and have a system for retrieving it when necessary.

Also, for users to validate transactions involving expired states, they may need to access this less readily available data. Therefore, the system might need to implement mechanisms for retrieving expired data efficiently when required.

Ultimately, data expiry in stateless networks presents an innovative approach to handling the continuous growth of blockchain state data.

Data Expiry vs State Expiry vs History Expiry

While both state expiry and data expiry share similar objectives, there are subtle differences in their focus and implementations.

State expiry specifically pertains to the 'state' of a blockchain — that is, the current status of all accounts, contracts, and balances. It aims to manage the size of the state by removing older or less relevant state data from active use.

On the other hand, data expiry is a more 'general concept' that can apply to any data within a system, not just the state data. It includes all types of data or information managed by the system, such as transaction data, contract codes, or even historical block data.

The challenge with history expiry lies in determining the relevance of historical data and the policies for expiring data - the adoption of such strategies depends heavily on resource management, performance, and data availability.

The Concept of Epochs and the Extended Address Scheme

In a system based on epochs, each epoch is a predetermined time span. This time-based system integrates with the blockchain address scheme in a way that allows efficient management of data and enhances network scalability.

In this scheme, every blockchain address comprises an epoch number (e) and a sub-coordinate (s). The epoch number corresponds to the specific period during which the address was generated or became active, while the sub-coordinate typically refers to the specific address or account within that epoch.

An account associated with this extended address scheme can only interact with the blockchain during an epoch equal to or greater than the epoch number 'e' assigned to it. This stipulation ensures that accounts can't initiate transactions or interact with the blockchain in epochs that have passed, simplifying data management and potentially enhancing network security.

For example, if an address was generated in the 5th epoch (e=5), it would not be able to interact with the blockchain during the first four epochs, but could do so from the 5th epoch onwards.

This epoch-based system combined with the extended address scheme provides an efficient method for managing the ever-growing state of the blockchain. By segregating data and transactions according to epochs, it becomes easier to apply data, state, or history expiry policies, thereby reducing the active data burden on the network nodes.

However, the implementation of this system needs careful consideration to ensure backward compatibility, network security, and efficient data retrieval mechanisms.

State Trees: Organizing the Network

The network's state is represented through a growing sequence of state trees, with each one linked to a distinct epoch.

Modifications to the state are confined to the state tree of the ongoing epoch. State trees of past epochs are rendered immutable and can be accessed only with specific proofs or "witnesses". Meanwhile, state trees of future epochs remain inactive until their corresponding epochs commence.

This model of organizing the network's state offers several benefits. By compartmentalizing state data into separate trees based on epochs, it effectively simplifies data management, thereby enhancing the network's efficiency and scalability. 

State trees of current epochs are actively managed and updated, keeping them responsive and up-to-date. Since previous epochs' state trees are immutable, this reduces the risk of inadvertent or malicious modifications to historical state data, thus improving the network's security. 

Moreover, by allowing access to these historical state trees only through specific proofs or witnesses, the system ensures data integrity while providing a mechanism for users to verify and access historical states when required.

State trees for future epochs remain dormant until their time comes, which means they do not consume active resources, further contributing to the network's efficient use of resources.

However, this structured approach also requires a robust mechanism for generating, managing, and transitioning between state trees, with considerations for maintaining compatibility, security, and efficiency in data retrieval.

Adding Storage Slots: Enhancing Network Capacity

Incorporating storage slots as if they were individual accounts is an effective method to enhance the network's capacity. By doing so, each storage slot becomes its own addressable entity within the blockchain network, akin to an account. This approach leads to a more fine-grained and flexible data management structure.

However, to accommodate this shift, certain operational codes need to be modified to include an epoch parameter. This alteration enables these operational codes to interact with the storage slots based on the specific epoch they belong to, thus supporting the epoch-based system and extended address scheme discussed earlier.

For instance, operations related to reading or modifying data in storage slots will have to take into account the epoch in which the data resides. This would ensure that operations are executed on the right version of the data corresponding to the correct epoch, requiring a robust implementation strategy.

Advantages of Adopting Stateless Networks

The adoption of stateless networks can bring forth a host of advantages to blockchain networks, expanding across dimensions such as scalability, reduced client requirements, synchronization speed, security, resource optimization, future-proofing, cost reduction, environmental impact, and greater network decentralization.

  • Lighter Client Requirements: Stateless networks significantly decrease the storage and computational demands on individual nodes since nodes are no longer obliged to store the entire state of the network. This easement allows more entities to participate, from any device, thereby enhancing network accessibility, a key pillar of decentralization. decentralization.
  • Rapid Synchronization: In a stateless model, nodes only need to synchronize the block headers, significantly reducing the time and resources required for a new node to join the network and start validating transactions, unlike in a stateful model where a new node has to download and process the entire history of the blockchain.
  • Improved Scalability: Stateless networks have the ability to greatly enhance the network's scalability. The reduction in state storage requirement means that more transactions can be processed within the same block size, potentially improving the transaction speed and the network's overall capacity.
  • Increased Security: Stateless networks can enhance the network's resilience against foundational level attacks, for instance, preventing an attacker from crafting a block that references a vast number of state entries, causing other nodes to use excessive computational resources to process it.
  • Implementation of State Rent: Stateless networks open up the possibility of introducing "state rent", a mechanism that would require smart contract owners to regularly pay for the storage they use. This could lead to a more efficient use of resources and decrease the number of "dead" or unused contracts filling up the state (a new generation of Filecoin's pegging strategy).
  • Cost Reduction: The diminished demand on hardware and bandwidth could result in lower operational costs, particularly for validators who need to run a fully synced node.
  • ESG Aligned: The reduction in storage and computational requirements could translate to lower energy consumption, aligning blockchain technology more closely with the global drive towards environmentally friendly and sustainable technologies.

Merkle Trees & Verkle Trees

State proofs or block witnesses often rely on distinctive types of data structures known as Merkle Trees and Verkle Trees.

  • Merkle Trees: Patented by Ralph Merkle in 1979, Merkle Trees are binary trees encompassing a set of cryptographic hashes. Each leaf node in the tree is a hash of a data block, and each non-leaf node is a cryptographic hash of the labels of its child nodes. The root or the topmost node is a hash of all the hashes beneath it. This structure allows secure and efficient verification of large data sets.
  • Verkle Trees: Representing a newer development, a Verkle Tree is a k-ary tree, meaning each node can have k children. This configuration allows for smaller proof sizes and less data needed to verify a block's integrity.

Verkle Trees: The Path Towards Blockchain Statelessness

Verkle Trees stand as a promising proposition for addressing the escalating state size concerns in blockchain networks. Essentially, Verkle Trees are an advanced version of Merkle trees, which are binary trees employed to securely authenticate substantial quantities of data.

Merkle trees play a pivotal role in blockchains, as they generate a unique 'fingerprint' for a comprehensive list of transactions within a block. Any alterations to the data would lead to a modification in the fingerprint, thereby making any tampering attempts evident.

Verkle Trees extend this concept. They diverge from the binary tree structure of Merkle trees by incorporating a much larger number of branches at each node. The number of branches is typically chosen as a power of two, often set at 256 or more, which enables efficient encoding of branches as binary data.

Verkle Trees offer a notable advantage by significantly reducing the size of proofs required for data authentication. Unlike binary Merkle trees, which often result in large proofs due to hashing at each level, Verkle Trees reduce the number of tree levels through increased branching at nodes. As a result, proofs become remarkably smaller. This capability positions Verkle Trees as a potential catalyst for achieving comprehensive statelessness in blockchain networks. By providing manageable witnesses that are less than 1 megabyte in size, they offer a feasible solution to the challenge of state management.

Verkle Trees make use of Kate or KZG commitments (Kate, Zaverucha and Goldberg polynomial commitments) - a cryptographic primitive - to generate succinct proofs for datasets of any magnitude. These commitments confer an added benefit of generating smaller, fixed-size proofs irrespective of the dataset's size.

Despite the challenges, including the need to understand a new cryptographic component, the benefits of Verkle Trees are considerable. The adoption of Verkle Trees can potentially help any blockchain network overcome state management issues.

This paradigm not only facilitates the transition to total statelessness and the incorporation of additional execution shards but also minimizes the impact on users and smart contract developers. Additionally, it upholds the critical tenets of security and decentralization.

Verkle Trees and Stateless Networks: Tackling Security Challenges

Verkle Trees and stateless networks introduce several significant improvements that can directly address inherent security challenges in blockchain networks.

Here are a few of them:

  • Data Integrity: Verkle Trees, like their predecessor, Merkle Trees, can help ensure the integrity of data. They provide a mechanism to prove that a piece of data is a part of a particular set, without needing to reveal the entire set. Any change to a piece of data will change the Verkle root, indicating that a data modification has occurred. This makes it virtually impossible to alter transaction data without detection.
  • Resource Limitation Attacks: In a stateful network, an attacker might attempt to exploit the network's resource limitations by bloating the state with unnecessary data, causing other nodes to fail due to insufficient resources. In a stateless network, this type of attack is mitigated because each node does not need to maintain the entire state, thereby reducing the storage and computation requirements per node.
  • Historical Data Access: In stateless networks with data expiry, the process of accessing historical data involves a proof mechanism. This means that even when data is archived, the ability to prove its existence and validity remains. Therefore, even if the historical data is stored in a secondary storage, its integrity can be assured.
  • Secure State Transitions: Verkle Trees enable secure and efficient state transitions. With each node not having to maintain the complete state, state transitions (updates) can be handled more securely and effectively. Any discrepancy in state transition can be easily detected with Verkle proofs.
  • Increased User Responsibility: While this may seem like a downside to some, increasing the responsibility of users for maintaining and providing their state data can actually improve security. Users have a vested interest in ensuring their data is accurate and secure, possibly leading to improved security practices at the user level.
  • Scalability and Security Trade-off: Verkle Trees reduce the size of the data that nodes need to store and process without compromising the ability to verify transactions, thus maintaining the network's security while enhancing its scalability.
  • Reduced Single Point of Failure: Stateless networks, by design, distribute the storage responsibility across multiple nodes, reducing the chances of a single point of failure. If a few nodes were to go offline, the network could still function without any significant impact on its performance or security.
  • Mitigation of Replay Attacks: With the epoch system in place, transactions from previous epochs can't be replayed in the current one. This natural partitioning of transaction history can significantly help mitigate the risk of replay attacks.
  • Immutable Audit Trails: Like traditional blockchain networks, stateless networks with Verkle Trees maintain an immutable record of transactions, providing a verifiable audit trail. Any attempt to tamper with a transaction will result in an altered Verkle proof, which can be easily identified as nodes cross-verify the information.

Conclusion

Stateless Networks, in their quest to streamline state storage (in our case, at SWTCH Labs, taking one step further to Trusted Computing) and make node operation more accessible to users worldwide, still confront considerable implementation challenges.

Despite the dedication of substantial resources - hundreds of millions of dollars and six years of continuous research and development efforts from the likes of Ethereum developers and others - the promise of these networks has yet to come to full fruition.

Enabling everyday devices like mobile phones to function as nodes brings about a significant expansion of blockchain technology's impact across previously unexplored sectors of the global economy. This transformative shift opens the doors for a wider range of participants, spanning various economic backgrounds, to contribute to transaction validation and enhance network security.

Consequently, this advancement propels us toward an unprecedented level of transparency and security, marking a crucial milestone in our commitment to a more diverse, inclusive, and genuinely decentralized blockchain landscape. It addresses the core technological challenges that extend beyond the boundaries of technology itself, representing the next era in blockchain's evolution.

Hence, the shift towards stateless networks is not just a technological breakthrough, but an evolutionary journey, though complex, yet indispensable to uphold and actualize the core ideals of blockchain systems.

Carlos MARTINS

Business Development, Operations, Strategy

1y

interesting, but still requires "special" storage nodes and the word "careful" still pops up a lot... All the concepts brought forth aim at reduced footprint (in storage, processing power, bandwidth, everything) of participating nodes on a network, thus strengthening decentralisation and network resilience. ...but there's the creation of a specialist subnetwork that picks up on the tasks no longer performed by normal nodes and much ambiguity on exactly how decisions on what state/data/history to keep and the impact on legacy transactions/smartcontracts, etc I'm looking forward to clarification of research on these topics, as all the issues being dealt with pertain to the specific solutions offered by blockchain technology. Thinking out of the block might sometimes be helpful too. Just my 2 cents Bruno - and independently of my comment to your article, great write-up 🙌 Thomas

Ryan Wright

Founder & CEO Nvlope, DePIN Medicine, Radiology Blockchain, Product Architecture

1y

Bruno W Agra, I get you now. Oh yes. Wide adoption and appropriation after years of stigmatism. It's definitely a Coordination Failure.

Prof. Dr. Ingrid Vasiliu-Feltes

Deep Tech Diplomacy I AI Ethics I Digital Strategist I Futurist I Quantum-Digital Twins-Blockchain I Web 4 I Innovation Ecosystems I UN G20 EU WEF I Precision Health Expert I Forbes I Board Advisor I Investor ISpeaker

1y
Prof. Dr. Ingrid Vasiliu-Feltes

Deep Tech Diplomacy I AI Ethics I Digital Strategist I Futurist I Quantum-Digital Twins-Blockchain I Web 4 I Innovation Ecosystems I UN G20 EU WEF I Precision Health Expert I Forbes I Board Advisor I Investor ISpeaker

1y

Daniele Proverbio, PhD

Lawrence Ng

Chief Conversational AI Disruptor @ ChatFusion/ContactLoop | E&Y Entrepreneur of the Yr '08 | $150mn Exit ‘08 | AI Insights for Marketers & Sales Executives

1y

Bruno W Agra Very nice share -- amazing work.

To view or add a comment, sign in

Insights from the community

Others also viewed

Explore topics