Nodes Which Can Add Blocks
Let us begin by covering the main participants in the blockchain nodes which can add blocks to it. They depend on the consensus rules being enforced and require at least one full archival node to operate.
A concept you might already be familiar with, miners are actually nodes which aim to prove that theyve completed the required work to create a block. Hence the consensus name Proof of Work. To complete the task, as I mentioned above, miners need to either be an archival full node themselves or receive data from other full nodes on the network to know the current status of the blockchain and the required parameters for the next block in line.
Participants in the process employ hardware components to solve a cryptographic problem. The first person to complete the task broadcasts his results to the network so it can be verified by full nodes and once consensus is achieved he is granted the right to add a block to the existing blockchain. For their work, miners are rewarded a pre-defined amount of coins in addition to any transaction fees for the block. This set reward amount is called coinbase or a coinbase transaction. Considering its the first transaction in the block, its free of charge, as the miner himself created the block and included it.
- Easy to understand and follow concept of proving your involvement
- Opportunity to work in tandem with others and increase the rate of receiving rewards
- Solo endeavor, due to lack of transparency in staking pools
The Emergence Of Segwit
In 2017, Segregated Witness went into effect across all Bitcoin nodes. Note I wont go into all the details of SegWit but if you want to learn about its history and its role in the emergence of the Bitcoin Cash hard fork, take a look at this article:
It does what the name sounds like it does segregating the witness part of each transaction from the actual transaction data. It occurred as a soft fork, so it was instituted without any major effects on the existing blockchain network and code. Due to the way that the witness transaction would be weighted, the new SegWit-enabled Bitcoin blocks could be theoretically increased to up to 4MB without changing the Bitcoin block size.
I say theoretically because there are additional factors that contribute to the final size of the SegWit block. In fact, if you check a Bitcoin blockchain explorer, youll see that the average block size is still under 1MB.
But that isnt to say that blocks cant go past 1MB. In early 2018, we witnessed one of the largest block sizes generated, coming in weighing around 2.1MB. SegWits soft fork has helped improve block size without changes to the core code, but it still does not improve TPS in a scalable manner.
Bitcoin Block Headers And Mining
The Bitcoin network fundamentally relies on a decentralized network of nodes that maintain the distributed public ledger of all bitcoin transactions. Network nodes may also participate in a process called mining, which secures the network and ensures the authenticity of new blocks and the transactions they contain. Miners are responsible for writing new blocks to the blockchain, so their role in verifying the integrity of information contained within a proposed block is paramount. The Bitcoin block time is ten minutes , so around six new blocks are written to Bitcoin every hour.
The block header contains 80 bytes of cryptographically verifiable information:
Version: This 4-byte field indicates the version number of the Bitcoin protocol being used, and typically contains the value 1.
hashPrevBlock: This 32-byte field contains a 256-bit hash of the previous block header.
hashMerkleRoot: This 32-byte field contains a 256-bit hash of the root of the Merkle tree of all the transactions in the current block.
Time: This 4-byte field contains a timestamp of the current block that is used to situate it chronologically in the blockchain.
Bits: This 4-byte field contains the target difficulty of the current Bitcoin block which determines how difficult the target hash will be to find.
Nonce: This 4-byte field contains a 32-bit number that a miner must alter in order to correctly solve the computational puzzle for the current block.
You May Like: How To Receive Crypto On Coinbase
Transactions On A Blockchain An Example
To understand more about how transactions work on the blockchain, lets look at a simple example about how the Bitcoin blockchain is programmed to function:
Conventionally, if Priya wants to send Rs 1,000 to her friend Ankit, she notifies her bank by initiating the transaction.
After verifying that Priya has the funds to perform the transaction, the bank updates its database.
Priyas bank balance in the database is reduced by Rs 1,000 and Ankits balance is increased by the same amount. In this example, it is assumed Ankit uses the same bank as Priya.
If Priya wants to perform a similar transaction, but send Bitcoin instead, the process is different. Here, a centralised entity like a bank does not perform checks, and does not update balances.
There is no singular entity responsible for this. Instead, all the nodes of that particular blockchain will have to be involved in the transaction, due to its decentralised design.
For her to send one Bitcoin to Ankit, Priya must first know Ankits public key and then broadcast a message in the network so that other nodes can see it.
The nodes, or the users, then set out to solve a puzzle set out by the protocol, which requires them to hash transactions and other information in the block.
This is referred to as mining, and those performing this task are called miners. The miners must keep hashing data until a valid solution is found to the puzzle and the Bitcoin can be sent to Ankit.
What Is Block Height
The block height of a particular block is defined as the number of blocks preceding it in the blockchain. A blockchain is an encrypted database that records a ledger of transactions sequentially in data structures known as blocks. Blockchains are used as the underlying technology for cryptocurrencies such as Bitcoin.
Block height can either reference the location of a transaction that has been completed in the past’s location in the blockchain, or refer to the present length or size of a blockchain. A block height chart is indicative of how steadily new blocks are being discovered on the blockchain as time passes, amid varying mining difficulty levels.
As of April 2021, the block height for the Bitcoin blockchain exceeds 677,350 blocks, with approximately 144 new blocks added daily.
Don’t Miss: How Best To Buy Bitcoin
What Is Blockchain Technology
In simple words, blockchain is a combination of two words block and chain. It is a system of storing information such as digital transactions in a way that cannot be changed. The Block stores the information and the Chain is the record of the Blocks. It is Blocks of information that sit on a chain also known as a Digital Ledger.
Think of Blockchain as a type of advanced database that captures, records, and replicates data to make sure it is accurate.
Bitcoin Vs Ethereum Energy Consumption
Bitcoin remains the most energy exhaustion cryptocurrency. When comparing Ethereum and Bitcoin, Ethereums Proof of Stake consensus aims to reduce 99% of its energy consumption. In comparison, Bitcoins PoW continues to surge, where it already exceeds the total energy consumed in the whole of Switzerland. With the migration to ETH 2.0, the network is supported by validators instead of miners. Hence, its more sustainable and leaves a lesser carbon footprint on the environment.
Recommended Reading: How To Buy Crypto Assets
Beyond Bitcoin: Ethereum Blockchain
Originally created as the ultra-transparent ledger system for Bitcoin to operate on, blockchain has long been associated with cryptocurrency, but the technology’s transparency and security has seen growing adoption in a number of areas, much of which can be traced back to the development of the Ethereum blockchain.
In late 2013, Russian-Canadian developer Vitalik Buterin published a white paper that proposed a platform combining traditional blockchain functionality with one key difference: the execution of computer code. Thus, the Ethereum Project was born.
Ethereum blockchain lets developers create sophisticated programs that can communicate with one another on the blockchain.
Block Header In Blockchain
The header of an Ethereum block contains different fields of metadata which are listed below.
- Hash of the previous block: Every block header gives information about the previous or parent block. This field contains the hash value of the previous block and this reference connects all the blocks. The size of this field is 32 bytes.
- Version: This field stores the version number to show software upgrades. The size of the version field is 4 bytes.
- Difficulty: The mining difficulty at the time of the block creation is stored in this field. The concept of mining would be explained in the upcoming articles. Its size is 4 bytes.
- Timestamp: This field contains the time at which the block was created. The size of this field is 4 bytes.
- Nonce: A nonce is a value used during the mining of the block. This fields size is also 4 bytes.
- Merkle tree root: A Merkle tree is a structure obtained from hashing the transactional data of a block. The root of this tree is stored in the block header under this field. 32 bytes is the size of the Merkle tree root field.
This was all about the header of a block. In the next part, I am going to give you an idea about the properties of a block.
Also Check: What Crypto Coins Can Be Mined
How Often Are New Blocks Added
A new block is added to the Bitcoin blockchain roughly every 10 minutes. The system was in fact designed to maintain an approximately ten-minute buffer between blocks by Satoshi Nakamoto in order to give other miners on the network, competing to add the latest block, time to register that the new block has been added and quit expending resources on mining an already validated block.
There is no magic number this was just the number that Satoshi Nakamoto judged as the best balance between promoting speed and reducing computational waste within the network.
It takes roughly 1 minute for other nodes on the network to register that a new block has been added. During this time, miners on the network continue to expand the computational energy required to guess the answer to the cryptographic puzzle at the heart of the proof of work consensus algorithm. That means roughly 1 minute out of every 10 minutes constitutes wasted energy. Reducing the time between blocks would increase the speed of the network but also, proportionately increase waste.
To maintain this 10-minute buffer, the difficulty of the cryptographic puzzles is automatically adjusted according to the amount of computing power on the network. This way, whether fewer miners with lesser overall power are competing or the network is at peak mining competition, the cryptographic puzzles take roughly the same amount of time to solve.
Blockchain In Bitcoin Cryptocurrency
In Bitcoin, the blockchain refers to all transactions that have ever been executed in the network. The list constantly grows bigger as more blocks are added to it. Each new block consists of the confirmed transactions that have been executed at a certain time. Once a transaction is executed it propagates to the peer-to-peer bitcoin network but it does not become part of the blockchain until it is verified through a process called mining. In mining, certain nodes of the network called “miners” compete with each other to validate the unconfirmed transactions and add them to a new block by trying to solve a difficult mathematical problem based on the cryptographic hash SHA256 .
Don’t Miss: Why Is Crypto Going Down Again
What Is The Maximum Number Of Blocks
There is no maximum number, blocks just keep getting added to the end of the chain at an average rate of one every 10 minutes.
Even when all 21 million coins have been generated?
Yes. The blocks are for proving that transactions existed at a particular time. Transactions will still occur once all the coins have been generated, so blocks will still be created as long as people are trading Bitcoins.
What Is The Bitcoin Blockchain
The blockchain is a distributed, public ledger that contains the history of every bitcoin transaction. Anyone can download a copy of the blockchain, and it can be inspected to trace the path of bitcoins from one bitcoin transaction to another. It should be noted that while there is a record of every bitcoin transaction ever made, these transactions are not inherently linked to real life identities. For this reason, Bitcoin is considered pseudonymous.
Bitcoins themselves are not files stored on your computer’s hard drive like MP3s or PDFs. Rather “owning bitcoins”, means owning a bitcoin address, which has a balance recorded on the blockchain. What it means to own a bitcoin address is to control the associated , and therefore allow the signing of transactions.
Recommended Reading: What Are The Disadvantages Of Cryptocurrency
How Can I View The Blockchain
There are many ‘block explorer’ services which allow you to look at what’s in the blockchain. One example is .You can look at recent blocks here: Or you can look at a specific transaction here:
Linking Blocks In The Blockchain
Bitcoin full nodes maintain a local copy of the blockchain, starting at the genesis block. The local copy of the blockchain is constantly updated as new blocks are found and used to extend the chain. As a node receives incoming blocks from the network, it will validate these blocks and then link them to the existing blockchain. To establish a link, a node will examine the incoming block header and look for the previous block hash.
Lets assume, for example, that a node has 277,314 blocks in the local copy of the blockchain. The last block the node knows about is block 277,314, with a block header hash of 00000000000000027e7ba6fe7bad39faf3b5a83daed765f05f7d1b71a1632249.
The bitcoin node then receives a new block from the network, which it parses as follows:
Looking at this new block, the node finds the previousblockhash field, which contains the hash of its parent block. It is a hash known to the node, that of the last block on the chain at height 277,314. Therefore, this new block is a child of the last block on the chain and extends the existing blockchain. The node adds this new block to the end of the chain, making the blockchain longer with a new height of 277,315. Figure 7-1 shows the chain of three blocks, linked by references in the previousblockhash field.
Also Check: Should I Buy Bitcoin Or Bitcoin Cash
What Is The Byzantine Generals Problem
Image Courtesy: Medium
Ok so imagine that there is a group of Byzantine generals and they want to attack a city. They are facing two very distinct problems:
- The generals and their armies are very far apart so centralized authority is impossible, which makes coordinated attack very tough.
- The city has a huge army and the only way that they can win is if they all attack at once.
In order to make successful coordination the armies on the left of the castle send a messenger to the armies on the right of the castle with a message that says ATTACK WEDNESDAY. However, suppose the armies on the right are not prepared for the attack and say, NO. ATTACK FRIDAY and send back the messenger through the city back to the armies on the left.
This is where we face a problem.
A number of things can happen to the poor messenger. He could get captured, compromised, killed and replaced with another messenger by the city. This would lead to the armies getting tampered information which may result in an uncoordinated attack and defeat.
This has clear references to blockchain as well. The chain is a huge network how can you possibly trust them? If you were sending someone 4 Ether from your wallet, how would you know for sure that someone in the network isnt going to tamper with it and change 4 to 40 Ether?
What these generals need, is a consensus mechanism which can make sure that their army can actually attack as a unit despite all these setbacks.
Bitcoin Stats & Facts
Bitcoins blockchain electricity consumption generates carbon emissions comparable to the levels produced by Kansas City or countries like Jordan or Sri Lanka.
Bitcoin miners generate annual emissions of carbon dioxide of between 22 and 22.9 megatons, according to a Technical University of Munich study published in the journal Joule. The study suggests that carbon dioxide emissions would be twice as high if other cryptocurrencies were taken into account.
The highest-ever price for a single Bitcoin by January 2021: $41,940.
BTC prices reached an all-time high on January 8, 2021. The worlds best-known cryptocurrency gained value for the first time in October 2009, when 5,050 BTC were sold for a little more than $5. The current Bitcoin price is about $33,529.
If youre doing your own Bitcoin research, you may have come across the term sats crypto. Sats is short for Satoshis, the smallest unit of BTC. One Satoshi equals 0.00000001 BTC or one hundred millionth of a Bitcoin. Remember, Bitcoin current value readings are transient. The currencys value can change in a matter of hours.
At the moment of writing, the global Bitcoin hash rate was 150,096,000 TH/s.
A hash rate is defined as the number of hash operations in a given time period. Its a useful measure for the processing power of blockchain networks. For example, when the blockchain network reaches a hash rate of 10 TH/s, it means that it makes 10 trillion calculations per second.
Also Check: How To Pay Someone Using Bitcoin