Skip to content

fix(nonce): use exponential backoff in safeAcquire - #636

Open
wildanniam wants to merge 1 commit into
conduit-protocol:mainfrom
wildanniam:fix/551-exponential-backoff
Open

fix(nonce): use exponential backoff in safeAcquire#636
wildanniam wants to merge 1 commit into
conduit-protocol:mainfrom
wildanniam:fix/551-exponential-backoff

Conversation

@wildanniam

Copy link
Copy Markdown

Summary

  • change NonceManager.safeAcquire from linear retry delays to exponential backoff (delayMs * 2 ** attempt)
  • align the parameter documentation with the implemented behavior
  • add a deterministic fake-timer regression test covering the exact 100, 200, 400 backoff sequence

Verification

  • npm test — 74 test files passed, 1 skipped; 964 tests passed, 2 skipped
  • npm run typecheck
  • npm run lint
  • npm run build
  • focused nonce/locking run — 4 test files and 28 tests passed
  • changed-file ESLint and git diff --check

Baseline note

Initial verification against the previous main commit (3bdb66d) exposed 18 unrelated stale test failures, four existing typecheck errors, and two existing lint errors. Those results reproduced on a clean worktree and were not introduced by this change.

Before opening this PR, main received a020f5a (test(ci): fix lint, typecheck and stale tests on main). This branch was rebased onto that commit and the complete test, typecheck, lint, and build verification is now green.

Risks / Notes

  • no public API or method-signature changes
  • jitter and WebSocketRelayer behavior remain outside this focused issue
  • the existing single-waiter queue and lock handoff behavior are unchanged and covered by the related nonce tests

Closes #551

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@wildanniam Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Enhancement: NonceManager.safeAcquire docstring says "exponential backoff" but implements linear

1 participant