Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant