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:
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
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.
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.
Recommended by LinkedIn
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.
Merkle Trees & Verkle Trees
State proofs or block witnesses often rely on distinctive types of data structures known as Merkle Trees and Verkle Trees.
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:
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.
Business Development, Operations, Strategy
1yinteresting, 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
Founder & CEO Nvlope, DePIN Medicine, Radiology Blockchain, Product Architecture
1yBruno W Agra, I get you now. Oh yes. Wide adoption and appropriation after years of stigmatism. It's definitely a Coordination Failure.
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
1yKatja Rausch
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
1yDaniele Proverbio, PhD
Chief Conversational AI Disruptor @ ChatFusion/ContactLoop | E&Y Entrepreneur of the Yr '08 | $150mn Exit ‘08 | AI Insights for Marketers & Sales Executives
1yBruno W Agra Very nice share -- amazing work.