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

Proposal for waitForTransaction improvement #1237

Open
Cussone opened this issue Oct 3, 2024 · 5 comments
Open

Proposal for waitForTransaction improvement #1237

Cussone opened this issue Oct 3, 2024 · 5 comments
Labels

Comments

@Cussone
Copy link

Cussone commented Oct 3, 2024

Now that block times are much faster it would make sense to lower the retryInterval param from 5000ms (waited on twice, so it's 10s) to something more realistic.

Also, I find it weird that retryInterval is an optional param. In my opinion, it would make more sense to require it explicitly, with a suggested value in the docs. I see it as a better DX.

This would be a breaking change. So, it is something to consider for the next major release.

@Cussone Cussone added the Type: feature New feature or request label Oct 3, 2024
@martinvibes
Copy link

hello @Cussone can i hop on this issue?

@Cussone
Copy link
Author

Cussone commented Oct 3, 2024

hello @Cussone can i hop on this issue?

Not sure what you are referring to, but feel free to write anything you think about this.

@PhilippeR26
Copy link
Collaborator

Has been discussed in Slack: will not be modified, as user can customize the value.

@Cussone
Copy link
Author

Cussone commented Oct 8, 2024

Has been discussed in Slack: will not be modified, as user can customize the value.

Yup, that was the conclusion for the current version, but I opened this proposal for the next version, as we also discussed on Slack.

@starknet-io starknet-io deleted a comment Oct 26, 2024
@Sekhmet
Copy link
Contributor

Sekhmet commented Nov 14, 2024

Another improvements would be:

  • do not call sleep after receipt is successfully resolved here - right now even if transaction is ready we are still waiting for 5s.
  • do not call sleep on entry here

I've had issue with my tests where everything was super slow (even when using starknet-devnet) and actually the issue is that each call to waitForTransaction will take at least 10s unless you modify transactionRetryIntervalFallback.

Sekhmet added a commit to snapshot-labs/sx-monorepo that referenced this issue Nov 14, 2024
The issue is with starknetjs implementation of waitForTransaction,
that will always take at least 10s with default settings.

We can improve it a lot by just decreasing intervals.

starknet-io/starknet.js#1237 (comment)
Sekhmet added a commit to snapshot-labs/sx-monorepo that referenced this issue Nov 16, 2024
The issue is with starknetjs implementation of waitForTransaction,
that will always take at least 10s with default settings.

We can improve it a lot by just decreasing intervals.

starknet-io/starknet.js#1237 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants