Skip to content

Point compression for SRS #1629

Closed
Closed

Description

@ledwards2225

We can halve the size of the SRS download by using the standard point compression technique of storing (x, sign_bit) instead of (x,y). This may have nontrivial decompression costs given the size of our SRS but (a) maybe it's acceptable if we can hide it in some init stage and (b) maybe there's an algorithm where we can speed up decompression by storing "hints" for computing the square roots at the expense of slightly worse compression.

Activity

  1. johnathan79717 commented on Feb 24, 2026

    @johnathan79717

    If this reduces the download time, it might compensate the decompression costs.

  2. johnathan79717 commented on Mar 9, 2026

    @johnathan79717

    WASM decompression benchmark results

    Benchmarked realistic WASM decompression times (single-threaded):

    SRS Size Decompress Time Uncompressed Baseline
    2^17 (128K pts, 4MB) 2.22s 0.05s
    2^18 (256K pts, 8MB) 4.39s 0.08s
    2^19 (512K pts, 16MB) 9.72s 0.15s
    2^20 (1M pts, 32MB) 18.78s 0.31s

    The decompression overhead is too slow for client apps — a browser user on a decent connection downloads 64MB uncompressed in ~2s, but decompressing 32MB of compressed points takes ~19s in WASM. This rules out compressed CRS for browser/WASM use cases.

    We can still evaluate whether this is useful for release image size reduction (native C++ decompression is fast: ~48ms with 32 threads).

    PR: AztecProtocol/aztec-packages#21112

  3. johnathan79717 commented on Mar 10, 2026

    @johnathan79717

    @charlielye Do we think this would be useful just for reducing the size of the release image? Or is that not a concern?

  4. johnathan79717 commented on Mar 16, 2026

    @johnathan79717

    Quoting @alexghr: "on the server side, we need ~2GB of the CRS for proving and provers run 32 core machines. If we could compress the CRS to shave off 1GB from the image size that would be great"

  5. johnathan79717 commented on Mar 25, 2026

    @johnathan79717
  6. johnathan79717 commented on Mar 25, 2026

    @johnathan79717

    Still need AztecProtocol/aztec-packages#22002 to cache decompressed data.

  7. johnathan79717 commented on Mar 26, 2026

    @johnathan79717

    the above is done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions