Network
Launch Date
Consensus
Note
Sepolia
Oct 2021
PoW
Like-for-like representation of Ethereum
Görli
Jan 2019
PoA
Proof-of-Authority
Kiln
Mar 2022
PoS
Post-Merge (for ETH2), shadow fork of the mainnet
Kintsugi
Dec 2021
PoS
DEPRECATED, use Kiln; post-Merge (for ETH2)
Ropsten
Nov 2016
PoW
DEPRECATED, use Sepolia; the Merge to happen on Jun 8, 2022
Rinkeby
Apr 2017
PoA
DEPRECATED, use Görli and Görli Faucet
Kovan
Mar 2017
PoA
DEPRECATED, use Sepolia or Görli
List of active and deprecated Ethereum testnets, including Kintsugi.
Features
Optimistic rollup 
ZK-rollup 
Proof
Uses fraud proofs to prove transaction validity. 
Uses validity (zero-knowledge) proofs to prove transaction validity. 
Capital efficiency
Requires waiting through a 1-week delay (dispute period) before withdrawing funds. 
Users can withdraw funds immediately because validity proofs provide incontrovertible evidence of the authenticity of off-chain transactions. 
Data compression
Publishes full transaction data as calldata to Ethereum Mainnet, which increases rollup costs. 
Doesn't need to publish transaction data on Ethereum because ZK-SNARKs and ZK-STARKs already guarantee the accuracy of the rollup state. 
EVM compatibility
Uses a simulation of the Ethereum Virtual Machine (EVM), which allows it to run arbitrary logic and support smart contracts. 
Doesn't widely support EVM computation, although a few EVM-compatible ZK-rollups have appeared. 
Rollup costs
Reduces costs since it publishes minimal data on Ethereum and doesn't have to post proofs for transactions, except in special circumstances. 
Faces higher overhead from costs involved in generating and verifying proofs for every transaction block. ZK proofs require specialized, expensive hardware to create and have high on-chain verification costs. 
Trust assumptions
Doesn't require a trusted setup. 
Requires a trusted setup to work. 
Liveness requirements
Verifiers are needed to keep tabs on the actual rollup state and the one referenced in the state root to detect fraud. 
Users don't need someone to watch the L2 chain to detect fraud. 
Security properties 
Relies on cryptoeconomic incentives to assure users of rollup security. 
Relies on cryptographic guarantees for security. 
Start building
on Alchemy.
Sign up for free
Start building on Optimism.
Sign up for free
Start building on Arbitrum.
Sign up for free
Start building on Ethereum.
Sign up for free
Start building on Polygon.
Sign up for free
Start building on Starknet.
Sign up for free
Start building on Flow.
Sign up for free
kiln faucet
Get free Kiln ETH.
Start building today
Goerli faucet
Get free Goerli ETH.
Start building today
SEPOLIA FAUCET
Get free Sepolia ETH.
Start Building Today
mumbai faucet
Get free Mumbai Matic.
Start building today
rinkeby faucet
Get free Rinkeby
ETH.
Start building today
Start building on Ethereum.
Get started for free
Start building on Ethereum.
Get started for free
Start building on Flow.
Get started for free
Start building on Polygon.
Get started for free
Start building on Starknet.
Get started for free
Start building on Optimism.
Get started for free
Start building on Solana.
Get started for free
Start building on Solana.
Sign up for beta access
Start building on Solana.
Join the waitlist
Arbitrum logo
Start building on Arbitrum.
Get started for free
Build with Alchemy's
Gas Manager & Bundler APIs
Learn
Solidity at
Alchemy
University
Get started today
Build with Alchemy's
Gas Manager & Bundler APIs
curl 
https://release.solana.com/v1.10.32/solana-install-init-x86_64-pc-windows-msvc.exe 
--output 
C:\solana-install-tmp\solana-install-init.exe 
--create-dirs
Solana
ACCOUNTS IN SOLANA

Solana Data Accounts vs. Program Accounts

Learn The Difference Between Data Accounts and Program Accounts in Solana's Account Model
Last Updated:
January 26, 2023
Table of Contents
Table of Contents
Table of Contents

{{get-started-solana}}

Solana is a decentralized blockchain platform that is designed to be fast, secure, and scalable by using unique account models to orchestrate process flow. Typically a full Solana dApp layout would comprise three types of accounts: native accounts, data accounts, and program accounts.

This article focuses on Solana data and program accounts, together on the Solana blockchain, and how they differ from Ethereum smart contracts, the account equivalent on Ethereum.

What is a Solana data account?

A Solana data account is a type of account on the Solana blockchain which stores data such as tokens, documents, or any other type of information. Data accounts can store state but are not executable.

Data accounts are similar to accounts on other blockchain platforms, in that they have a balance and can receive and send transactions. These accounts, alongside metadata, identifies their owner and type of possible interaction during runtime. Wallet, mint, and token accounts are great examples of data accounts, as they hold value and belong to a user and program account.

What is a Solana program account?

A program account are smart contracts on the Solana blockchain used to execute code, typically triggered by incoming transactions or by the passage of time. Program accounts can interact with data accounts, allowing them to read and write data to the blockchain. They themselves can’t store variable states but invoke these from data accounts.

One key difference between Solana data accounts and program accounts is that program accounts can only be created by other program accounts, whereas data accounts can be created by any developer or user. However, program accounts can be used to create more program accounts, allowing for the creation of complex, multi-layered smart contract systems on the Solana EVM.

How do data accounts and program accounts work together?

Data accounts can be used to store the data that is used by program accounts, and program accounts can interact with data accounts to read and write this data. Data and program accounts co-exist and collaborate on the Solana blockchain to cultivate a broad range of dApp functions and services.

For example, a program account could be used to create a simple token contract that allows users to transfer tokens between data accounts. In this case, the program account would be responsible for executing the logic of the contract, while the data accounts would be used to store the balances of the tokens.

Something like this:

  

import {Account, DataAccount, TokenAccount, Program} from "@solana/web3.js";

// Create a new data account
const dataAccount = new DataAccount();

// Add some initial balance to the data account
dataAccount.balance = 1000;

// Create a new token account
const tokenAccount = new TokenAccount(dataAccount.publicKey);

// Check the balance of the token account
console.log(tokenAccount.balance); // 1000

// Transfer 100 tokens from the token account to another account
const recipient = new Account();
const amount = 100;

// Create a program that transfers tokens from the token account to the recipient
const program = new Program("transfer_tokens.wasm");

// Connect the data account to the program account
program.invoke(dataAccount, [recipient.publicKey, amount]);

// Check the balance of the token account again
console.log(tokenAccount.balance); // 900
}

In this example, we have created a program account called "transfer_tokens.wasm" that contains the logic for transferring tokens from one account to another. We can then connect the data account to the program account using the invoke method, passing in the data account and the arguments for the transfer as an array.

When the program account is executed, it will use the data stored in the data account to perform the token transfer. In this case, the program account would transfer 100 tokens from the token account to the recipient account.

You can test the program flow demonstrated in the example above with any other program of your choice or some of the pre-made programs in the Solana Program Library (SPL).

Solana Accounts vs. Ethereum Smart Contracts

Solana data accounts and program accounts are similar to Ethereum smart contracts, but there are some key differences including storage, calls, execution, gas, and more.

How are Solana data accounts and programs different from Ethereum smart contracts?

Solana data and program accounts differ from Ethereum smart contracts in how data is stored, contracts are called, the execution model, language support and gas.

1. Data Storage

On the Solana blockchain, data accounts are used to store data, while on the Ethereum blockchain, data is stored within smart contracts. This means that on Solana, there is a separation between the data and the logic that interacts with it, whereas on Ethereum, the data and logic are combined in a single smart contract.

2. Contract Calls

On the Solana blockchain, program accounts are triggered by incoming transactions, calls from other programs (i.e. cross-program invocations), or by the passage of time. On the Ethereum blockchain, smart contracts are triggered by incoming transactions and can also be called by other smart contracts.

3. Execution Model

Solana data accounts and program accounts are executed by the validators in the Solana network, while Ethereum smart contracts are executed by the Ethereum Virtual Machine (EVM) on individual nodes.

4. EVM Gas and Data Correlation

Solana data accounts can store an unlimited amount of data, while Ethereum has a limited amount of smart contract storage space that is determined by the amount of gas consumed during execution.

5. Language support

Solana program accounts can be written in any language that can be compiled to WebAssembly (WASM), while Ethereum smart contracts are typically written in Solidity or Vyper (a Python-based implementation of Solidity).

How are Solana data and program accounts similar to Ethereum smart contracts?

Solana data and program accounts are similar to Ethereum smart contracts in terms of smart contract functionality, decentralization, immutability, transparency and programmability.

1. Smart Contract Functionality

Both Solana accounts and Ethereum smart contracts can be used to facilitate transactions and automate processes, such as transferring assets or managing supply chain logistics.

2. Decentralization

Both Solana accounts and Ethereum smart contracts are deployed and executed on decentralized, public blockchain networks.

3. Immutability

Once a Solana data and program account or Ethereum smart contract is deployed to the blockchain, it cannot be modified or deleted.

4. Transparency

The code and data stored in Solana data and program accounts and Ethereum smart contracts are publicly accessible, allowing for transparency and auditability.

5. Programmability 

Solana data and program accounts and Ethereum smart contracts are programmable, meaning that they can contain logic and execute functions based on certain conditions. Solana, program accounts can create other program accounts, while on Ethereum, smart contracts can call other smart contracts.

How does Neon Labs' Solana EVM handle programs, accounts, and smart contracts?

Neon Labs' Solana EVM is a tool that allows developers to use Solidity/Vyper programming languages to build and deploy Ethereum smart contracts to the Solana blockchain, making it easy to port existing Ethereum dapps to Solana. Prior to the Neon EVM launch on the Solana devnet and mainnet, Ethereum dapps were incompatible with the Solana ecosystem.

The Neon EVM provides smart contracts a platform to execute as they would on the Ethereum blockchain, while taking advantage of the features that accounts ordinarily enjoy on the Solana blockchain, such as low gas fees and high throughput.

The Solana EVM works by emulating the Ethereum Virtual Machine on the Solana blockchain, allowing Ethereum smart contracts to be executed on Solana similarly to how they would be executed on the Ethereum blockchain. This means that developers can use their existing knowledge of the Solidity programming language and the Ethereum ecosystem to publish dapps on Solana.

Build Solana Accounts With Alchemy

A decentralized application built on Solana typically comprises of native accounts, data accounts, and program accounts. Native accounts represent programs on Solana, data accounts store information, and program accounts execute code on Solana. If you want to start building, register a free Solana developer account on Alchemy!

ALCHEMY SUPERNODE - ETHEREUM NODE API

Scale to any size, without any errors

Alchemy Supernode finally makes it possible to scale blockchain applications without all the headaches. Plus, our legendary support will guide you every step of the way.

Get started for free
Supernode footer
Solana
ACCOUNTS IN SOLANA

Solana Data Accounts vs. Program Accounts

Learn The Difference Between Data Accounts and Program Accounts in Solana's Account Model
Last Updated:
January 26, 2023
Last Updated:
August 24, 2022
Don't miss an update
Sign up for our newsletter to get alpha, key insights, and killer resources.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Table of Contents

Talk to an Expert

Learn how Alchemy's blockchain developer tools can help your business succeed in web3!
Valid number
Thank you! An Alchemy expert will be in touch with you shortly!
Oops! Something went wrong while submitting the form.

{{get-started-solana}}

Table of Contents

Solana is a decentralized blockchain platform that is designed to be fast, secure, and scalable by using unique account models to orchestrate process flow. Typically a full Solana dApp layout would comprise three types of accounts: native accounts, data accounts, and program accounts.

This article focuses on Solana data and program accounts, together on the Solana blockchain, and how they differ from Ethereum smart contracts, the account equivalent on Ethereum.

What is a Solana data account?

A Solana data account is a type of account on the Solana blockchain which stores data such as tokens, documents, or any other type of information. Data accounts can store state but are not executable.

Data accounts are similar to accounts on other blockchain platforms, in that they have a balance and can receive and send transactions. These accounts, alongside metadata, identifies their owner and type of possible interaction during runtime. Wallet, mint, and token accounts are great examples of data accounts, as they hold value and belong to a user and program account.

What is a Solana program account?

A program account are smart contracts on the Solana blockchain used to execute code, typically triggered by incoming transactions or by the passage of time. Program accounts can interact with data accounts, allowing them to read and write data to the blockchain. They themselves can’t store variable states but invoke these from data accounts.

One key difference between Solana data accounts and program accounts is that program accounts can only be created by other program accounts, whereas data accounts can be created by any developer or user. However, program accounts can be used to create more program accounts, allowing for the creation of complex, multi-layered smart contract systems on the Solana EVM.

How do data accounts and program accounts work together?

Data accounts can be used to store the data that is used by program accounts, and program accounts can interact with data accounts to read and write this data. Data and program accounts co-exist and collaborate on the Solana blockchain to cultivate a broad range of dApp functions and services.

For example, a program account could be used to create a simple token contract that allows users to transfer tokens between data accounts. In this case, the program account would be responsible for executing the logic of the contract, while the data accounts would be used to store the balances of the tokens.

Something like this:

  

import {Account, DataAccount, TokenAccount, Program} from "@solana/web3.js";

// Create a new data account
const dataAccount = new DataAccount();

// Add some initial balance to the data account
dataAccount.balance = 1000;

// Create a new token account
const tokenAccount = new TokenAccount(dataAccount.publicKey);

// Check the balance of the token account
console.log(tokenAccount.balance); // 1000

// Transfer 100 tokens from the token account to another account
const recipient = new Account();
const amount = 100;

// Create a program that transfers tokens from the token account to the recipient
const program = new Program("transfer_tokens.wasm");

// Connect the data account to the program account
program.invoke(dataAccount, [recipient.publicKey, amount]);

// Check the balance of the token account again
console.log(tokenAccount.balance); // 900
}

In this example, we have created a program account called "transfer_tokens.wasm" that contains the logic for transferring tokens from one account to another. We can then connect the data account to the program account using the invoke method, passing in the data account and the arguments for the transfer as an array.

When the program account is executed, it will use the data stored in the data account to perform the token transfer. In this case, the program account would transfer 100 tokens from the token account to the recipient account.

You can test the program flow demonstrated in the example above with any other program of your choice or some of the pre-made programs in the Solana Program Library (SPL).

Solana Accounts vs. Ethereum Smart Contracts

Solana data accounts and program accounts are similar to Ethereum smart contracts, but there are some key differences including storage, calls, execution, gas, and more.

How are Solana data accounts and programs different from Ethereum smart contracts?

Solana data and program accounts differ from Ethereum smart contracts in how data is stored, contracts are called, the execution model, language support and gas.

1. Data Storage

On the Solana blockchain, data accounts are used to store data, while on the Ethereum blockchain, data is stored within smart contracts. This means that on Solana, there is a separation between the data and the logic that interacts with it, whereas on Ethereum, the data and logic are combined in a single smart contract.

2. Contract Calls

On the Solana blockchain, program accounts are triggered by incoming transactions, calls from other programs (i.e. cross-program invocations), or by the passage of time. On the Ethereum blockchain, smart contracts are triggered by incoming transactions and can also be called by other smart contracts.

3. Execution Model

Solana data accounts and program accounts are executed by the validators in the Solana network, while Ethereum smart contracts are executed by the Ethereum Virtual Machine (EVM) on individual nodes.

4. EVM Gas and Data Correlation

Solana data accounts can store an unlimited amount of data, while Ethereum has a limited amount of smart contract storage space that is determined by the amount of gas consumed during execution.

5. Language support

Solana program accounts can be written in any language that can be compiled to WebAssembly (WASM), while Ethereum smart contracts are typically written in Solidity or Vyper (a Python-based implementation of Solidity).

How are Solana data and program accounts similar to Ethereum smart contracts?

Solana data and program accounts are similar to Ethereum smart contracts in terms of smart contract functionality, decentralization, immutability, transparency and programmability.

1. Smart Contract Functionality

Both Solana accounts and Ethereum smart contracts can be used to facilitate transactions and automate processes, such as transferring assets or managing supply chain logistics.

2. Decentralization

Both Solana accounts and Ethereum smart contracts are deployed and executed on decentralized, public blockchain networks.

3. Immutability

Once a Solana data and program account or Ethereum smart contract is deployed to the blockchain, it cannot be modified or deleted.

4. Transparency

The code and data stored in Solana data and program accounts and Ethereum smart contracts are publicly accessible, allowing for transparency and auditability.

5. Programmability 

Solana data and program accounts and Ethereum smart contracts are programmable, meaning that they can contain logic and execute functions based on certain conditions. Solana, program accounts can create other program accounts, while on Ethereum, smart contracts can call other smart contracts.

How does Neon Labs' Solana EVM handle programs, accounts, and smart contracts?

Neon Labs' Solana EVM is a tool that allows developers to use Solidity/Vyper programming languages to build and deploy Ethereum smart contracts to the Solana blockchain, making it easy to port existing Ethereum dapps to Solana. Prior to the Neon EVM launch on the Solana devnet and mainnet, Ethereum dapps were incompatible with the Solana ecosystem.

The Neon EVM provides smart contracts a platform to execute as they would on the Ethereum blockchain, while taking advantage of the features that accounts ordinarily enjoy on the Solana blockchain, such as low gas fees and high throughput.

The Solana EVM works by emulating the Ethereum Virtual Machine on the Solana blockchain, allowing Ethereum smart contracts to be executed on Solana similarly to how they would be executed on the Ethereum blockchain. This means that developers can use their existing knowledge of the Solidity programming language and the Ethereum ecosystem to publish dapps on Solana.

Build Solana Accounts With Alchemy

A decentralized application built on Solana typically comprises of native accounts, data accounts, and program accounts. Native accounts represent programs on Solana, data accounts store information, and program accounts execute code on Solana. If you want to start building, register a free Solana developer account on Alchemy!

Solana is a decentralized blockchain platform that is designed to be fast, secure, and scalable by using unique account models to orchestrate process flow. Typically a full Solana dApp layout would comprise three types of accounts: native accounts, data accounts, and program accounts.

This article focuses on Solana data and program accounts, together on the Solana blockchain, and how they differ from Ethereum smart contracts, the account equivalent on Ethereum.

What is a Solana data account?

A Solana data account is a type of account on the Solana blockchain which stores data such as tokens, documents, or any other type of information. Data accounts can store state but are not executable.

Data accounts are similar to accounts on other blockchain platforms, in that they have a balance and can receive and send transactions. These accounts, alongside metadata, identifies their owner and type of possible interaction during runtime. Wallet, mint, and token accounts are great examples of data accounts, as they hold value and belong to a user and program account.

What is a Solana program account?

A program account are smart contracts on the Solana blockchain used to execute code, typically triggered by incoming transactions or by the passage of time. Program accounts can interact with data accounts, allowing them to read and write data to the blockchain. They themselves can’t store variable states but invoke these from data accounts.

One key difference between Solana data accounts and program accounts is that program accounts can only be created by other program accounts, whereas data accounts can be created by any developer or user. However, program accounts can be used to create more program accounts, allowing for the creation of complex, multi-layered smart contract systems on the Solana EVM.

How do data accounts and program accounts work together?

Data accounts can be used to store the data that is used by program accounts, and program accounts can interact with data accounts to read and write this data. Data and program accounts co-exist and collaborate on the Solana blockchain to cultivate a broad range of dApp functions and services.

For example, a program account could be used to create a simple token contract that allows users to transfer tokens between data accounts. In this case, the program account would be responsible for executing the logic of the contract, while the data accounts would be used to store the balances of the tokens.

Something like this:

  

import {Account, DataAccount, TokenAccount, Program} from "@solana/web3.js";

// Create a new data account
const dataAccount = new DataAccount();

// Add some initial balance to the data account
dataAccount.balance = 1000;

// Create a new token account
const tokenAccount = new TokenAccount(dataAccount.publicKey);

// Check the balance of the token account
console.log(tokenAccount.balance); // 1000

// Transfer 100 tokens from the token account to another account
const recipient = new Account();
const amount = 100;

// Create a program that transfers tokens from the token account to the recipient
const program = new Program("transfer_tokens.wasm");

// Connect the data account to the program account
program.invoke(dataAccount, [recipient.publicKey, amount]);

// Check the balance of the token account again
console.log(tokenAccount.balance); // 900
}

In this example, we have created a program account called "transfer_tokens.wasm" that contains the logic for transferring tokens from one account to another. We can then connect the data account to the program account using the invoke method, passing in the data account and the arguments for the transfer as an array.

When the program account is executed, it will use the data stored in the data account to perform the token transfer. In this case, the program account would transfer 100 tokens from the token account to the recipient account.

You can test the program flow demonstrated in the example above with any other program of your choice or some of the pre-made programs in the Solana Program Library (SPL).

Solana Accounts vs. Ethereum Smart Contracts

Solana data accounts and program accounts are similar to Ethereum smart contracts, but there are some key differences including storage, calls, execution, gas, and more.

How are Solana data accounts and programs different from Ethereum smart contracts?

Solana data and program accounts differ from Ethereum smart contracts in how data is stored, contracts are called, the execution model, language support and gas.

1. Data Storage

On the Solana blockchain, data accounts are used to store data, while on the Ethereum blockchain, data is stored within smart contracts. This means that on Solana, there is a separation between the data and the logic that interacts with it, whereas on Ethereum, the data and logic are combined in a single smart contract.

2. Contract Calls

On the Solana blockchain, program accounts are triggered by incoming transactions, calls from other programs (i.e. cross-program invocations), or by the passage of time. On the Ethereum blockchain, smart contracts are triggered by incoming transactions and can also be called by other smart contracts.

3. Execution Model

Solana data accounts and program accounts are executed by the validators in the Solana network, while Ethereum smart contracts are executed by the Ethereum Virtual Machine (EVM) on individual nodes.

4. EVM Gas and Data Correlation

Solana data accounts can store an unlimited amount of data, while Ethereum has a limited amount of smart contract storage space that is determined by the amount of gas consumed during execution.

5. Language support

Solana program accounts can be written in any language that can be compiled to WebAssembly (WASM), while Ethereum smart contracts are typically written in Solidity or Vyper (a Python-based implementation of Solidity).

How are Solana data and program accounts similar to Ethereum smart contracts?

Solana data and program accounts are similar to Ethereum smart contracts in terms of smart contract functionality, decentralization, immutability, transparency and programmability.

1. Smart Contract Functionality

Both Solana accounts and Ethereum smart contracts can be used to facilitate transactions and automate processes, such as transferring assets or managing supply chain logistics.

2. Decentralization

Both Solana accounts and Ethereum smart contracts are deployed and executed on decentralized, public blockchain networks.

3. Immutability

Once a Solana data and program account or Ethereum smart contract is deployed to the blockchain, it cannot be modified or deleted.

4. Transparency

The code and data stored in Solana data and program accounts and Ethereum smart contracts are publicly accessible, allowing for transparency and auditability.

5. Programmability 

Solana data and program accounts and Ethereum smart contracts are programmable, meaning that they can contain logic and execute functions based on certain conditions. Solana, program accounts can create other program accounts, while on Ethereum, smart contracts can call other smart contracts.

How does Neon Labs' Solana EVM handle programs, accounts, and smart contracts?

Neon Labs' Solana EVM is a tool that allows developers to use Solidity/Vyper programming languages to build and deploy Ethereum smart contracts to the Solana blockchain, making it easy to port existing Ethereum dapps to Solana. Prior to the Neon EVM launch on the Solana devnet and mainnet, Ethereum dapps were incompatible with the Solana ecosystem.

The Neon EVM provides smart contracts a platform to execute as they would on the Ethereum blockchain, while taking advantage of the features that accounts ordinarily enjoy on the Solana blockchain, such as low gas fees and high throughput.

The Solana EVM works by emulating the Ethereum Virtual Machine on the Solana blockchain, allowing Ethereum smart contracts to be executed on Solana similarly to how they would be executed on the Ethereum blockchain. This means that developers can use their existing knowledge of the Solidity programming language and the Ethereum ecosystem to publish dapps on Solana.

Build Solana Accounts With Alchemy

A decentralized application built on Solana typically comprises of native accounts, data accounts, and program accounts. Native accounts represent programs on Solana, data accounts store information, and program accounts execute code on Solana. If you want to start building, register a free Solana developer account on Alchemy!

{{get-started-solana}}

Contact Us

Talk to an expert at Alchemy to answer all of your product questions.
Valid number
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Build blockchain magic with Alchemy

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

Get started for free