Bitcoin
Bitcoin is the first cryptocurrency and the most popular. The bitcoin network behind it's also open source. You can use it to build other solutions, such as SSI.
It's also the first practical implementation of blockchain technology.
How mining works?
Miners are special nodes. They have high compute needs. They're in the network and get the list of transactions not yet on the blockchain.
They run a compute-heavy hashing task to hash the block header. The variable here is the nonce. It's changed again and again until the hash is below the target hash. The puzzle is to find the nonce.
nonce means number used once.

The protocol makes sure mining a block always takes 10 minutes. The target hash is adjusted to keep the time the same.
Bitcoin Rewards
Bitcoin is rewarded to miners for the work to generate blocks. The miners can then transfer or sell it. This is how new bitcoins first enter the network.
coinbase is the name for the reward transaction. It's added to the generated block to claim the reward.
Comparing cryptocurrency with normal currency is wrong. It's better to compare it with gold. Both are mined. New bitcoins are released only when miners make a block. And both are limited in supply.
Transaction Fees
Besides the mining reward, the miner also gets transaction fees. The fees depend on the transactions in the block. When a user starts a transaction, the wallet software sets this value from many factors.
The transaction fees is also paid in bitcoins.
Miners pick transactions
Miners pick the transactions for the block. They go by the fees the user offers or other conditions. Each miner can mine any transaction it picks from the mempool.
If two miners have generated a block at same time and in case both have any transaction common,
- Some of the peer nodes will receive first generated block and it will accept it and to blockchain.
- Some of the peer nodes will receive second generated block and it will accept it and to blockchain.
- Now a temporary fork occurs. This means, two versions of the blockchain exists in the network.
- The miner that builds the third block adds it to whatever blockchain it gets from its full node.
- That blockchain becomes the longest. It becomes the active one. The other is discarded.
Gossip Protocol
The blockchain nodes talk peer to peer with the gossip protocol. A peer broadcasts the data to all connected nodes. Those nodes forward it to the next ones.
Not all nodes connect to all others in the network. A limit caps how many nodes one node connects to.
Software in nodes and miners
Nodes and miner servers run an app in any programming language. They talk to other nodes over TCP.
It's important to understand that the bitcoin network is just another software. The term sounds complex but it's just a different way of implementing a distributed system.
Network Setup

How errors are handled?
Say one full node validated and accepted a block, then forwarded it to its peers. If a peer rejects it, there is a temporary fork in the network.
The miners on the node that accepted the block keep building on it. The miners on other nodes build on the correct last block.
In the end, the blockchain with more blocks wins. The other is discarded.
Digital Signatures
The user signs the transaction using their private key. The node which receives the transaction will verify the signature using the public key. This is done using digital signatures.
Final Balance
The transactions are spread across many blocks. Unlike a bank account, a user's final balance isn't stored anywhere. It must be computed from the full transaction history.
The history is in the full chain. Frameworks add a caching or compute step though. They compute the final balances and store them elsewhere. The address of this data is linked in the block headers.