Skip to content

Rebase Vite/Vitest tooling onto MSM stack (build/test only, no threadman rewrite)#186

Open
OBrezhniev wants to merge 3 commits into
feature/msm-signed-bucketsfrom
feature/esm-tooling
Open

Rebase Vite/Vitest tooling onto MSM stack (build/test only, no threadman rewrite)#186
OBrezhniev wants to merge 3 commits into
feature/msm-signed-bucketsfrom
feature/esm-tooling

Conversation

@OBrezhniev

Copy link
Copy Markdown
Member

Rebase tooling migration onto our MSM stack — build/test ONLY (Vite + Vitest)

Applies the feat/esm-migration build and test tooling on top of our
feature/msm-signed-buckets work. Target: feat/esm-migration.

Deliberately does NOT port the workerpool/threadman rewrite. Our
threadman.js (WorkerSlot + 2-phase termination) and threadman_thread.js
(batch-affine MSM second-module INIT wiring: f1m/g1m + f2m/g2m + f_conj,
GLV/GLS entry binding, Batch(NoGls|NoGlv)? fallback) plus the web-worker
dependency are kept as-is — that path carries the MSM acceleration.

  • Rollup → Vite, Mocha/Chai → Vitest, flat eslint.config.js, CI.
  • The Vite browser build reproduces the old rollup config exactly: bakes the
    worker thread function in as a string literal (so bundlers / monkey-patching
    frameworks can't mangle it), strips the node-only web-worker import, and
    keeps wasmbuilder/wasmcurves external (lazy).
  • Tests converted in place (chai→vitest imports, before/afterbeforeAll/afterAll,
    mocha timeout API → global testTimeout), preserving our GLV/GLS/batching/
    chunked-reader coverage and the SES lockdown harness (run as a child process).
  • Keeps our wasmcurves git+https pin + audit overrides.

Not included: a browser Vitest project — it needs the threadman platform
split from this stack, which we intentionally didn't take. The browser build
is produced and verified.

Validation: node main.cjs + browser ESM verified; 67 tests pass incl. SES.

Rollup -> Vite, Mocha/Chai -> Vitest, flat eslint.config.js, CI workflow.
Deliberately does NOT adopt the feat/esm-migration workerpool/threadman
rewrite: our WorkerSlot threadman + batch-affine MSM module wiring in
threadman.js/threadman_thread.js and the web-worker dependency are kept
as-is. The Vite browser build reproduces the old rollup config exactly:
bakes the worker thread function in as a string literal, strips the
node-only web-worker import, and keeps wasmbuilder/wasmcurves external
(lazy). Tests converted in place (chai->vitest imports, before/after->
beforeAll/afterAll, mocha timeout API dropped for the global testTimeout),
preserving our GLV/GLS/batching/chunked-reader coverage and the SES
lockdown harness (run as a child process). Node build.cjs + browser ESM
verified; 67 tests pass incl. SES.

Browser Vitest project is intentionally omitted: it needs the threadman
platform split from feat/esm-migration, which is out of scope here.
@OBrezhniev

Copy link
Copy Markdown
Member Author

ESM-rebase set — the tooling migration re-applied on top of our optimization stack (rather than replaying the branches), so the MSM/CIOS/memory work is preserved. Review together:

Deviations from feat/esm-migration are called out in each PR body (e.g. binfileutils MAX_BUFFER_SIZE, snarkjs IIFE/bfj, mnt6753 excluded, smart_contracts test deferred). All branches keep git+https commit-ref pins; re-pin if a branch moves.

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.

1 participant