DEV Community

Techknowmug
Techknowmug

Posted on

What is Blockchain and How It Works?

Image description
A blockchain, at its most basic level, is a digital ledger of transactions stored on many different computers (called nodes) that are linked by a network. It is composed of a series of “blocks,” which are essentially digital baskets that can be filled with records of transactions. Once the transactions in a block are verified via a consensus between nodes in the network, that block is “closed” and added to the existing, unalterable, chronological chain of previous blocks.

Most often, blockchains are used to buy, sell, trade, and record the ownership of cryptocurrencies (like Bitcoin, Ethereum, and Solana) or other digital assets like NFTs. They can be used for other purposes as well, but we’ll get to those later on.

How Do Blockchains Work?

Blockchains do two main things—facilitate transactions and keep records of those transactions.

Each blockchain user has their own cryptographic keys—one public and one private. When a transaction occurs, one party sends an asset to another party using the latter’s public key as a sort of address. The receiver’s private key is then used to prove their identity so they can “unlock” and accept the asset.

The nodes in the peer-to-peer network then work to check the validity of this transaction according to a protocol agreed to by the users of the network. Once all of the transactions in a block are verified, and there is a consensus as to the order in which they occurred, the block is closed and linked to the previous block in the chain, and every node’s copy of the blockchain is updated.

Top comments (0)