close

DEV Community

Tanya Prajapati
Tanya Prajapati

Posted on

Accounts are not just storage. They're one of the reasons Solana is fast.

This day-27 of learning Solana

For the past few days, I have explored accounts and how data is stored in those accounts.
This the summary of all those important concepts about account every Solana beginner should know.

Solana does not uses any mempool to store transactions when they are being processed. Instead, transaction are stored in a block and marked as successfully executed while they are being parallely processed. This helps in handling large number of transactions in lightening speed.

Accounts are used to store data while programs are used to store executable code (Like smart contract in EVM).

In Solana, there are more than one accoutns each with different purposes and significance.
The System Program (Owner account) : It uses owner account address which is a string of 1's. For every system , the owner address is same. However this does not means that anyone can exploit the transaction or the account.

In Solana , the address is of two types-

  1. The public key: It needs a private key which ensures the account is secure. Only the one who has private key can use that account and make transactions through it.
  2. Program Derived Address: The address is deterministically generated by a program using program ID and a set of seeds. These addresses are owned entirely by a program (smart contract). The PDA act as a specialized smart locker while the user's public key act as the account owner.

Solana uses dynamic parallel account locking -
Transactions must list every single account they intend to interact with before they run, the validator engine uses an advanced system of Read-Locks and Write-Locks. This prevents the "double-spend" problem while allowing entirely unrelated accounts to process in parallel without bottlenecking the network.

Top comments (0)