Skip to content

carpalsgrabby/rollup_batch_shape_planner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

rollup_batch_shape_planner

A very small CLI helper for sketching how to batch transactions into proofs for rollup-style Web3 systems.

It is conceptually inspired by three directions:

  • Aztec-style zk privacy rollups
  • Zama-style FHE compute rollups
  • Soundness-first rollup research labs

The script is offline only. It does not connect to any blockchain or RPC endpoint and has no external dependencies.

Repository contents

This repository intentionally contains exactly two files:

  • app.py
  • README.md

What the tool does

Given a target number of transactions, a maximum batch size and a number of prover workers, the tool:

  • picks a suggested batch size for the chosen style
  • computes how many batches will be needed
  • distributes batches across prover workers
  • estimates a simple proof tree depth
  • derives a rough latency estimate in milliseconds

The numbers are illustrative only. They are meant to help you reason about batch shapes and aggregation depth for zk, FHE, or soundness-heavy rollups.

Installation

Requirements:

  • Python 3.8 or newer

Setup steps:

  1. Create a new GitHub repository with any name.
  2. Add app.py and this README.md to the root directory.
  3. Ensure the python command is available in your shell.
  4. No extra packages are needed; the script uses only the standard library.

Usage

Run the script from the repository root.

Basic example for an Aztec-style privacy rollup:

python app.py 10000

Plan batches for a Zama-style FHE rollup with smaller maximum batch size:

python app.py 8000 --style zama --max-batch 512 --provers 4

Plan for a soundness-first rollup lab with several prover workers:

python app.py 12000 --style soundness --max-batch 768 --provers 6

Output

The script prints a short summary, for example:

Style : Aztec-style zk privacy rollup (aztec) Note : Encrypted balances and zk circuits; strong privacy, heavier UX.

Transactions : 10000 Max batch size : 1024 Provers : 4

Plan: Recommended batch size : 512 Number of batches : 20 Batches per prover : 5 Proof tree depth : 5 Est. latency : 430.0 ms

You can copy this into a notebook or design document when discussing:

  • batch sizing
  • prover parallelism
  • proof tree depth for zk or FHE systems

Notes

  • All heuristics and numbers are conceptual and can be changed freely.
  • The tool does not understand fees, gas, or real cryptographic curve parameters.
  • You are encouraged to tweak the style profiles in app.py to better match your own Aztec-like, Zama-like, or soundness-first rollup designs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages