[BUG] submitWhenReady() computes 'readiness' using a flat polling interval that doesn't back off even after many consecutive not-ready responses

Open Beginner friendly
#928 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
node.js, typescript

Research direction

Start by locating submitWhenReady() in the tx-pipeline component and inspect its polling loop and existing tests. Run the relevant tx-pipeline tests, then verify that repeated not-ready responses increase the delay up to a reasonable cap while readiness still triggers submission; add coverage for both behaviors.

Written by the indexing model from the issue text.

Description

bug difficulty: easy good first issue priority: low reliability sdk

Description

submitWhenReady() polls a readiness condition (e.g. an account reaching a required balance) at a fixed interval indefinitely, with no backoff even after dozens of consecutive "not ready" responses, unnecessarily hammering the RPC endpoint for conditions that might take a long time to become true.

Component

tx-pipeline

Steps to Reproduce

  1. Call submitWhenReady() for a condition that won't become true for several minutes.
  2. Monitor outgoing RPC request frequency over that period.
  3. Compare against a reasonable backoff curve.

Expected Behavior

The polling interval should back off (within a reasonable cap) the longer the condition remains unmet, rather than polling at a flat rate indefinitely.

Actual Behavior

Long-pending readiness conditions generate unnecessary RPC load at a constant high frequency for the entire wait duration.

Environment

  • SDK version: 0.3.x
  • Node version: 20.x, 22.x
  • OS: macOS / Linux
  • Network: TESTNET

Code Example

await client.txPipeline.submitWhenReady(signedXdr, readyCheckFn);

Error Output

N/A — no thrown error; behavior is incorrect but silent.

Difficulty

🟢 Easy

Additional Context

The polling loop uses a hardcoded fixed setInterval-style delay with no escalation logic.

Dominant language
TypeScript
Stars
0
Forks
73
Avg merge
6h 26m
Merged PRs (30d)
37

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from trustflow-protocol/trustflow-sdk

All issues in trustflow-protocol/trustflow-sdk

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.