Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solana - Commitment vs preflightCommitment

Tags:

solana

I'm curious what the difference between preflightCommitment and commitment is.

Also, what are the different types of commitments listed below.

export type Commitment =
    | 'processed'
    | 'confirmed'
    | 'finalized'
    | 'recent'
    | 'single'
    | 'singleGossip'
    | 'root'
    | 'max';
like image 712
yangli-io Avatar asked Mar 10 '26 22:03

yangli-io


1 Answers

preflightCommitment is the commitment used for the preflight transaction, AKA the transaction simulation, whereas commitment is used for the actual transaction.

As for the different commitments, they're all listed at https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment

Some of those terms are old, but here's roughly how they would translate:

  • processed = recent
  • confirmed = singleGossip = single
  • finalized = root = max
like image 113
Jon C Avatar answered Mar 12 '26 10:03

Jon C



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!