No history yet

Blockchain Transaction Basics

What is a Transaction?

A blockchain is built from transactions. Think of them as the fundamental actions that change the state of the digital ledger. While the most common transaction is sending cryptocurrency from one person to another, a transaction is simply a signed instruction.

This instruction could be a simple payment, but it could also represent creating a contract, casting a vote, or recording a piece of data. No matter the purpose, every transaction has a few key ingredients.

ComponentDescription
SenderThe address initiating the transaction.
RecipientThe address receiving the transaction's output.
ValueThe amount of cryptocurrency or data being sent.
SignatureA digital proof of authenticity from the sender.

These components are bundled together into a small data packet. This packet is the transaction itself, ready to be sent out to the network.

The Digital Signature

How can you prove you’re the one sending the funds? You use a digital signature. This isn't a scanned image of your handwritten signature. It's a sophisticated piece of cryptography that serves two critical purposes: proving ownership and ensuring integrity.

Every blockchain wallet has two keys: a public key and a private key. The public key is like your bank account number, which you can share with anyone. The private key is like your account password, which you must keep secret.

When you create a transaction, your wallet software uses your private key to generate a unique digital signature for that specific transaction. Anyone on the network can then use your public key to verify that the signature is valid and that it came from you. It’s a mathematical lock that only your private key can create.

This signature also confirms that the transaction details—like the amount and recipient—haven't been altered. If even a single character changes, the signature becomes invalid.

Lesson image

Broadcasting and Consensus

Once a transaction is signed, it needs to be recorded on the blockchain. But since the ledger is decentralized, there's no central authority to process it. Instead, you broadcast your transaction to the network.

Your wallet sends the signed transaction to a few computers (nodes) on the network. These nodes then share it with other nodes they're connected to, and so on. In moments, the transaction spreads across the entire global network like a ripple in a pond.

But just because everyone has heard about the transaction doesn't mean it's confirmed. The network needs to agree on its validity. This is where consensus mechanisms come in. A consensus mechanism is a set of rules that allows the decentralized network to agree on which transactions are legitimate and in what order they occurred.

Nodes on the network work to bundle valid transactions into a new block. Through processes like Proof-of-Work or Proof-of-Stake, one node earns the right to add the next block to the chain. Once a transaction is included in a block that's added to the chain, it's considered confirmed and becomes a permanent, unchangeable part of the ledger.

Quiz Questions 1/5

What are the two primary purposes of a digital signature in a blockchain transaction?

Quiz Questions 2/5

In the analogy of a bank account, your public key is like your __________, which you can share, while your private key is like your __________, which you must keep secret.