Repository navigation
Conversation
every equation of the fresh opening check is linear in the opening and its root, so the server now checks eight random weighted sums of the whole canonical set instead of running the ring arithmetic per client; position, shape and norm bounds stay per client. a bad opening passes a combination with probability at most 2^-15, so eight leave 2^-120. a failing batch falls back to the per-client check, which still names the culprit.
the fold over openings read each opening once per combination and gave every rayon split its own multi-megabyte zeroed accumulator to merge, which made the 16-thread server round slower than before. each polynomial slot is now accumulated on its own across all openings and combinations, so an opening is read once and nothing is merged. the infinity-norm checks are written as full reductions so they vectorise.
the auto-vectoriser only reaches sse2 on the baseline target, so the weighted accumulation and the infinity-norm checks now dispatch to avx2 at runtime like the other kernels in this module.
f7dc604 to
1643783
Compare
|
Thanks, this looks good at least as far as I can verify. I did not check the actual code in detail, but Claude tells me it matches the intent. Someone else should verify that. Some comments from the paper side:
|
… nine combinations the weight range [1, 2^15) is only sound while it sits below both q_cs and q_hvc, so a compile-time assertion now pins that instead of the bound living as a literal. nine combinations give 2^-135, past the 128-bit target that eight fell short of.
Summary
Every equation in the fresh opening check is linear in the opening (BDLOP relation, digit decomposition, leaf hash, Merkle path), so the server now checks 9 random weighted sums of all openings in the inbox instead of each one individually. Per client it still runs only the cheap shape and norm gate. A bad opening survives one combination with probability at most 2^-15, so 9 combinations leave 2^-135, past the 128-bit target; if the batch fails, the server falls back to per-client
verify_freshto name the culprit.Server round time, single thread, 16 servers, mse payload:
Needs a security read as well as a perf one: the combination count is
BATCH_COMBOSinserver.rs, weights come from a ChaCha generator seeded from the OS. The weight range[1, 2^15)isBATCH_WEIGHT_BOUNDincs.rs, with a compile-time assertion that it sits below bothq_csandq_hvc, which the soundness argument needs.Stacked on #18 (the profile harness fix).
Commits
server: verify the round's openings as random linear combinationscs: accumulate the batch slot by slot and vectorise the norm gatecs: avx2 kernels for the batch accumulation and the norm gate(auto-vectorisation only gives SSE2 on baseline x86-64)cs: name the batch weight bound, assert it against both moduli, check nine combinations(review items 2 and 3; item 4 waits on Openings carry the share, which the verifier can compute itself #22)Testing
cargo testpasses, including a new test that tampers each part of one member and checks the batch rejects it, and one that checks the AVX2 kernels against the scalar versions.