Overview page background
How to Learn Solana Development (2024)

How to Learn Solana Development (2024)

Written by Turja

Brady Werkheiser headshot

Reviewed by Brady Werkheiser

Published on January 25, 20236 min read

This article will explain why Solana development is suitable for building programs and dapps, introduce a roadmap for learning Solana development, and finally answer  questions about Solana development. By the end of this article, you will understand how to become a Solana developer and you will have been provided with resources to help you learn Solana development. 

Solana is a fast and scalable blockchain platform that has been designed specifically for decentralized applications (dApps). It allows developers to build and deploy dApps quickly and efficiently, making it an ideal platform for creating new and innovative projects.

Interested to dive deeper? Here are a few more reasons why Solana development is great for dApp creation.

Solana is known for its high scalability, with the ability to process tens of thousands of transactions per second. This makes it an attractive platform for building dApps that need to handle a large volume of transactions, such as decentralized exchanges or games.  

Solana offers a number of advanced features that can be leveraged to build innovative dApps, such as support for smart contracts, proof of history (PoH) for secure and fast transaction processing, and Layer 2 solutions like Optimistic Rollup.  

A thriving ecosystem of developers, investors, and entrepreneurs, making it an exciting place to be for anyone interested in the blockchain space. By learning Solana development, you can become a part of this community and contribute to the growth and development of the platform.

As the demand for dApps built on Solana increases, there will be a corresponding demand for developers with expertise in Solana development. By learning Solana development, you can position yourself as a valuable asset to companies looking to build dApps on the platform.

Some of the most important concepts developers need to learn on the Solana Developer roadmap are:

  1. Solana programs

  2. Transactions

  3. Solana Account Model

  4. Solana Programming Lnguages

  5. Setting up the Solana development environment

  6. Using Solana Development Frameworks

  7. Developing Programs

  8. Deploying Programs

  9. Testing Programs

  10. Building Dapps

Solana Programs are smart contracts on the Solana blockchain that contain executable code and can be used to interpret instructions within transactions on the blockchain. They can be native programs, which are built into the core of the Solana blockchain and can only be upgraded as part of the blockchain's software updates, or on-chain programs, which are user-written programs that can be deployed and updated directly on the blockchain by their respective program owners. 

Solana Programs run on the Sealevel runtime, which is the parallel processing model of the Solana blockchain that helps to enable its high transaction speeds. Programs are considered stateless since they only contain compiled code, and they can be upgraded by their owners. They can also own other accounts and can read or credit any other account, but they can only change the data or debit accounts that they own.

In Solana, transactions are submitted to the cluster and processed by the Solana runtime. Transactions contain a compact-array of signatures, followed by a message. The message includes a header, a compact-array of account addresses, a blockhash, and a compact-array of instructions. Instructions specify a single program, a subset of the transaction's accounts that should be passed to the program, and a data-byte array that is passed to the program. 

The program interprets the data array and operates on the accounts specified by the instructions. Programs can return successfully or with an error code, which causes the entire transaction to fail. Transactions are verified for the number of signatures and that each signature was signed by the private key corresponding to the public key at the same index in the message's account addresses array.

Solana's Sealevel runtime has a unique account model compared to Ethereum's Virtual Machine (EVM). In Sealevel, any account can store state, unlike on Ethereum where only smart contracts can store state in their storage. In Solana, the state of a smart contract is stored in other accounts, and each account assigns an owner contract to have exclusive control over state mutations. 

Sealevel has two types of accounts: executable and non-executable.

  1. Executable accounts - are immutable and can store their own executable bytecode or a proxy address of an account with mutable executable byte code

  2. Non-executable accounts - store data and can be modified by their owner, but changes by any other programs will be reverted

In Sealevel, executable accounts store a public key that identifies the account and the BPF bytecode of the program that will be executed when the account is called, and non-executable accounts store a balance and data.

The programming languages used for Solana development include Rust, C, and C++. These languages are used to build programs, also known as smart contracts, that are deployed on the Solana blockchain and run through the Solana Runtime. 

While understanding these languages and creating programs is not a requirement for building on Solana, developers may choose to learn them to create their own programs. Solana also offers a JSON RPC API and various SDKs, including solana-web3.js and Java, C#, Python, Go, Swift, Dart-Flutter, and Kotlin, to allow for the creation of decentralized applications that resemble traditional web or mobile apps and interact with centralized APIs.

To write a Solana Program, developers will need to build and test their programs in a local development environment using core Solana developer tools. such as the command line interface, and the Solana tool suite.

If you're just getting started, follow this step-by-step guide to setting up your local environment.

The two main development frameworks for building Solana applications are Anchor and Seahorse. Anchor abstracts away a lot of the complexity from developing applications natively in Rust. Seahorse is similar to Anchor, but it is a Solana development framework for Python developers.

At this point in the roadmap, you will have enough conceptual knowledge about Solana fundamentals and different tools to use to build applications. To learn how to write a program, follow an introductory "Hello World" Solana tutorial, or consult one of many free developer resources.

Solana Developers is a resource provided by the Solana team for developers interested in learning about and building on the Solana blockchain platform. The website provides a wealth of information and resources, including documentation, tutorials, and community support, to help developers get started with Solana development.

Solana Docs is a collection of resources and documentation provided by Solana. This consists of the platform's features, technical details, and guides on how to build and deploy dApps on Solana.

Solana Cookbook is a developer resource that provides information and examples for building applications on the Solana blockchain. It is organized into different sections that cover core concepts, guides, and references for Solana development. It’s open to contributions from new developers and provides guidelines for contributing. 

The Solana Blockchain Developer Bootcamp is led by Solana and Chainlink for participants to learn about the intricacies of the Solana architecture and programming model. This consists of the basis of developing on Solana using Rust to build, deploy, test and interact with the Solana blockchain. Developers will be able to learn directly with the support from teams from Solana, Chainlink and others to build Solana dapps and kickstart a new journey.

Once your code is complete, you can compile your code into BPF bytecode and create a .so file that can be deployed on the blockchain.  

To deploy your program, you can use the solana program deploy command, solana program deploy followed by the path to your compiled .so file. This will send a transaction to the blockchain and deploy your program to the specified address.  A successful deployment will output the program id.

Solana provides a number of tools for debugging and testing programs including the crate solana-program-test, which allows for interactive testing and debugging of programs using a local runtime environment. The crate solana-validator enables more robust testing on a local validator node, while the CLI tool solana-test-validator allows for testing and execution of transactions from the command line for Rust or Javascript/Typescript applications. 

It is recommended to use the msg! macro in the program to log information during the testing and debugging process, but to remove it once the program is stable to avoid exceeding the Compute Unit budget. 

It is also possible to test programs using a local validator node, which allows for more comprehensive testing that more closely resembles the behavior of the program when deployed on the Solana network.

To build a Solana dapp, you will need to familiarize yourself with the Solana ecosystem and learn how to interact with the blockchain. For building Solana dapps, Solana offers numerous APIs and SDKs that allow developers to build dapps using popular programming languages such as JavaScript, Java, Python, and Go. You can access these SDKs on the Solana Developers Page.

Now that you know the steps to learn Solana development, the next step is to sign up for a free Solana developer account with Alchemy, and start building!

Overview cards background graphic
Section background image

Build blockchain magic

Alchemy combines the most powerful web3 developer products and tools with resources, community and legendary support.

Get your API key