Skip to content

Fix silent RPC stalls: deadlines, diagnostics, PAPI 3.1 - #8

Merged
kogeler merged 1 commit into
mainfrom
update-polkadot-nominations
Sep 18, 2026
Merged

kogeler merged 1 commit into
mainfrom
update-polkadot-nominations

Conversation

@kogeler

@kogeler kogeler commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • --validator-info no longer scans the entire Staking.Ledger map. It resolves
    each configured stash through Staking.Bonded plus a direct Ledger lookup,
    which is what previously made the mode hang on public Asset Hub endpoints. Chain
    work for 7 validators now takes ~8s instead of stalling indefinitely.
  • Every chain call runs behind a per-call deadline, a retry budget with exponential
    backoff, and a global concurrency semaphore (default 16). The mode previously
    fired ~1150 simultaneous requests over a single WebSocket, which silently stalled
    most endpoints. All four limits are configurable in config.json.
  • Failures are now reported instead of swallowed: a startup probe fails fast on an
    endpoint that accepts the socket but never answers, socket transitions are logged,
    stderr lines carry timestamps and per-phase durations, and the process always
    prints an EXIT code N line. Anything explaining termination is written with
    fs.writeSync, because console.error is asynchronous on a pipe and drops its
    buffer when process.exit follows in the same tick — that defect previously
    turned a real error into a bare exit code 1.
  • Credentials embedded in rpcUrl are redacted in logs; the endpoint API key was
    previously printed to stderr in cleartext.
  • Upgraded polkadot-api 2.2.2 → 3.1.0 and replaced the now-unreachable default and
    test-fixture RPC endpoint. The 3.0 breaking changes only affect transaction
    submission, which this read-only tool does not use; report output was verified
    byte-identical across both versions.

@kogeler
kogeler merged commit cf17833 into main Sep 18, 2026
8 checks passed
@kogeler
kogeler deleted the update-polkadot-nominations branch September 19, 2026 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant