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

feat: refactor smart transaction sender & confirmation #114

Merged
merged 12 commits into from
Aug 13, 2024

Conversation

tavindev
Copy link
Contributor

@tavindev tavindev commented Jul 26, 2024

This PR is the continuation of #97.

The new confirmation strategy uses the confirmTransaction, with the possibility of adding an offset to the lastValidBlockHeight option. The reason for that is to address scenarios where the transaction is included after the lastValidBlockHeight due to network latency or due to the leader not forwarding the transaction for an unknown reason.

Trade-off: better reliability at the cost of possible longer confirmation times.

Addresses #112

@tavindev tavindev marked this pull request as draft July 26, 2024 02:22
@tavindev tavindev marked this pull request as ready for review July 26, 2024 11:27
Copy link
Contributor

@0xIchigo 0xIchigo left a comment

Choose a reason for hiding this comment

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

I left a few comments/questions that need to be resolved, but other than that, very based! Thank you for your contribution!

.eslintrc.json Outdated Show resolved Hide resolved
src/RpcClient.ts Outdated Show resolved Hide resolved
src/RpcClient.ts Outdated Show resolved Hide resolved
src/RpcClient.ts Outdated Show resolved Hide resolved
@tavindev
Copy link
Contributor Author

Awesome. I'm currently away on a trip, so I will fix everything when I get back.

@tavindev tavindev requested a review from 0xIchigo August 5, 2024 23:39
Copy link
Contributor

@0xIchigo 0xIchigo left a comment

Choose a reason for hiding this comment

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

Extremely based! Just one nit, but LGTM 🔥

src/RpcClient.ts Show resolved Hide resolved
@0xIchigo
Copy link
Contributor

Also, for future PRs, can you please make a separate branch instead of pushing from main -> main

@0xIchigo 0xIchigo self-requested a review August 13, 2024 07:46
@0xIchigo
Copy link
Contributor

I'm going to go ahead and merge — I'll take out the unused import myself. Thank you for your contribution!

@tavindev
Copy link
Contributor Author

Also, for future PRs, can you please make a separate branch instead of pushing from main -> main

Sure, will do that next time! Do you think we can get this released soon?

@0xIchigo
Copy link
Contributor

Yes, we'll cut a new release soon to include all of the recent PRs. I have a few more things I need to implement and get reviewed, but I'll make sure it happens as fast as possible 🫡

@0xIchigo 0xIchigo mentioned this pull request Aug 15, 2024
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.

2 participants