Overlap advice transforms with delta planning - #353
Conversation
|
Note Complete: Audit complete. V12 did not find any issues that need review. Open the full results here. Analyzed one file, diff |
d9c5ffb to
d9d4c70
Compare
dae7350 to
6f40009
Compare
6f40009 to
0dd71ab
Compare
eda68c8 to
2a06abe
Compare
|
Benchmark update after remeasuring #353 on the current #328 stack. The implementation originally posted here (v1) started advice transforms The replacement v2 performs the exact count synchronously, then overlaps all
Negative is faster. These are real post-NU6.3 two-action proofs with two real
All eight Because #405 subsequently changed runtime field doubling on Apple AArch64, we
Exact-current topology is Two nearby designs were rejected:
The same-binary source topology was main The four-block benchmark was frozen at Artifacts:
The final fallback gate forces the density gate to pass and the prepared-work
Both order strata favored v2 in every forced contrast. M4 Forced-fallback provenance: diagnostic bundle The replacement adds no public, Current heads |
Stacked on #328.
What changed
#328 finds useful advice-reference deltas before starting advice transforms.
This PR splits that planning boundary for eligible prepared
k = 11,multi-circuit proofs built with
multicoreand withoutorbits:join arm performs the serial prepared-work check, materializes accepted
deltas, evaluates the commitments, reconstructs reused commitments, and
normalizes the results.
This ordering is intentional. The exact count is memory-bandwidth-heavy and
regressed when run alongside the transforms, while the remaining commitment
arm is long enough to give the transforms a useful head start.
If the exact count rejects every circuit, the code retains #328's per-circuit
direct-commitment/transform schedule without rescanning. If a later
prepared-work check rejects every candidate, the transform arm is already
running and the commitment arm evaluates the direct commitments. Ineligible,
empty, singleton, unprepared,
orbits, non-multicore, and pools below eightworkers retain the existing schedule.
Proof format, RNG consumption, transcript order, synthesis failure order, and
the advice polynomials used for openings are unchanged.
End-to-end Ironwood results
Negative is faster. These are real post-NU6.3 two-action proofs with two real
spends. All modes were selected inside one diagnostic binary per host:
M: main-equivalent nested direct commitments;S: Reuse advice commitments for sparse witness deltas #328, including its serial count, work check, and delta materialization;O: this PR's v2 schedule.S/MO/SS/MO/SEvery
O/Sblock favors v2 on both hosts. With only four block effects, theconventional Student-t intervals are also useful context: Apple
[-0.634989%, -0.192674%]; Linux[-1.678228%, +0.011831%].These four-block rows were frozen at main
42f5dd4e. #405 subsequentlychanged runtime field doubling on Apple AArch64 and can change the contention
balance, so the exact current
4d14a1d1stack was confirmed in a freshsame-binary run. Linux was extended without rebuilding to four blocks after
its initial
S/Mpair was mixed; M4 retained two blocks:S/MO/SS/MO/SExact-current topology is main
4d14a1d1, #3280dd71aba, this PR2a06abe3, and diagnostic32ef6b23. Bundle/runner/analyzer SHA-256 values are3e2e97484837b4213d0e2b185173fa9dfbf3db8145db84f23bc74b9d364d1f23,49b36a359d8e126a3fc88c45f279652a2db3be3e8304028bbf80067e9eb57365,and
8d12840ada529b1f7771bd6a4a9f44c8f3b6bc882eec69776ebe48f1bc5dc48d.Exact-current result archives are
1018ec9dbdcab55bbfd2e87b7b731d1125b8908cbf0496e9e318b392a4a8b5aaon M4,
ebd168c5208494d5eb00cb3e8d0529d45480e86f448816fda0fd7f9eeb527860for the initial Linux run, and
06200616bfabe664f1d9e761132e9521e2ac0310f3497ffd03f8fb682d378326for its no-rebuild extension. The extension runner and authoritative combined
analyzer are
e04f59fa12b16ac5eff72715192f81dc0d07f9984c4ef8e1a590c5e36fce72f7and
4177be3ce918b15d1254962ee81cb9c7a910bf2d04a357704c49808a43874de9.Proof, route, binary, source, worker-width, and contamination gates all passed.
The Linux extension retained and excluded
landscape-sysinfoandfwupdattempts. M4 retained and excluded two launchd-contaminated attempts.
Alternatives rejected
before the exact full-row count. On the current Reuse advice commitments for sparse witness deltas #328 stack it regressed by
+0.304846% on M4 (four-block bootstrap
[+0.250911%, +0.358810%]) and +0.336362% on Linux(
[+0.143183%, +0.543067%]). All M4 blocks, order strata, and time halvesregressed. This is consistent with count/transform memory-bandwidth
contention.
P) regressed M4 by+0.510413% (
[+0.053792%, +0.969117%]) and was indistinguishable from noiseon Linux at -0.166102% (
[-0.332713%, +0.000788%]). The complete serial gatetakes about 8.9 us, so removing it entirely could save only about 0.013% of
this proof. v2 keeps it serial.
regressed Reuse advice commitments for sparse witness deltas #328 by +0.773703% on M4
(
[+0.766110%, +0.781296%]) and +0.951544% on Linux(
[+0.869076%, +1.034079%]) in two-block screens.Forced fallback gate
The principal remaining scheduling risk was the path where the exact density
count accepts but the prepared-work check rejects. A diagnostic forced that
rejection at both the first and last advice columns and compared #328's nested
direct fallback (
D) with v2's transform/direct-commitment overlap (X).X0/D0X9/D9X0/D0X9/D9Both order strata favored v2 in all four contrasts. M4
X0/D0contains oneslightly positive block and is therefore labeled favorable/noisy; the other
three two-block ranges exclude zero. The forced screen finds no fallback
regression and clears this ship gate.
Benchmark method and integrity
estimate
sum(times) / sum(iters); paired log ratios aggregated by block;1,000,000-draw seeded whole-block bootstrap.
42f5dd4e, Reuse advice commitments for sparse witness deltas #3286f400097, v2343ede91, diagnostic16d5e4a3. One freshly built binary per host selected all modes.M,S,P, andOproofs verified and were byte-identical: 7,264bytes, SHA-256
04d18c448a3fc2497daca547a90ef9a5b6d0bb8a1391e39f55529e1f95a51dc8.Route markers matched the requested mode and the binary hash was unchanged
before and after timing.
accepted blocks reported no thermal or performance warning. Attempts with
geod, an unrelated PR feat(pasta): add an MSM accelerator registry and a Metal GPU backend crate #404 Rust build, Metal activity, or launchd activitywere retained but excluded. Linux accepted blocks had no competing process,
swap-in/out, or steal activity; its swap snapshot was unchanged.
ae596cdaa133cab426d93f6fc3082a7ab291888178751381d3cb75131e9bb51c.b342f21d1b4c541e6defad72a4f4030cb0395d477f9e965570dcd28c3c504a19;Linux
d39d814edf5f8378fb53d93531303c8f6309a782bfd90155fbb29193d8b4337a.71adea154d543bdf6d68bdfaddb185bfbeda418daf5a12bbcde9bde585751359;Linux
17bdc6817eb6f4e87b7e26c4de0d848efe79387231132c609515b012824a84e1.147a0ba5c9a169425e0953e8cab838a6d5366c13a47cc1029c32d8e348500985.a3eb69a6, bundle SHA-25639d5bbdefaec9238d109e0d2ce49cdadd2af7f4aa1f18b11de3c5ea9a8e6a305;Apple/Linux result archives
0dfeb1bc07540fa564e7d32cec72717f2497c4df4fb833412e9ceea21894b9d3and
797c44ab7d8db42e0b464886cd136d41f2a8c5c8bcdff8d8b50a4de37101e026;runner/analyzer
c7e228ec7226534c6438431e342230d8b173f7de355576b06dbae3810ee9242eand
11078b0734a26314f25cbba973b7f1b01a19c7fced9b0e93d2581ab956dc9ad0.Between the frozen denominator and current main, #403 widens the AArch64
add/sub assembly cfg. It is target-equivalent on the two measured hosts. #405
routes runtime field doubling through that assembly on Apple and changes
explicit Sinsemilla trait-dispatch call sites; this is why the exact-current
confirmation above is required. The current restack (
0dd71abafor #328 and2a06abe3for this PR) preserves both patches exactly by range-diff and patchID.
Validation, risks, and API surface
The principal risk is Rayon/cache/memory-bandwidth contention between advice
transforms and the commitment arm. v1, v3, and
Pshow that nearby schedulescan lose substantially. The exact v2 schedule is therefore intentional, and
the forced work-reject rows above validate its remaining direct-fallback case.
Pools below eight workers and paths outside the narrow prepared configuration
do not use the overlap.
The exact current-main restack passes the full Halo2 suites: 238 default, 191
no-default, and 199
batch,orbitstests. The five focused advice-delta tests,two Pasta multicore scalar-work tests, and 170-test Orchard library suite also
pass (with 3 Orchard tests ignored), as do formatting and
git diff --check.#328 is clean and mergeable with all 65 GitHub checks green. This stacked PR
is clean and mergeable; its two security checks are green.
This PR adds no public,
pub(crate), orpub(super)API, changes no functionsignature or visibility, and adds no new witness-dependent routing decision.
#328 documents the existing variable-time advice-similarity route; this PR
only changes when already-required work runs.