You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
preprod's dust history is a ~1M-event global stream that every client
replays on sync. Deploying any contract there failed before a tx was
ever built: the dust wallet OOMed mid-replay, and once that was worked
around the sync gate never completed. Both trace to the pre-fix
wallet-sdk-dust-wallet@4.0.0 pin (midnightntwrk/midnight-wallet#425).
* wallet/handler: set batchUpdates = { size: 5000, timeout: 1,
spacing: 4 } on the shared wallet config so the fresh-sync and the
cache-restore paths (shielded + dust alike) stream the replay in
larger chunks instead of exhausting the V8 heap at the SDK default
batch size of 10.
* deployer: replace the strict FacadeState.isSynced tip gate with
isCompleteWithin(50) on each sub-wallet. On a live chain the dust
stream advances continuously, so strict completion never fires and
the gate timed out on a fully usable wallet. The gate still waits on
all three sub-wallets to avoid the custom-error-170 regression.
* cli + README: document the NODE_OPTIONS max-old-space-size bump
still useful for a first preprod sync, plus the tolerant tip gate.
Verified on preprod: ShieldedFungibleToken dry-run synced to tip in
~1m12s from a warm cache (dust ~1.08M events, no OOM) and the gate
completed even though dust never reached strict completion.
Closes#115
-**Bump Node heap** for long-history chains: `NODE_OPTIONS="--max-old-space-size=8192"`.
48
+
-**Tip gate is tolerant**: sync completes once every sub-wallet is within 50 events of the tip, not at an exact gap of 0. On a live network the global dust stream advances continuously, so an exact-match gate would never fire.
48
49
-**Seed source**: `--seed-file`, `MN_DEPLOYER_SEED`, or `[wallet].keystore`. The `wallet = { source = "local" }` shorthand is dev-preset only.
4.**Dust fee overhead default breaks faucet wallets.** testkit-js default `additionalFeeOverhead` is `5e20` vs a faucet wallet's `~3e15` dust → `Insufficient Funds: could not balance dust`. Deployer overrides to `5e14` for non-mainnet. Library users constructing their own provider must mirror this.
155
156
156
-
5.**Long-history dust sync exhausts default Node heap.**Use `NODE_OPTIONS="--max-old-space-size=16384"` for the first sync. Cache fixes subsequent runs.
157
+
5.**Long-history dust sync exhausts default Node heap.**The deployer now raises the dust/shielded sync batch size (`batchUpdates = { size: 5000, … }`) so the replay no longer OOMs mid-stream on `wallet-sdk-dust-wallet@4.0.0` ([midnightntwrk/midnight-wallet#425](https://github.com/midnightntwrk/midnight-wallet/issues/425)). The restored dust tree plus shielded trial-decryption can still spike past V8's ~2 GB default old-space on a first preprod sync, so set `NODE_OPTIONS="--max-old-space-size=8192"` for that run. Cache fixes subsequent runs.
0 commit comments