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
Test harness: compact-end-2-end events suite; host clock NTP-synced.
Steps to Reproduce
Point the compact-end-2-end events suite at devnet (--network devnet).
Run events-demo-emit repeatedly (deploy + circuit-call emit).
Observe intermittent failures at the emit submission with Custom error 171.
(Observed 3 failures across 6 runs, mixed 170/171.)
Expected Result
A freshly built, legitimately-timed transaction is accepted under normal
devnet block cadence.
Actual Result
Rejected with Custom error: 171 (OutOfDustValidityWindow) intermittently.
Impact
Blocks ~1/3 of emit transactions on devnet; non-deterministic.
Undermines e2e testing reliability on shared deployed environments.
No client-side workaround beyond retrying.
How Reproducible
Intermittent — correlated with devnet block-production lag at submit time.
Additional Context
Root cause (from source, version-matched): the dust well-formedness check
(ledger dust.rs:815) rejects when ctime > tblock with no tolerance.
The client stamps ctime = wallet wall-clock "now" (WASM ctime: &Date → date.get_time()/1000). During txpool validation the node computes tblock = last_block_time + slot_duration + slot_duration·MaxSkippedSlots
(pallets/midnight/src/lib.rs:446-459), which with SLOT_DURATION=6s and MaxSkippedSlots=1 is only +12s. If the chain tip lags the client clock
by more than 12s, ctime > tblock → 171.
Hypothesis: the +12s simulation margin (1 slot + 1 skipped slot) is too
tight for real deployed-network conditions (>1 skipped slot / production lag /
minor clock skew). Options to evaluate: raise MaxSkippedSlots / the
simulation margin, apply the existing 30s tblock_err drift to the dust
check, or have the wallet SDK stamp ctime from a chain-referenced time
rather than local now.
Timezone ruled out: Timestamp is u64 epoch seconds; Date.getTime() is UTC.
Symptoms
1010: Invalid Transaction: Custom error: 171(OutOfDustValidityWindow).the transaction never enters a block.
Environment
wallet-sdk 4.0.0-beta.2 / 5.0.0-beta.2, midnight-js 5.0.0-beta.4
Steps to Reproduce
--network devnet).events-demo-emitrepeatedly (deploy + circuit-call emit).(Observed 3 failures across 6 runs, mixed 170/171.)
Expected Result
devnet block cadence.
Actual Result
Custom error: 171(OutOfDustValidityWindow) intermittently.Impact
How Reproducible
Additional Context
(
ledger dust.rs:815) rejects whenctime > tblockwith no tolerance.The client stamps
ctime= wallet wall-clock "now" (WASMctime: &Date→date.get_time()/1000). During txpool validation the node computestblock = last_block_time + slot_duration + slot_duration·MaxSkippedSlots(
pallets/midnight/src/lib.rs:446-459), which withSLOT_DURATION=6sandMaxSkippedSlots=1is only +12s. If the chain tip lags the client clockby more than 12s,
ctime > tblock→ 171.tight for real deployed-network conditions (>1 skipped slot / production lag /
minor clock skew). Options to evaluate: raise
MaxSkippedSlots/ thesimulation margin, apply the existing 30s
tblock_errdrift to the dustcheck, or have the wallet SDK stamp
ctimefrom a chain-referenced timerather than local now.
Timestampis u64 epoch seconds;Date.getTime()is UTC.