Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State transition function snarkification #13

Open
2 tasks
unnawut opened this issue Dec 10, 2024 · 4 comments
Open
2 tasks

State transition function snarkification #13

unnawut opened this issue Dec 10, 2024 · 4 comments
Assignees
Labels
p0 Highest priority ZK Proving
Milestone

Comments

@unnawut
Copy link
Contributor

unnawut commented Dec 10, 2024

This is the overarching pm issue to track the efforts to prototype the CL's STF (state transition function) snarkification using different ZK architectures.

Scope of work

  1. Get current beacon state from testnet (or ephemery)
  2. Snarkify block and slot processing
  3. See the result (state root i guess?)

Additional: Justin mentioned preliminary work with hints could also be beneficial.

Targets

References

@unnawut unnawut added this to the v0.1.0 milestone Dec 10, 2024
@unnawut unnawut moved this to Todo in Ream Client Dec 10, 2024
@KolbyML
Copy link
Contributor

KolbyML commented Dec 10, 2024

https://github.com/ReamLabs/ream/tree/master/crates/runtime

The zkVM's and abstraction should go in this area, we can make new crates likely within the runtime folder ad hoc.

I think it makes sense to support powdr and sp1 possing making an abstraction so we can choose which one we want to use. We can start with one zkVM starting out, then add support for another after.

@KolbyML KolbyML moved this from Todo to In Progress in Ream Client Dec 11, 2024
@pmuens pmuens self-assigned this Jan 6, 2025
@pmuens
Copy link

pmuens commented Jan 6, 2025

As we discussed in our call today I'll be looking into Powdr as @syjn99 is already working on an SP1 PoC and @unnawut is working on one in RiscZero.

@unnawut
Copy link
Contributor Author

unnawut commented Jan 24, 2025

Just noting down for later recalls:

While today generating a proof for an Ethereum block takes many minutes or hours, we know that there is no theoretical reason preventing massive parallelization: we can always put together enough GPUs to separately prove different parts of a block execution, and then use recursive SNARKs to put the proofs together. Additionally, hardware acceleration through FPGAs and ASICs could help optimize proving further. However, actually getting to this point is a significant engineering challenge that should not be underestimated. - https://notes.ethereum.org/@vbuterin/enshrined_zk_evm

Once sufficiently advanced enough we should look into how the proving work can be parallelized.

@unnawut unnawut added ZK Proving p0 Highest priority and removed enhancement labels Jan 31, 2025
@unnawut
Copy link
Contributor Author

unnawut commented Feb 10, 2025

Some notes from Justin:

Loading the full state is suboptimal. State reads and write are better to be done statelessly

no need to commit to the whole beacon state (except maybe once at genesis)

First load the state root. Then:

  • for reads: load the Merkle path from the leaf being read and authenticate the Merkle path to the state root
  • for writes: first read, then update the value, then remerkleise the Merkle path to get a new state root

Some SSZ libraries should have all this implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p0 Highest priority ZK Proving
Projects
Status: In Progress
Development

No branches or pull requests

4 participants