I have a solana program that has the following two instructions.
- an instruction that writes a record to the PDA
- an instruction that fails if this record exists and succeeds if it does not.
If 2 -> 1 is executed quickly with little time interval, the "confirmed" commitment will succeed, but the "finalized" commitment will fail with a non-negligible probability.
What causes the result of "confirmed" to change from "finalized" to something else? Is it possible to prevent this?