Purpose of this section is to give more in-depth info on different blockchain consensus mechanisms.
Consensus Mechanisms/Protocols: Algorithms (calculation processes) that allow for the secure updating of a blockchain ledger. Usually performed by decentralized user nodes. The more extensive and widely distributed the user nodes (participants) are, the lower the probability of collusion and corruption, within the system. This is because it becomes more difficult to communicate in order to collude; in order to control the system.
Note: underlined terms are defined further in the "Glossary" sections.
Proof of Work: Bitcoin's Consensus Protocol
The Chill Explanation for Proof of Work (PoW): A bunch of different people, from around the world, use their computers to calculate that everything happening in the system is correct. Participants get compensated/rewarded for using the energy and bandwidth (“work”) of their computers.
Now, let’s get gritty...
Proof of Work- Bitcoin consensus mechanism that involves mining blocks, using the SHA-256 algorithm. The process of mining is the “work” being proved. Mining blocks-
A miner builds a candidate block of transactions to be verified, including the header from the previous block, and that miner’s potential reward check. Then that miner calculates the hash id of that block (including the nonce) to see if it fits the difficulty target.
When a miner receives a new block, they know that they lost the race for the block they had just been working on, and it’s time to start racing to mine the next block.
Ex. Every 10 minutes, a miner takes thousands of transactions that are unconfirmed/outstanding, and performs validations to determine rules are met. Once this rule-meeting block is constructed, then that miner tries to find a nonce that makes the header fingerprint match the designated difficulty level.
Blocks get built in a chain that can reference everything down to the past. Difficult to corrupt the network because in order to take control of the network, a user would have to exactly reproduce every transaction process of the blockchain, up to the current point in time, including software bugs. This is extremely time and energy prohibitive. Thus, the more established (longer) the blockchain becomes, the more difficult it is to corrupt.
Every user node (participant) running that blockchain will include every block ever mined, including the first (genesis) block; each block is kept as a constant in the code.Each node is able to independently verify every transaction on that blockchain.
Mining uses a lot of electric power, thus the cost of electricity is an economic factor in mining (potential constraint).
In order to participate, miners have to incur costs (energy), for the possibility of rewards (coins). This helps keep the system honest because if users spend money on energy, and play fair (using SHA-256; correct inputs to try and produce correct outputs), then users may be rewarded with money back. It doesn’t pay to cheat. It takes too much energy, just to end up with a non-verifiable hash/output.
Network bandwidth is an economic factor in mining (potential constraint), because if a miner has poor bandwidth relative to other miners, it puts them at a disadvantage in winning the race to be the validated block.
Use, scale and capacity-
A secure transaction settlement takes time to verify, which affects scalability.If tons of everyday transactions (i.e. buying a cup of coffee) happen on a blockchain, then the capacity must be able to handle all those transactions.Or, many of these transactions can happen on overlay networks (with eventual settlement) which preserves the benefits of using the blockchain, without flooding the network.
Proof of Work Glossary:
Occurs when the network decides to make a change to the system. Usually begins as discussion within the development community, then is examined and tested (usually in a testnet safe chain duplicate). Subject to participants in the system (those who run nodes of that blockchain), including developers, miners, exchanges, wallets, and merchants.
Upgrading to a new consensus protocol becomes increasingly difficult over time, due to the former protocol being diversely and extensively ingrained in decentralized systems; harder and harder to pool all participants to officially change the entire network
There is incentive to comply with new consensus, because if a miner works against a new consensus agreement protocol, they are essentially burning energy for nothing.
“The best protocol doesn’t win. The protocol that’s good enough, and achieves network scale first, wins.” -Andreas Antonopoulos
Sets the number of bits (usually leading zeros) required in the nonce (of a hash), to mine a given block. The lower the difficulty target, the harder it is to find the numbers. For example, if the difficulty target is to get two zeros at the front of the hash function, then you have to brute force run (“work”) as many attempts as it takes to produce a hash that leads with the two zeros.
Target is adjusted by the system to help ensure that blocks are mined within a certain time target; makes sure coins are being released into circulation, at the rate specified by the network.
The difficulty of the algorithm can be set to an arbitrary target, and the cumulative difficulty of a given chain is referred to as "chain weight".
Race condition where Miner A and Miner B produce a valid block at aproximately the same time; two competing blockchains are being propagated around the world (via P2P network nodes). When Miner C begins building a candidate block using the inputs (header) from Miner A’s block, then they are effectively voting for that received block, as the valid block; continuing the chain with Miner A’s block as the valid one; Miner B’s block is therefore losing. The chain that ends up longer (based on miners building new blocks on it) wins the race condition; the other blockchain is abandoned.
Acts as an identification fingerprint for the block data, written in hexadecimal format. Takes a lot of energy to perform the number of hash operations needed to mine a block with a low difficulty target.
Data input that is used to produce the desired hash output. Known data that represents all transactions in the previous block, as well as date, time, etc. Component in a block that contains the hash of the previous block.
Base 16 number system that simplifies how binary (base 2 number system) is represented.
Uses 0,1,2,3,4,5,6,7,8,9 and a,b,c,d,e,f = 16 characters
A represents 10
B represents 11
C represents 12
D represents 13
E represents 14
F represents 15
Ex. the number 231 would be represented as E7. E sixteens + 7 ones; (14*16) + 7; 224+7 = 231
Note- we commonly use a base 10 number system in everyday life (0-9).
The delay before data begins following an instruction for its transfer. Poor bandwidth causes latency issues. As block size increases, miners with poorer bandwidth are at a greater disadvantage. For example, propagating a 1mb block to 8 nodes takes a certain amount of time. Propagating an 8mb block to those same 8 nodes, takes 8 times as long.
Random numbers added to the header to try and meet that block’s difficulty target for validation. Finding the correct nonce is what finally makes a miners proof of work able to be validated. In the Bitcoin core network, the nonce is usually the number of leading zeros, on a hash.
Component added to beginning of every candidate block that pays the miner a certain amount (i.e. 25 BTC). So, if that miner properly mines the constructed block, they get a lot of money. If that block gets created (that miner wins the race to mine the block), then 25 new bitcoins enter the system, in the form of that miner's reward. Reward is only granted to longest valid chain (see fork section).
In Bitcoin Core, you cannot spend your reward in less than 100 blocks, in order to ensure what the longest valid chain is.
Software codes containing functions are used to evaluate block data for compliance to a system’s rules.
Example rules include:
Transactions must be properly signed
Transactions may not have been spent before
Outputs are properly formatted
Can’t spend mining rewards in less than 100 blocks
Miners can only pay themselves a reward at the correct rate for whatever block the network is at (i.e. 25 BTC reward, based on block number)
Bitcoin Core Implementation Guide, written in C++, contains functions that evaluate block data for Bitcoin’s rule compliance.
Original proof of work algorithm that takes data input of any size and mixes it up, to produce a fixed output that is a 256 bit long hash. Output appears random, but is in fact, deterministic (same inputs will always generate the same output); can be used to proof a data set.
If only one bit (piece of data) is changed (i.e. “HELLO” to “HELLo”), then the hash/fingerprint/outcome can be TOTALLY different (i.e. A$GN009&^ to J7^65kU00PL7). This allows users to “fingerprint” data, generating a unique id for PDFs, software downloads, statements, etc.
History- originally developed to prevent spammers on message boards. The extra effort it took to compute a hash for their post was worth it to legitimate participants, but not to spammers.
When other miners in the network examine a candidate block to determine if outlined (universal) transaction and block rules are met. Validating miners vote on a block by using it as the input (header) for the next block they are trying to mine.
BA in Economics. BS in Finance. Hostess of the Crypt Keepers’ Club. Passionate about research, and processing data. I don’t fold sheets, I spread them.
Connect with Me:
Note that you must be logged into Facebook to be directed to my page.
DISCLAIMER: Information is constantly changing, especially in cryptocurrency. Do more research. Be accountable for your decisions. ALL INVESTMENTS ARE DONE SO AT YOUR OWN RISK!
Have something constructive to add? Do so in this comment box, below. BE KIND! Insecure egos do not appeal to anyone's better nature.