Epoch Stake Root Sysvar #368
Replies: 3 comments
-
|
I'm conceptually in favor of this idea. I'd like someone who has been thinking about the future of the epoch stakes cache and the implementation of the finalized epoch stake state mentioned in the post to weigh in. It would also be great for any Alpenglow folks to weigh in as well. From my understanding, it seems like the validator set growth is expected to slow with the activation of Alpenglow, so that would help protect the Merkle tree implementation a bit from getting too slow. It's also probably good to include a minimum stake requirement for inclusion in the root, if this isn't already going to be part of Alpenglow. I'm curious about the light client implementation, though. Is the idea to build some kind of relayer that runs on the validators, or can subscribe to account updates for changes in stake, and then serve validator stake for proof generation? |
Beta Was this translation helpful? Give feedback.
-
|
Similar question as Joe. It'd be good to know how this is positioned to be used in the actual light client. It's unclear to me how (validator, stake) leads to tx inclusion verification. Is the light client relying on some subset of the validator set as guardians and this sysvar assures their trustwrothiness? Have you done any benchmarks on the perf impact? I know Alessandro and a few others have been tackling the slot rollover inefficiencies. |
Beta Was this translation helpful? Give feedback.
-
|
@buffalojoec Minimal stake makes a lot of sense to me. We collect a chain of bank hashes and its components from the previous proof (or first checkpoint) and than the prover enforces constraints like:
One important clarification: the current prover doesn’t provide transaction inclusion proofs. It only verifies account state when changes occur. That’s usually sufficient for our need because state changes can be trivially induced (e.g. by sending 1 lamport to a monitored account), but it doesn’t extend to proving arbitrary tx inclusion at this stage. So the ESR’s role here is pretty straightforward: it defines the validator set and stakes that the prover must check votes against. Once that’s locked in at the epoch boundary, the prover can verify continuity and supermajority stake without replaying stake-account logic. The main value of ESR in this context is giving light clients and zk proofs a compact, verifiable foundation for validator set continuity between epochs — which is otherwise the biggest bottleneck in keeping these systems trust-minimized. Currently to calculate ESR we have to either trust the RPC or monitor thousands (if not millions as of recently jaja) of accounts (for the mainnet). Sysvar described would make a lot of difference for us and those who'll follow. If generally supported, I'll come up with an implementation along with the benchmarks. I believe nodes would be just fine creating the root each couple days. Would love to hear from the Alpenglow folks as well though. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Idea: Epoch Stake Root (ESR) Sysvar
We propose introducing a new system variable, Epoch Stake Root (ESR).
This sysvar would store a Merkle root commitment to the validator set and stake distribution of the next epoch.
Motivation
The primary goal is to support light clients with a secure and efficient way to track validator set transitions.
Today, light clients face a fundamental challenge when crossing epoch boundaries:
N+1, a client must:N.The ESR solves this by collapsing all that complexity into a single, 32-byte on-chain commitment.
How It Works
Runtime calculation
Merkleization
(validator_pubkey, stake)pairs.Verification flow
N → N+1.Properties
Data Availability
Frequency
Performance
Benefits
Trust-minimized light clients
Compact verification
Ecosystem impact
Beta Was this translation helpful? Give feedback.
All reactions