Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PKG -- [FCL] Ignore Not Found errors when polling transaction status #1792

Merged
merged 4 commits into from
Nov 16, 2023

Conversation

jribbink
Copy link
Contributor

@jribbink jribbink commented Oct 25, 2023

closes #1790

  • All "not found" errors are ignored when polling TX status
  • If no status update has been found after 10s (i.e. every req has been 404), transaction times out
  • TX hash validation has been added to prevent waiting 10s for a deterministic 404

@changeset-bot
Copy link

changeset-bot bot commented Oct 25, 2023

🦋 Changeset detected

Latest commit: c76891f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@onflow/transport-http Minor
@onflow/fcl Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jribbink jribbink changed the title PKG -- [FCL] Ignore 404 errors when polling transaction status PKG -- [FCL] Ignore Not Found errors when polling transaction status Oct 25, 2023
@jribbink jribbink marked this pull request as ready for review October 26, 2023 15:19
@jribbink jribbink requested a review from a team as a code owner October 26, 2023 15:19
Comment on lines +120 to +121
* @param {number} [opts.pollRate=2500] - Polling rate in milliseconds
* @param {number} [opts.txNotFoundTimeout=12500] - Timeout in milliseconds for ignoring transaction not found errors (do not modify unless you know what you are doing)
Copy link
Contributor Author

@jribbink jribbink Oct 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking 12500 is good timeout because with pollRate of 2500, it guarantees last poll happens >~10000ms which I think we discussed 10s as the target here, but LMK.

@jribbink jribbink requested a review from JeffreyDoyle October 26, 2023 15:22
@jribbink jribbink assigned nialexsan and unassigned nialexsan Oct 26, 2023
@jribbink jribbink requested a review from nialexsan October 26, 2023 15:22
Copy link
Contributor

@nialexsan nialexsan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the actor model looks like black magic

@nialexsan nialexsan merged commit cb5d38c into master Nov 16, 2023
1 check passed
@nialexsan nialexsan deleted the jribbink/tx-404 branch November 16, 2023 21:56
@github-actions github-actions bot mentioned this pull request Nov 16, 2023
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.

Support increased retry + caching when getting a transactions status
2 participants