获取Tangem

How a blockchain works

A blockchain is a database storing cryptocurrency transactions records. Public blockchains are decentralized, as they are stored on thousands of computers at once and managed automatically as per their protocols.

A decentralized blockchain network has nodes storing copies of the blockchain. Nodes process transactions, mine new blocks and exchange them within a blockchain. The nodes creating new blocks are called miners or validators, depending on the blockchain.

To put it simply: a blockchain is a database of linked blocks. Each block stores thousands of crypto transactions records.

You would need a crypto wallet to interact with cryptocurrency. It is an application or device to generate transactions and send them to a blockchain. Upon initial setup, a crypto wallet generates a private key to sign transactions and a public key to verify transactions. The public key is converted into a crypto address to accept transactions.

To put it simply: a crypto wallet doesn't store currency, it stores keys required to sign a crypto payment or transfer.

schemaen.png

1. When you type a recipient's address and amount in your crypto wallet, it generates your transaction and uses your private key to generate an electronic signature. The crypto wallet sends the digitally signed transaction to a blockchain node it knows.

2. The blockchain node verifies the electronic signature. If it matches your address and the address has enough funds, the transaction is legitimate. Then the nodes transfer it to other nodes.

3. Miners or validators include the transaction in a new block. The node that mined the new block first sends it to the other nodes. Blocks with your transaction that other miners or validators created are rejected.

4. Nodes that received the new block with your transaction start verifying it. Each block of the blockchain depends on the previous block, and if it is discovered that the new block does not match the previous block, it will be rejected. If everything is fine, the nodes will add your block to their copies of the blockchain.

5. As soon as a considerable amount of blockchain copies keep the block with your transaction, the transaction will be considered completed. A recipient can see the received funds on the address, while the balance of your address will reduce.

To put it simply: to send crypto, the transaction has to be signed with the sender's private key, verified by a special validating blockchain node, and added to the blockchain later.