ZK WASM Meetup, September 2023
Index document
Timeline - 6-8 September 2023
Goal: Knowledge sharing, supporting ZK WASM work
Agenda
September 6
-
Presentation: (1h) Andrei presents WASM and NEAR Contract Runtime
-
Brainstorming: (2h) Andrei and Bowen: Can we make proving fast enough to be usable in NEAR?
- How can we optimize for latency?
- How can we aggregate proofs?
- What can we do with “Compiler JIT bombs”
-
Presentation: (1h) Polygon team: Walk through Polygon Hermez architecture
- From moment user submits transaction till transaction is included onchain
- How long does aggregation take now?
- Can we use tree structure vs linear structure?
-
14:00 - 15:00 Polygon folks on an internal meeting
September 7
- Presentation: (1h) Jordi presents PIL2/Future of Proving/Plonky3?
- Anything that will change for users of PIL/ZK ASM?
- Hector: More recent developments in ZK (e.g. Lasso, Jolt), main ideas in Plonky 3
- E.g. if we want to prove 1000 consecutive blocks or 1000 transactions
- Pair-programming: (2h) Andrei + Polygon, Setup development environment together
- Go through Polygon Hermez repositories and understand their purpose
- Set up tools for benchmarking and profiling proofs
- Writing ZK ASM test suite with inputs
- Tech setup from Andrei
- WASM toolkit setup
- Cranelift -> ZK ASM compiler from Andrei
- Run the production prover (Try AWS instance?)
- Pair-programming: (2h) Felicia: Modifying the PIL and Processor
- CALL and RETURN using the stack
- Adding a new circuit for hash function like SHA256
- Switch from 256 bit to 64 bit machine
- Adding a new register
September 8
- Brainstorming: (2h) Bowen facilitates: "How we collaborate going forward?"
- The focus of NEAR and Polygon team
- Shared goals for a quarter
- Code contributions
- Other VM types, e.g. Miden: https://github.com/0xPolygonMiden/miden-vm
- Is this something we should look at for ZK WASM?
Notes
- Performance of 64 bit processor is 3 times faster, without storage and POSEIDON
Proof (2**23 / 4) in 30s
70k instructions per second
In a big machine
Read hardware 10M instructions per second