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

fix: verify commitment level when confirming transactions with one-shot fetch #28969

Merged
merged 3 commits into from Nov 29, 2022
Merged

fix: verify commitment level when confirming transactions with one-shot fetch #28969

merged 3 commits into from Nov 29, 2022

Conversation

steveluscher
Copy link
Contributor

Problem

A small bug snuck in at #28290 where the one-shot fetch for the current commitment status could result in a transaction being confirmed when it shouldn't be. The reason was because we did not check that the result met the target commitment.

Summary of Changes

When fetching the one-shot getSignatureStatus for a given transaction, make sure that the instantaneous signature status at least meets the target commitment.

@steveluscher steveluscher merged commit 04789ca into solana-labs:master Nov 29, 2022
@steveluscher steveluscher deleted the web3-match-commitments-when-confirming-transactions branch November 29, 2022 02:50
gnapoli23 pushed a commit to gnapoli23/solana that referenced this pull request Dec 16, 2022
…ot fetch (solana-labs#28969)

* Rename `subscriptionCommitment` to `confirmationCommitment`

* Reorganize status checking code to return early if `value` is `null`

* Bail if the one-shot signature result does not meet the target commitment
nickfrosty pushed a commit to nickfrosty/solana that referenced this pull request Jan 4, 2023
…ot fetch (solana-labs#28969)

* Rename `subscriptionCommitment` to `confirmationCommitment`

* Reorganize status checking code to return early if `value` is `null`

* Bail if the one-shot signature result does not meet the target commitment
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.

None yet

1 participant