State bloat is the achilles heel of blockchain scalability. As blockchain networks grow in usage, and into more complex use cases/applications, the challenge is: how do you manage state bloat and the cost, performance, and decentralization degradation associated with state bloat?
As the industry has watched Ethereum’s state grow, multiple approaches to address the issue have emerged over the past few years. Things such as subnets and sharding are some of the more popular current approaches, but they focus more on splitting state, not necessarily eliminating it. But with the emergence of zero-knowledge proofs, now a new stateless trend is emerging, and there’s a good chance it’s the best approach to address the issue.
Ethereum is already all-in on the stateless direction. Vitalik and other researchers at the foundation have been talking about it since 2021. And they’ve recently announced they are prioritizing statelessness as one of the next big protocol upgrades. Fleek Network is embracing statelessness as well, but in a very different way (stateless execution rather than blockchain state). So we thought it’d be helpful to dive deeper into this trend and what it actually means.
The Statelessness high-level TLDR is:
- Most current popular state scaling solutions (sharding, subnets) focus on splitting state.
- While splitting state is useful, statelessness or eliminating state would have a bigger impact on addressing the issue.
- The emergence of viable zero knowledge proofs has opened the door for different approaches to statelessness, meaning using proofs for verification instead of state.
- Ethereum is implementing it via state expiry and weak statelessness, meaning their nodes don’t need to hold historical blockchain state, but their execution remains stateful.
- Fleek Network’s approach involves having nodes keep a very succinct blockchain state, but not having any execution state by default.
Now let’s dive deeper.
Most current popular solutions focus on splitting state, not eliminating it.
The current popular approaches (sharding, subnets, rollups), focus on state division and parallelization. It can be an effective solution at a certain scale, but the complexity of synchronizing state splits and coordinating separate shards/subnets/rollups is not trivial. While optimizations like Danksharding will continue to improve the splitting approach, it’s likely that if eliminating state were an option, it could unlock significant simplicity, cost, performance, and decentralization benefits.
Ethereum has known statelessness is the answer for a while.
This is not a new conversation, and solutions have been in debate for years now, ever since the statelessness roadmap proposed by Vitalik back in 2021 - together with Dankrad Feist’s statelessness breakdown.
The recent prioritization of statelessness over sharding makes a lot of sense. Because if you can figure out how to eliminate state, that’s much more impactful than figuring out how to more efficiently carry the forever-growing state.
The emergence of zero-knowledge proofs has opened the door for statelessness
Most of the current solutions mentioned above for scaling state (sharding, subnets, etc.) were ideated before proofs/zk were a legitimate viable option. But now that they are a viable option, they enable entirely new design patterns for protocols. For example, allowing for the execution of compute/services off-chain or in a stateless manner and just generating cheap proofs to be posted on-chain and used for verification. One of the best early examples of this paradigm shift was Mina Protocol, utilizing ZK to maintain an extremely light chain with constant state size of 22kb that is just recursively proving state every block.
How Ethereum’s Statelessness Works
State expiry / weak statelessness, implemented together, can allow for simple pruning of state and also allows the utilization of proofs to enable witness clients to be able to verify a certain piece of information existed at a certain position/moment of state - without needing to store a full archival node (e.g. via Merkle proofs). To avoid confusion, Ethereum will still have state, this change just means that nodes will no longer need to carry historical state, but rather they can just prove historical state at the point of execution using verkle trees.
- The concept of a state tree per period (~= 1 year) would be introduced.
- When a new period begins, a new state tree is initialized and used onwards.
- Newer trees always take precedence in information.
- Only the two most recent trees can be modified, by creating copies into the new tree that supersede the old copies.
- Full nodes only are expected to hold the latest 2 trees, readable without using witnesses.
- For reading past data, a witness/proof constructed to proof past state/tree data (<1mb proof, utilizing verkle tries
The other alternative proposed, state rent, is similar to a CDN model where it would require a continuous payment to maintain a piece of state in memory for a certain period of time. While an interesting approach, it carries certain complexities described in the latter sections of this article:
- Would eventually be replaced by weak statelessness
- Introduces a UX hurdle in rent handling
Side note: The fact that state rent is similar to a CDN model is not lost on us. We are excited to explore how Fleek Network could potentially help other protocols keep state hot 🔥
How Fleek Network’s Statelessness Works
In the case of Fleek Network, statelessness means something very different. It means not having any execution state by default. The execution of services on the network by nodes is stateless, while the network just keeps very limited state focused on:
- I. Token Balances (FLK token and stablecoins),
- II. Staking information
- III. Node Reputation
- IV. Data on how much work a node has performed in a given epoch.
Nodes perform work/execution off-chain and just periodically submit batches of successful delivery acknowledgment proofs to the network in order to get paid. Doing this keeps the overall network extremely light.
It’s important to clarify that while the core protocol is stateless, developers can still have state at the service level by relying on external data availability/storage layers or building state into their service (similar to the state rent concept from Ethereum mentioned in the previous section).
If interested, you can follow the implementation of the above and provide feedback on Fleek Network’s Github.
How Fleek Network Could Potentially Help Protocols Embrace a Stateless Future
At a basic level - by Fleek Network itself offering stateless execution, any protocol, middleware, or app that builds and/or utilizes services on Fleek Network will inherit the same benefits that statelessness provides to Fleek Network itself (lower latency, lower cost, edge-optimized, etc.).
At an advanced level - as mentioned above in the Ethereum section, we might be able to help different protocols keep state ‘hot’ in a trustless, verifiable, and cost-effective way. Similar to how a CDN/Edge keeps files and data hot/cached in different geographic regions to serve it performantly, the same could apply to state. You could essentially treat the protocols (Ethereum, DA layers, storage layers, rollups, etc.) as the state origins/storage layer, and Fleek Network as the hot state/cdn/edge layer.
Statelessness is an emerging trend that is certainly worth keeping an eye on. Ethereum is embracing it, and so is Fleek Network as well as a growing list of other protocols. However the definition of statelessness is not uniform, and it is being applied in many different ways (blockchain state, execution state, etc.) When it comes to scaling state/combating state bloat, statelessness very well could become the best long-term solution that has the biggest impact on mitigating the issue. As we continue to build out Fleek Network, we’ll keep discussions and research open to help keep pushing this trend and blockchain scalability forward.
If you have thoughts, feedback, or further research to share that can expand, improve or challenge our current approach - feel free to reach out, we’d love to chat and jam on this topic. Find us on Discord and spark a conversation!
Fleek Network team ⚡
Find us on Twitter
Join our Discord