# Doing Stateless Ethereum Right
We need to change our approach for implementing Stateless Ethereum. At present, the effort is on track to deliver protocol changes that reduce witness sizes. Beyond this, the roadmap is unclear on how we get to the end goal of allowing clients to process blocks in a stateless manner.
I propose a fundamental change in how we deliver on this goal that removes external dependencies and should deliver meaningful changes to the protocol.
## Problems with our current approach
### A: Stateless clients will be of limited use
The current roadmap is focused on delivering stateless block execution by reducing witness size and producing block witnesses. This will require a new gossip network, because a client without the state would be unable to participate in the `ETH` protocol without the state and chain history.
The **only** thing that such a client would be capable of doing would be following the tip of the chain and executing blocks as they arrive, verifying the block state root.
These client would explicitly **not** be able to do any of the following:
- send transactions or participate in transaction gossip
- expose the majority of the JSON-RPC API
This limited client is not useful for the vast majority of the use cases people use clients for, and is probably **only** useful in the context of eth2 infrastructure.
### B: Unlikely to happen until Eth2
Because the current roadmap only allows for [clients with limited usefulness](#A-Stateless-clients-will-be-of-limited-use) and that usefulness is primarily focused on Eth2, it seems unlikely that development will be prioritized until the Eth2 merge is firmly on the horizon.
### C: Status Quo vs Meaningful change
The current roadmap still reenforces the status quo. Interacting with the Ethereum protocol will still require either running a *heavy* client or using a centralized provider.
The current protocols aren't going to deliver functional lightweight clients. The current roadmap is not going to deliver a functional lightweight stateless client. Delivering on functional lightweight clients is a high value goal that we should be putting resources towards. Existing clients should see benefits from this effort as well, such as making it easier to free up disk space used for ancient chain data.
## Expanding the roadmap
I propose that we expand the "Stateless Ethereum" effort to unclude the work necessary to deliver stateless clients that are capable of exposing the JSON-RPC API. This does not change or de-prioritize existing efforts to enable stateless block execution. It is a purely additive change that expands scope to include building the necessary infrastructure to support the desired functionality.
### New Definition of Scope
The scope of "stateless ethereum" would be the following. This list tries to capture the functionality necessary to have a useful client that performs stateless block execution.
- Block execution via witnesses
- Maybe transaction level witnesses
- Solution: Research needed. Maybe access lists in new transaction types
- Maybe block level witnesses
- Solution: Research needed.
- Need witness gossip
- Solution: Binary trie to reduce size
- Solution: Code merklization to reduce size
- Solution: Research needed for gossip mechanism.
- The ability to run a useful client that holds zero state.
- New transaction pool logic to allow transaction validation without the assumption of local state.
- Solution: Research needed. Maybe small account proofs for balance and nonce?
- Access to block gossip without requiring client to hold full state (or chain history)
- Solution: Alternative Gossip Network
- The ability to serve JSON-RPC without the state
- On demand access to the state
- Solution: State network
- On demand access to the chain history
- Solution: Chain history network
### New areas of research focus
The above breaks down into the following areas of research.
- A new gossip network that is conducive to clients participating who do not hold the state or full chain history.
- Transaction gossip without access to the state.
- Witnesses (eventually)
- New blocks
- A way to bridge this new network with the existing `ETH` DevP2P gossip.
- State Network
- On demand access to recent state (~256 blocks)
- Chain History
- On demand access to headers/blocks/receipts
- Canonical Indices
- `block_number -> block_hash`
- `transaction_hash -> (block_hash, transaction_index)`
We should provide funding for researchers interested in dedicating their time towards these topics.
### Dedicated client implementations
The architecture of a stateless client that exposes the JSON-RPC API is going to be fundamentally different from existing client architecture. We should not expect existing client teams to implement this functionality.
We should provide funding for new client teams who wish to build out these new lightweight stateless clients.
### Avenues for Funding
Teams should initially seek funding through the Ethereum Foundation Ecosystem Support Program, aka ESP. If you are interested in working on this effort, you should submit a grant application for funding.
I (piper) will be working to secure longer term funding for teams that secure initial funding through ESP. Specifics will be handled on a case-by-case basis.
We should be focused on delivering functionality on a tight iteration cycle. The development of these new pieces of peer-to-peer infrastructure and clients should be able to move at a quick pace with a tight feedback loop. Rough estimations suggest we should be capable of delivering valuable functionality on a quick timeline (~12 months).
- Establish research teams and client development teams
- Draft specification for state network
- Draft specification for chain history network
- Initial exploratory research into gossip network
- Begin initial client prototypes for both state and chain history networks
- Research complete to prove state network approach is viable
- Research complete to prove chain history network is viable
- Draft specification for gossip network
- Initial testnets for state and chain history networks
- Client prototypes for gossip network
- Prototype for "bridge" from `ETH` DevP2P network
- Research complete to prove gossip network approach is viable
- Stable specification for state network
- Stable specification for chain history network
- Testnet for gossip network
- Stable specification for gossip network
- Clients are able to begin moving from POC/MVP to production focus.
- Launch of longer lived testnets.