29th Oct 2021

Getting started with Solana

Blockchain

Written By, Bhawik Chawda

Overview

When we talk about “BLOCKCHAIN”, then the first thing which comes to our mind is “BITCOIN” or probably the most used Blockchain “ETHEREUM”, both of these are doing great in the market, but they somehow lack in speed and scalability, which is quite annoying in this fast-moving world.

So, to solve this problem, have a look at the “SOLANA” Blockchain platform which is built for its scalability, ultra-low fees, and superb high performance.

What is Solana Blockchain?

Solana is an open-source, permissionless Blockchain project that seeks to develop an ecosystem of cryptocurrency-powered products and services with high performance and scalability. What makes Solana different from other blockchains like Bitcoin or Ethereum is its transaction speed, which can handle over 50,000 transactions per second which is more than Bitcoin and Ethereum combined. Solana offers relatively lower transaction fees than many other similar blockchain networks, say Ethereum which is charging almost 200X higher fees than Solana does.
Solana follows a very different approach, which is known as a Proof of History (POH), which creates a historical record that proves that an event has occurred at a specific moment in time.

What makes Solana different?

SCALABILITY: Solana is known for its speed and can currently execute over 50,000 transactions per second whereas Bitcoin and Ethereum can only execute between 3-5 and 15-20 transactions per second.

LOW FEES: Solana charges very little fees when we compare it with most of the similar blockchain technologies running currently, it charges almost 200x less than what Ethereum does.

PERFORMANCE: Solana offers a high throughput and low latency, which claims to provide up to 50,000 transactions per second and 400 ms block time latency.
When we compare it with Ethereum it offers a so-called big block design. This means that more and more transactions can be included in a single block.

Solana wallet

A wallet is an application or a device that allows the user to store, manage and trade their cryptocurrencies, it is a collection of two keys, public and private.

The public key is known as the wallet receiving address which is shared with others to receive tokens.

The private key is needed for signing transactions to send tokens to another address or making any changes to the wallet.

There are three types of wallets on Solana i.e paper wallet, a file system wallet, and a hardware wallet, we will see a brief about paper wallet and file system wallet.

Paper wallet:

    A paper wallet is generally a collection of seed phrases written on paper. A seed phrase is generally a combination of some words which is used to generate key pairs.

1. Creating paper wallet:

        • Before creating any wallet you must install the Solana tool suite, if you have not installed it yet you can install it from here.
        • Open your favourite command prompt and execute the following command
        • solana-keygen new --no-outfile
        • After executing the above commands you will get your public key for your wallet as shown below.

File system wallet:

      1. A File system wallet is a directory on your computer system where files on the directory contain keypair.

1. Creating File system wallet:

          • Open your favourite command prompt then create one directory named my-solana-wallet and execute the below command.
          • Open your favourite command prompt and execute the following command
          • solana-keygen new --outfile ~/my-solana-wallet/keypair.json
          • After executing the above command you will get your public key for your wallet.
            image_2

Send and Receive Token

    • First, create one file system wallet and store its public key into my_wallet.json file
      solana-keygen new --outfile solana_wallet.json
    • Now we need some test tokens for transfer to the recipient address, and in Solana, we can do this by executing the following command, make sure to replace my public key with your own 😂.
    • solana airdrop 1 9Srhg3sbcx4PEVkMAXxQxfsjNJoE82g7tNrD8xSm8SyW --url https://api.devnet.solana.com
    • image_3
    • When you execute the above command you will get the signature of your transaction, which means that the token has been successfully transferred to your account and you can check your balance by executing this command.
    • solana balance 9Srhg3sbcx4PEVkMAXxQxfsjNJoE82g7tNrD8xSm8SyW --url https://api.devnet.solana.com
    • Now create another wallet to whom we can send a token, execute the below command to create a new wallet.
    • solana-keygen new --no-passphrase --no-outfile
    • image_5
    • Now it’s time to send a token from my first wallet to the second wallet address, execute the below commands to do so.
    • solana transfer --from solana_wallet.json your_wallet_address 0.5 --allow-unfunded-recepient --url https://api.devnet.solana.com --fee-payer solana_wallet.json
    • After executing the command you will receive a signature which means that the transaction has been completed.
    • When any transaction occurs in Solana it gets timestamped according to their local system clock. So, when all the clocks across the distributed network are synchronized, it will take very little time to verify a transaction.
    • Execute the below command to check the balance of your wallet.
    • solana balance your_wallet_address --url https://api.devnet.solana.com
    • Here we can see the balance which we have sent i.e 0.5 SOL.

Conclusion

Here we come to the end of our Solana Guide. In this we have discovered about the Solana Blockchain, what makes it different from other blockchains, and why it is more scalable and faster than most of the currently running blockchain. We also went into the Solana wallets, discussed their type, and how we can create a wallet, send and receive a token through the command line.

Reference:

https://docs.solana.com/introduction

Written By,

Blockchain Developer at Yudiz Solutions Pvt. Ltd