there's been a lot of development on state size mgmt in Ethereum.

it doesn't get a ton of attention, but it's
a vital problem to solve for mass adoption (thinking 10 years, 1B users forward)

in the following thread, I'll unpack the problem and current solution space
first, what's the problem?

the Ethereum 'state' consists of all of the data necessary to process a new transaction. you can think of it
as the application state of all smart contracts and all account balances

each node needs to store this data to verify the chain
as NFTs and DeFi explode, the size of this data is growing at an increasingly rapid pace:

etherscan.io/chartsync/chai…

if this continues, it'll become unfeasible for most to participate in verifying the network. this isn't the
decentralized future we want!
the key insight that motivates solutions to the problem is that ethereum doesn't charge users of its
storage 'rent'.

it only charges them once
storage on ethereum today costs (via gas) one STORE instruction in the evm.

this is economically broken.

it costs nodes an infinite amount to store (assuming ethereum lasts forever), but the user only pays once
there is currently a two-pronged approach to addressing the state problem:
1. state expiry
2. weak statelessness
state expiry is the classic database cache approach socialized

if a piece of state hasn't been touched for some amount of time, nodes don't have to store it anymore. if a user wants to access an old piece of state, he/she must provide a 'witness' or proof that the state is valid
if you squint, this sorta feels like user state rent!

because generating a witness requires the user to store the data they're proving the validity of, the user is now paying the cost of storing this data instead of the node provider
it's an elegant, indirect way to redirect who pays for storage
'regenesis' is a specific variant of this that creates fixed-time windows during which all state in that
window is considered legitimate.

accessing a piece of state generated in window N during window N+1 requires a user to provide a witness
this creates an upper bound on the state size at any point in time! (block gas limit * storage/STORE gas
cost * blocks in period)

stated differently, the sync graph i shared earlier (etherscan.io/chartsync/chai…) will have an upper bound
weak statelessness the 'light client' approach to solving the problem.

in a weakly stateless ethereum, only block producers (miners, validators) need to store all state. for other nodes to verify state they don't store, they need to be provided a witness
for example, to check with a non-producer node that your account's balance has a certain value, you'd have to provide it with the witness for your account's state
you might've realized that this approach feels similar to the state expiry one!

this duality isn't coincidental. weak statelessness is also a road to state rent
in this case, rent is partially paid by block producers (who have to store all state) in addition to users (who have to store state for any witnesses they need to provide)
considering that block producers are the ones 'paid' by the protocol, this feels like it could an economically viable way forward as well
one important piece of new tech here is a data structure called a verkle trie.

these can be used to create small, constant size witnesses. this reduces the 'bandwidth' of the ethereum computer massively relative to log(N) size merkle branch witnesses
for those familiar with kzg commitments and merkle tries, these are basically a trie with a kzg commitment at each node

read more here: notes.ethereum.org/_N1mutVERDKtqG…
so what's the path forward?

there's recently been some soft consensus around pushing towards option 3 here: hackmd.io/@HWeNw8hNRimMm…
this requires working on two pieces of technology in parallel (verkle tries, state expiry), but in the best case, both areas develop fast enough to adopt both in one step
one important note is that the ideas and research here can (and likely will) be transferred to L2.

so they won't get 'dated' as/if value moves up the stack!
interested in following along and/or contributing?

check out the #regenesis, #state-availability, and #witnesses channels in the Eth R&D discord (discord.gg/3cN4zZAU)

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Lakshman Sankar

Lakshman Sankar Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!