helius-labs / helius-sdk

123 stars 39 forks source link

feat: refactor smart transaction sender & confirmation #114

Closed tavindev closed 3 weeks ago

tavindev commented 1 month ago

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 commented 1 month ago

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

0xIchigo commented 3 weeks ago

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

0xIchigo commented 3 weeks ago

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

tavindev commented 3 weeks ago

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 commented 3 weeks ago

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 🫡