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: thread new blockheight expiry strategy through sendAndConfirmTransaction #25227

Merged
merged 7 commits into from
May 15, 2022
Merged

feat: thread new blockheight expiry strategy through sendAndConfirmTransaction #25227

merged 7 commits into from
May 15, 2022

Conversation

steveluscher
Copy link
Contributor

@steveluscher steveluscher commented May 15, 2022

Problem

sendTransaction right now only fetches a recent blockhash using the deprecated getRecentBlockhash() method. Notably this is missing the lastValidBlockHeight property that's needed to use the blockheight-based transaction confirmation strategy.

Summary of Changes

Teach the ‘recent blockhash’ cache to fetch using getLatestBlockhash and thread the lastValidBlockHeight down to confirmTransaction through its membership on Transaction.

Fixes #23949.

@steveluscher steveluscher changed the title Thread new blockheight expiry strategy through sact feat: thread new blockheight expiry strategy through sendAndConfirmTransaction May 15, 2022
@codecov
Copy link

codecov bot commented May 15, 2022

Codecov Report

Merging #25227 (4de419f) into master (69a0ff9) will decrease coverage by 7.0%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           master   #25227       +/-   ##
===========================================
- Coverage    82.0%    75.0%     -7.1%     
===========================================
  Files         598       38      -560     
  Lines      165882     2302   -163580     
  Branches        0      335      +335     
===========================================
- Hits       136125     1727   -134398     
+ Misses      29757      459    -29298     
- Partials        0      116      +116     

@steveluscher steveluscher added the javascript Pull requests that update Javascript code label May 15, 2022
@steveluscher steveluscher merged commit 4ea39c1 into solana-labs:master May 15, 2022
@steveluscher steveluscher deleted the thread-new-blockheight-expiry-strategy-through-sact branch May 15, 2022 04:55
@Dayday10

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The solana-web3.js transaction confirmation logic is very broken
2 participants