feat: make sqlite the path of least resistance backend option for PXE and wallet#24179
Merged
mverzilli merged 13 commits intoJun 29, 2026
Conversation
…OPFS The browser PXE data store and the embedded wallet store now persist to SQLite-OPFS (unencrypted) instead of IndexedDB, via the new @aztec/kv-store/browser entrypoint. Apply the node-polyfill shim fix to the playground's worker bundle so the SQLite-OPFS worker resolves under Vite.
… its export The IndexedDB backend now lives at @aztec/kv-store/deprecated/indexeddb (was @aztec/kv-store/indexeddb, now removed) and its exports are marked @deprecated. New browser code should use @aztec/kv-store/browser (SQLite-OPFS).
The /browser entrypoint is a pure re-export of sqlite-opfs; its behavior is already covered by the sqlite-opfs suite and the build enforces that the re-exported names exist (consumers import them). The smoke test added no unique coverage.
bootstrap.sh's test_cmds still pointed at src/indexeddb/*.test.ts after the backend moved to src/deprecated/indexeddb/. That glob matched nothing and the node-test loop excludes any indexeddb/ dir, so the IndexedDB browser suite was silently dropped from CI. Point the browser-test loop at the new location.
…missed consumer, docs) Making SQLite-OPFS the default browser KV-store backend pulls its WASM Web Worker into every vite bundle that builds the wallet/PXE SDK. Vite bundles workers in a separate Rollup pass that does not inherit the main `plugins`, so the node-polyfill shim must be repeated under `worker.plugins`. Apply it to the docs webapp-tutorial example and the vite box (the playground already had it). Also: - repoint the playground NetworkSelector store from the removed `@aztec/kv-store/indexeddb` path to `@aztec/kv-store/browser`. - fix the now-stale `@aztec/kv-store/indexeddb` reference in the wallet-sdk README and mention the `@aztec/kv-store/browser` alias. - add "OPFS" to the docs cspell dictionary and document the vite worker requirement in the migration notes.
…FS worker bundles config-free The bundler-friendly sqlite3mc build feature-detects Node via a bare `process` global. vite-plugin-node-polyfills (@rollup/plugin-inject) rewrites that bare identifier to a shim import that Vite's separate Web Worker rollup pass cannot resolve, breaking every downstream vite build that bundles the OPFS worker. Patch the vendored bundle at vendor time, rewriting `process` to the member access `globalThis.process`. This is semantically identical (the `typeof` short-circuits before any property access) but invisible to @rollup/plugin-inject, so no shim is injected. The patch is guarded so a future upstream change to the detection line fails the vendor step loudly, and SHA256SUMS is regenerated to cover it. With this, SQLite-OPFS bundles cleanly with no per-consumer worker config, so the worker workarounds for the playground, docs webapp-tutorial, and vite box are removed along with the migration note's bundler caveat.
8faffe9 to
57f3e7f
Compare
Collaborator
Flakey Tests🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
nchamo
reviewed
Jun 29, 2026
|
|
||
| ## TBD | ||
|
|
||
| ### [PXE] Browser KV-store default is now SQLite-OPFS; the IndexedDB entrypoint moved and will be deprecated |
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Jun 29, 2026
BEGIN_COMMIT_OVERRIDE fix(aztec-nr): Prevent handshake nullifier griefing and nullifier sequence tests (#24258) feat(aztec-nr): derive message tag from a resolved secret source (#24312) feat(keys)!: add derivation for message-signing and fallback keys (#24348) feat: make sqlite the path of least resistance backend option for PXE and wallet (#24179) END_COMMIT_OVERRIDE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes F-716