Solana: What is the right transaction commitment level for your use case?
Understanding transaction commitment levels is crucial for navigating the Solana landscape, especially when it comes to building reliable high-performance DApps. These commitment levels, namely “Processed”, “Confirmed”, and “Finalized”, serve as key indicators of transaction certainty and finality within the network.
This guide is designed to provide a comprehensive overview of these levels, equipping Web3 developers like yourself with the knowledge to operate effectively. Let’s get to it!
What are transaction commitment levels in Solana?
The role of Solana’s transaction commitment levels in ensuring the reliability and security of the network is significant. They offer a clear snapshot of a transaction’s state, empowering you as developers to make informed decisions based on your specific needs.
When interacting with Solana, transactions pass through three main commitment levels—”Processed”, “Confirmed”, and “Finalized”. Each level offers a different degree of certainty about the transaction’s status within the network. Whether you’re a seasoned developer or just starting your Solana journey, gaining a firm grasp of these commitment levels is a critical step forward.
Processed
A transaction is marked as “Processed” when it has been received by the network and included in a block. However, it’s important to note that at this stage, there’s no guarantee that the block containing the transaction is on the majority fork of the blockchain. Here are the key characteristics of the “Processed” commitment level:
- The transaction is included in a received block.
- The block may or may not be on the majority fork.
- The block contains the target transaction.
Confirmed
The “Confirmed” commitment level is reached when a transaction is included in a block that has been voted on by a supermajority (66%+) of the network’s stake. This provides a higher level of assurance that the transaction is on the majority fork and is unlikely to be reversed. Here are the key characteristics of the “Confirmed” commitment level:
- The transaction is included in a received block.
- The block is on the majority fork.
- The block contains the target transaction.
- 66%+ of the network’s stake has voted on the block.
Finalized
The “Finalized” commitment level offers the highest level of certainty for a transaction on the Solana blockchain. A transaction is considered “Finalized” when it is included in a block that has been confirmed by a supermajority of the stake, and at least 31 additional confirmed blocks have been built on top of it. Here are the key characteristics of the “Finalized” commitment level:
- The transaction is included in a received block.
- The block is on the majority fork.
- The block contains the target transaction.
- 66%+ of the network’s stake has voted on the block.
- At least 31 confirmed blocks have been built on top of the block.
How to choose the right Solana transaction commitment level?
When developing applications on Solana, selecting the appropriate commitment level based on your specific use case is crucial. Here are some guidelines to help you make the right choice:
- For low-value or non-critical transactions, the “Processed” commitment level may be sufficient. This level indicates that the transaction has been received by the network and included in a block, but it doesn’t guarantee that the block is on the majority fork. This level is best suited for testing purposes and is therefore not recommended for use in production environments.
- For transactions that require a higher level of assurance, such as financial transactions, the “Confirmed” commitment level is recommended. This level provides assurance that the transaction is on the majority fork and is unlikely to be reversed, as it has been voted on by a supermajority of the network’s stake. Typically, this commitment level is recommended for the majority of use cases, as it reduces block hash expirations and dropped transactions.
- For high-value or mission-critical transactions that demand the highest level of finality, the “Finalized” commitment level should be used. This level offers the highest level of certainty, as it indicates that the transaction is included in a block that has been confirmed by a supermajority of the stake, and at least 31 additional confirmed blocks have been built on top of it. As a result, the “Finalized” level runs the highest risk of dropped transactions, especially during congestion.
Remember, the key to successful application development on Solana lies in understanding these commitment levels and leveraging them effectively to ensure the reliability and security of your transactions.
Further reading
Expand your Solana knowledge and skills with these comprehensive Chainstack resources:
- Troubleshooting common Solana errors master guide: Learn how to tackle common Solana errors like Rust version conflicts, Borsh serialization issues, blockstore errors, and more.
- The ultimate Solana developer guide: Master Solana development all across the board with this ultimate guide, covering everything from pastable snippets to advanced integrations.
- Mastering Solana series: Explore Solana essentials like token swaps with Raydium SDK, SPL token transfers, account retrieval methods, and getTokenLargestAccounts RPC insights.
- Solana-web3.js Tutorial: Learn how to use the solana-web3.js method in just 7 minutes to mint an SPL token, transfer tokens, and delegate tokens.
- Querying and analyzing Solana data from Raydium with Python: Learn about Raydium, a leading DEX on Solana, and explore how DeFi enables token exchanges across chains and fiat.
- Powerful Chainstack infrastructure optimized for Solana: Run high-performing Solana RPC nodes and APIs in minutes on a platform built for scale with Chainstack.
- How to run a Solana RPC node: Learn how to run your Solana RPC node instance on Chainstack, connected to the mainnet beta and complete with metric monitoring.
- Solana tool suite: Learn how to interact with your Chainstack Solana node and develop DApps.
- Solana glossary: Get a better understanding of key Solana terminology and its definitions.
Bringing it all together
Having a deep understanding of Solana’s transaction commitment levels is an indispensable tool for developers working with the Solana blockchain. By choosing the appropriate commitment level for your use case, you can augment the reliability and security of your transactions.
The “Processed”, “Confirmed”, or “Finalized” commitment levels serve as a testament to a different degree of certainty and finality. As you navigate the world of Solana development, arm yourself with this knowledge. It will guide the way as you build robust and reliable applications that can stand up to the dynamic challenges that come with blockchain technology.
Power-boost your project on Chainstack
- Discover how you can save thousands in infra costs every month with our unbeatable pricing on the most complete Web3 development platform.
- Input your workload and see how affordable Chainstack is compared to other RPC providers.
- Connect to Ethereum, Solana, BNB Smart Chain, Polygon, Arbitrum, Base, Optimism, Avalanche, TON, Ronin, zkSync Era, Starknet, Scroll, Aptos, Fantom, Cronos, Gnosis Chain, Klaytn, Moonbeam, Celo, Aurora, Oasis Sapphire, Polygon zkEVM, Bitcoin, Tezos and Harmony mainnet or testnets through an interface designed to help you get the job done.
- To learn more about Chainstack, visit our Developer Portal or join our Discord server and Telegram group.
- Are you in need of testnet tokens? Request some from our faucets. Multi-chain faucet, Sepolia faucet, Holesky faucet, BNB faucet, zkSync faucet, Scroll faucet.
Have you already explored what you can achieve with Chainstack? Get started for free today.