Skip to content

Experimental: reduce prover memory traffic - #271

Closed
jsign wants to merge 1 commit into
leanEthereum:mainfrom
jsign:jsign-exp
Closed

jsign wants to merge 1 commit into
leanEthereum:mainfrom
jsign:jsign-exp

Conversation

@jsign

@jsign jsign commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

The prover writes large temporary buffers and reads them again for sumcheck messages. This change combines those passes to reduce memory traffic.

  • GKR computes the next round message from folded values in a small local buffer.
  • PCS combines overlapping claims in paired lane windows, then computes the first sumcheck message from the complete weights.
  • On eligible x86 targets, large extension NTTs reuse the base-field NTT without a copy. The dedicated NEON and AVX-512 kernels remain in place.

The public API, protocol, security parameters, and transcript order remain unchanged.

The benchmark machine uses an AMD Ryzen 7 3800XT, with 8 physical cores and 16 logical threads. Linux reports 46 GiB of RAM. The release builds used native CPU instructions and the default thread count.

Workload Time before Time after Signatures/s before Signatures/s after
900 XMSS 4.501 s 3.981 s 199.9 226.1
900 XMSS, no cooldown 4.465 s 4.121 s 201.6 218.4
220 SPHINCS 6.360 s 5.429 s 34.6 40.5
Recursion, two children of 900 XMSS each 2.289 s 2.024 s N/A N/A

XMSS throughput increased by 13.1%, or 8.3% with no cooldown. SPHINCS throughput increased by 17.1%. Recursion time decreased by 11.6%.

The results are means after one warmup pass, with profiling disabled. Standard runs used three measured passes and a two-second cooldown. The sustained XMSS run used five measured passes and --cooldown 0. Leaf benchmarks used --log-inv-rate 1. Recursion used --log-inv-rate 2 and excluded leaf proof construction from the measured time.

All 368 tests passed with ZK_ALLOC_POISON=1 cargo testall. This suite includes the Python verifier and recursive aggregation tests. The additional statement and hint tampering tests passed. Clippy, rustdoc, formatting, and type checks for Apple ARM and AVX-512 also passed.

No M4 machine was available for runtime benchmarks. These performance results apply only to the local Ryzen machine.

GKR computes the next round message from folded values in a small local buffer.

PCS combines overlapping claims in paired lane windows, then computes the first sumcheck message from the complete weights.

On eligible x86 targets, large extension NTTs reuse the base-field NTT through a coefficient view that requires no copy.

The public API, protocol, and transcript order remain unchanged.
@jsign
jsign marked this pull request as ready for review September 4, 2026 16:23
@jsign
jsign marked this pull request as draft September 4, 2026 16:23
@TomWambsgans
TomWambsgans marked this pull request as ready for review September 4, 2026 19:36
@TomWambsgans TomWambsgans mentioned this pull request Sep 4, 2026
@TomWambsgans

Copy link
Copy Markdown
Collaborator

merged via #272, thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants