<!-- XE-1786 · `solvePow` with `progressInterval: 0` never returns on the JavaScript PoW path · testnet -->
*Markdown view of <https://bounty.xe.network/XE-1786>. The page is the record; this is the same page for reading.*

XE-1786 · Bounty

# \`solvePow\` with \`progressInterval: 0\` never returns on the JavaScript PoW path

Triaging
claimed Minor
web
filed 2026-11-09 04:06 UTC
by Darkarmy921

Verdict
:   published when the fix ships

Tier
:   published when the fix ships

Claimed
:   Minor

Area
:   SDK / docs / web

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-14 22:57 UTC

Told
:   2026-11-10 14:00 UTC

### Patches

None linked.

### History

- [211841](https://bounty.xe.network/log/211841) 2026-11-14 22:57 UTC proposal.adopted
- [211840](https://bounty.xe.network/log/211840) 2026-11-14 22:57 UTC ticket.award
- [84128](https://bounty.xe.network/log/84128) 2026-11-10 14:00 UTC proposal.adopted
- [84127](https://bounty.xe.network/log/84127) 2026-11-10 14:00 UTC reply.sent
- [83990](https://bounty.xe.network/log/83990) 2026-11-10 14:00 UTC proposal.adopted
- [83989](https://bounty.xe.network/log/83989) 2026-11-10 14:00 UTC ticket.status new → triaging
- [83730](https://bounty.xe.network/log/83730) 2026-11-10 14:00 UTC proposal.adopted
- [83729](https://bounty.xe.network/log/83729) 2026-11-10 14:00 UTC proposal.adopted
- [83728](https://bounty.xe.network/log/83728) 2026-11-10 14:00 UTC ticket.facts
- [83727](https://bounty.xe.network/log/83727) 2026-11-10 14:00 UTC proposal.adopted
- [83726](https://bounty.xe.network/log/83726) 2026-11-10 14:00 UTC ticket.facts
- [83725](https://bounty.xe.network/log/83725) 2026-11-10 14:00 UTC proposal.adopted

[Full history](https://bounty.xe.network/log?ref=XE-1786) · [JSON](https://bounty.xe.network/v1/tickets/XE-1786) · [markdown](https://bounty.xe.network/XE-1786.md)

### Report

## Summary

`sdk/src/pow.ts` `solveJs` runs its inner loop as `for (i < interval)`; with `interval` 0 the inner loop never executes, and the
outer loop yields forever. Verified in a fresh process (WebAssembly
disabled to force the JS path, difficulty 0): the call was still
unresolved after 3 seconds. The WASM path clamps via
`Math.max(interval, 1<<16)`, so only the JS path hangs.

## Impact

- **Local self-DoS.** A caller that passes `progressInterval: 0`
  (e.g. intending "no progress callbacks") gets a promise that never
  resolves, hanging whatever flow called `solvePow` — including lease
  and send flows that PoW every block.
- **Scope limit (stated plainly).** Only when WebAssembly is
  unavailable (the WASM path clamps) and only when the caller
  explicitly passes 0\. The victim is the caller's own process; no
  other party is affected and no funds are at risk.

## Severity reasoning

- **Minor, not Low:** the trigger is narrow (explicit 0 \+ no WASM)
  and the harm is confined to the caller's own process hanging. A
  hang-on-zero bug in a public API is real, but with no other party
  affected and an easy workaround (don't pass 0), Minor is honest.

## Root cause

`solveJs` does not clamp `interval` the way the WASM path does, so 0
produces an inner loop that never runs and an outer loop that never
terminates.

## Reproduction

### A. Node test (primary evidence — PASS)

Harness `/tmp/sdk-verify-r4/h1.mjs` (built `dist/`, WebAssembly
disabled, difficulty 0). `solvePow` with `progressInterval: 0` was
still unresolved after 3s — verified hang.

## Dedup note

Checked against the live public report list at https://bounty.xe.network
(166 public tickets, checked 2026-11-09). No title or body match for
`solvePow`, `progressInterval`, or a PoW hang. No known report covers
this defect.

## Suggested fix direction

- Clamp the interval in `solveJs` the same way the WASM path does
  (`Math.max(interval, 1<<16)`), or treat 0 as "no progress
  callbacks" with a sane default chunk size.

## References (file:line, sdk @ 605c20a)

| Location | What it shows |
| --- | --- |
| `sdk/src/pow.ts` (`solveJs`) | Inner loop `for (i < interval)` never executes at interval 0; outer loop yields forever |
| `sdk/src/pow.ts` (WASM path) | Clamps via `Math.max(interval, 1<<16)` — the JS path lacks this |
| `/tmp/sdk-verify-r4/h1.mjs` | Verification harness (fresh process, WASM disabled) |

## Payout address

```
052e33e0ed9c43e2bdf07faff9a90d25642b51d53d96f49f5d45b81f6584b3da
```

**NOTE — operator must confirm this payout address (or replace it with
their own) before submission.** This is the hunt testnet wallet generated
for faucet/PoC work; it is the address the reporter intends to receive
any award at, pending operator confirmation.

### Thread

**Joseph Denne**team2026-11-10 14:00 UTCdesk

Thank you for this report. We have read it against the code and it is being handled. The assessment and any award follow the fix. https://bounty.xe.network/XE-1786
