Revert NYM mix-fetch to v1 (1.4.4) - #732
Merged
Merged
Conversation
This reverts commit 816be23, returning to @nymproject/mix-fetch 1.4.4 with the pinned gateway and network requester. A controlled A/B against the live mixnet (both stacks in one browser, driven concurrently) shows the v2 stack failing to complete small HTTPS JSON-RPC requests through most exit nodes (internal ~120s timeout on a tunnel that reports ready), while 1.4.4 completes the same requests in 2-3 seconds at the same instant. v2's exit-node auto-discovery also rarely converges, and the upgrade dropped the pins that made node selection deterministic, so wallets with NYM privacy enabled were left unable to sync or send (the 2026-07-15 staging QA report).
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
2 tasks
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
j0ntz
force-pushed
the
jon/revert-nym-mixfetch-v2
branch
from
July 16, 2026 01:16
4eac20b to
062120d
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 062120d. Configure here.
createMixFetch has no internal budget, so a dead or unreachable gateway kept the first mixnet request (and the wallet behind it) waiting indefinitely. Race it against a 60 second bound: a healthy setup with the pinned gateway completes in under 10 seconds measured, and on timeout the abandoned setup is torn down when it eventually settles so it cannot hold a gateway connection nobody will use.
j0ntz
force-pushed
the
jon/revert-nym-mixfetch-v2
branch
from
July 16, 2026 01:23
062120d to
a323e15
Compare
peachbits
approved these changes
Jul 17, 2026
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.

CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Description
Asana task
Reverts the NYM mix-fetch v2 upgrade (#729) back to
@nymproject/mix-fetch1.4.4, and adds a setup timeout on the restored v1 API.
Asana: https://app.asana.com/1/9976422036640/project/1215088146871429/task/1216603961673510
QA report: https://app.asana.com/1/9976422036640/project/1213843652804305/task/1216438166625538
Why
v2 (2.0.0, shipped in 2.47.0) is a comprehensive regression for our workload,
not the timeout mis-port that PR #731 addresses. A controlled A/B against the
live mixnet (both stacks in one browser, driven concurrently in the same
seconds, so network conditions are identical):
ready)operation timed outAcross four distinct pinned exit nodes, no v2 node matched v1's speed or
reliability; most requests failed and the few successes were 6-18x slower.
Tuning (
disablePoissonTraffic,disableCoverTraffic, SURB budgets) did nothelp. So Avalanche and the Cosmos family, which work in ~2s on v1, are broken
on v2, which is the 2026-07-15 staging QA report.
The reproduction harness and full data are attached to the task. The findings
have been sent to the Nym team; if they ship a fixed build we can re-adopt v2.
What this reverts to
1.4.4 with the pinned
preferredGatewayandpreferredNetworkRequester, andv1's
mixFetchOverride.requestTimeoutMs: 300000(the per-request bound v2dropped).
Added on top
initMixFetchnow boundscreateMixFetchat 60s. v1 has no internal setupbudget, so a dead or unreachable gateway would otherwise block the first mixnet
request (and the wallet behind it) indefinitely. A healthy setup with the
pinned gateway completes in under 10s measured. On timeout, the abandoned setup
is torn down when it eventually settles, so it cannot hold a gateway connection
nobody will use, and the late rejection is handled rather than left unhandled.
Relationship to #731
#731 bounds v2's per-request
hang and is correct on its own terms, but it cannot make v2 deliver. This PR is
the actual fix for the QA report. If this lands, #731 can close as superseded.
Verification
verify-repo.shpasses (prepare + eslint + mocha). Driven in-app on the iOSsim with this core embedded: the Avalanche wallet syncs (balance + history) with
NYM privacy on. A successful in-app send could not be captured because the
mixnet itself was not delivering during the run window (the same environmental
flakiness the A/B controls for); the controlled browser A/B is the load-bearing
evidence.
Note
Medium Risk
Changes affect all NYM privacy networking and the RN worker bundle (WASM/workers); behavior is intentionally reverted to v1 but setup timeout and global cleanup add new failure/race paths on first mixnet use.
Overview
Reverts
@nymproject/mix-fetchfrom v2 to v1.4.4 so NYM privacy fetches use the v1 client again (pinned gateway/network requester,mixFetchOverride.requestTimeoutMs,disconnectMixFetch), undoing the 2.47.0 smolmix-tunnel stack that broke wallet sync/send over the mixnet.initMixFetchracescreateMixFetchagainst a 60s setup timeout, clears__mixFetchGlobaland disconnects on failure, and returnsmixFetchModule.mixFetch. Browser and React Nativeprivacy: 'nym'paths passmode: 'unsafe-ignore-cors'andmixFetchOptionsas the third argument.Webpack again enables async WASM and copies mix-fetch
.wasmandweb-worker-*.jsinto the RN bundle assets (v2 had inlined them).Reviewed by Cursor Bugbot for commit a323e15. Bugbot is set up for automated code reviews on this repo. Configure here.