v0.14.11
·
57 commits
to main
since this release
Fixes
- [FIX][web]
JsAccountUpdate/JsStorageMapEntry/JsStorageSlot/JsVaultAssetno longer crash under Next.js 16.2 dev-mode console patches. These four wasm-bindgen structs were declared with#[wasm_bindgen(inspectable)], which made the JS bridge auto-emit atoJSON()method that reads everypubfield through a WASM round-trip (wasm.__wbg_get_<class>_<field>(this.__wbg_ptr)). Next.js 16.2's dev-modeclientFileLogger.logpath runs every non-primitiveconsole.*argument throughsafe-stable-stringify, which invokestoJSON()automatically — firing 11 WASM getter calls perconsole.log(update). If the underlying pointer had been freed or another WASM call was in flight, the resulting"null pointer passed to rust"trap propagated out of the user'sconsole.logcall site and crashed the caller (originally surfaced by the Lumina team). Droppinginspectableon these four structs (none of the otherinspectableusages in the SDK have public fields, so they were never affected) skips the auto-generatedtoJSON();JSON.stringifyandsafe-stable-stringifynow fall back to{}(the wasm-bindgen wrapper has no own enumerable data — it's all behind the__wbg_ptr). Field access via the named getters is unchanged. Fixesmiden-client#2183. - [FIX][web] Fixed
_withInnerWebClientre-entrant deadlock. Calling any proxied async wasm method on theinnerclient inside the callback —inner.getInputNote(...),inner.executeTransaction(...),inner.submitProvenTransaction(...),inner.applyTransaction(...), etc. — enqueued onto the same_serializeWasmCallchain that_withInnerWebClientitself had already claimed for the callback, so the inner call would wait for the outer to settle while the outer awaited the inner — classic re-entrant-lock deadlock with no timeout._serializeWasmCallnow runs its callback inline when_withInnerLockDepth > 0(set/cleared by_withInnerWebClientaroundawait fn(inner)), so inner calls "borrow" the already-held chain slot instead of trying to re-acquire it; external callers still queue behind the outer slot. This was the load-bearing bug behind the Miden Wallet'sproveLocallyViaOffscreenconsume path hanging indefinitely with local proving enabled on Chrome MV3 (generateTransaction:consumereached "acquired tx lock; calling midenClient dispatch" then never logged another marker), which surfaced to users as a "cannot reach the miden node" connectivity banner via downstreamwithWasmClientLocktimeouts in the SW'sSyncManager. SAFETY CONTRACT: re-entrancy assumes the caller holds an external mutex preventing concurrent access via other code paths duringfn— the wallet's ownwithWasmClientLockdiscipline satisfies this. See the docstring on_withInnerWebClientfor details.