Summary:
Centralization vs Decentralization
· Centralization: A central authority is in control of protocol. Decentralization: No central authority involved, and the control authority is distributed among the parties involved. E.g., Email provider is centralized, Bitcoin is to most extent decentralized.
Distributed consensus
· Distributed systems are a pattern of systems in which two or more computing systems or nodes are correlated and collaborate to work toward a common objective.
· If a value is proposed by a single correct node in a distributed system, then it needs to be accepted by all correct nodes running in the system. Only then the distributed consensus or agreement is achieved. E.g., In bitcoin if a transaction needs to be added into a block, then this transaction is broadcasted to all Bitcoin nodes and only when maximum nodes validate the transaction and come to a common consensus, it is included in the blockchain.
· Various reasons that make consensus hard are Nodes may crash, nodes may be malicious, network is imperfect in different cases like connection, faulty network, latency etc
· Byzantine generals’ problem and Fischer-Lynch-Paterson are some examples of impossibility results which mentions even a single faulty party in a network will lead to fail the consensus.
Bitcoin Consensus
· Bitcoin violates lot of assumption for creating impossibility result models and hence consensus in Bitcoin works better in practice than theory.
· As Bitcoin is a currency it can be used as incentives.
· Embraces randomness: Consensus happens over a longer period of time about an hour in practical system between specific endpoint and starting point.
· Bitcoin gives inherently probabilistic guarantee that a transaction in a block will be added to blockchain in a longer time. i.e., Consensus only has to be reached over long-time scales.
Consensus without identity: the Blockchain
· Nodes identities are needed for some specific protocols and also for identifying malicious nodes to maintain security.
· Bitcoin nodes does not have identify.
· Bitcoin is P2P decentralized system, where it is hard for an advisory to create multiple copies of nodes, this is also known Sybil attack.
· Pseudonymity is the goal of Bitcoin. (Not strong anonymity)
· In a simplified term, a transaction is a data structure that contains the signature of sender, public key of the receiver and hash that represents the pointer to the sender’s previous transaction.
· An advisory can attempt for double spending attack if only majority of the nodes are dishonest, as most of the honest nodes always picks up longest valid branch for consensus leaving the double spending attack attempt block as orphan block.
· In general double spend probability decreases exponentially with the number of confirmations, that the transaction has been included in the block. Most common heuristic: 6 confirmations.
· Protection against invalid transactions is cryptographic but enforced by consensus.
· One is never 100% sure, that a transaction is in consensus branch, but there is exponential probability that guarantees that after 6 confirmations, the transaction is included in the blockchain.
Incentives
· Since nodes do not have identity, it is hard to penalize the node that created a faulty block. So, instead rewarding the nodes that helped in consensus of the valid block creating a valid chain is the approach i.e., Incentivizing the honest nodes that help in creating a valid blockchain.
· Block reward: The node that creates each block gets to include a special transaction in that block, the special transaction is the coin creation transaction. The node owner can also specify the address to receive the coins created.
· Bitcoin halves every four year. It started with 50 Bitcoin incentives, then 25 and so on. At today’s time the bitcoin halving is 6.25 bitcoin per block.
· Transaction fee: A sender can allocate some transaction fee to the node that first creates the valid block to include the sender transaction. In the future when there will be less block rewards, nodes can allocate the transaction fee as a form of reward to include the sender transactions into the block.
Proof of work
· Instead of randomly selecting the node for block creation, nodes are selected in proportion to the computing power they have.
· In order to create a block, the nodes need to utilize the resources to solve a Hash puzzle to find a nonce. Such that when the transactions of the block, hash of previous block and the nonce is hashed, the result is quite close to the particular type of output that is similar to the solution of the hash puzzle.
· Hence, this notion solving the hash puzzle completely solve the issue of selecting random blocks. Those nodes which can solve the hash puzzle faster are selected to include their block into the blockchain.
· The process of repeatedly solving the hash puzzle is called mining, and the nodes that competes to solve the puzzle are called miners.
· Nodes automatically re-calculate the target every two weeks. If more blocks are being created, then the difficulty of the hash increases. Such that to keep the goal of average time between the block’s creation is 10 minutes.
· Probability of a node to create a block depends on the fraction of global hash power the node controls.
Mining economics
· Basically, if the mining rewards (i.e., block rewards and transaction fees) is greater than hardware and electricity cost then the miner will make profit.
· Significant cost for bitcoin mining is the variable cost from electricity.
· Since, the exchange rate of bitcoin varies over time, rewards are also dependent on the exchange rate.
· Bitcoin has three types of consensuses:
o Value: Amount of Bitcoin earned or owned
o Rate: Exchange rate of bitcoin.
o Rules: Rules are changed depending on the requirement of the protocol. It can be done by hard or soft fork.
· Bitcoin system acquired the process of bootstrapping by involving the properties like security of block chain, value of currency and health of mining ecosystem.
· Hypothetically, 51% attacker is not possible in bitcoin. Even an invalid branch is the longest, somewhere in the long run honest nodes can find that the branch is not valid and starts creating another branch from last valid block. This is known as forking. But practically developer will find the invalid branch before it extends too long hence, rectifying it.
Two questions were raised by the user: The question was viewed 307 times.
Answers with the highest scores for the question are:
If the newly created bitcoin-core node has genesis block included in the installation?
- Yes, the bitcoin core even created freshly will have all the current valid block in the blockchain including the genesis block.
And can malicious peer give node wrong chain to the freshly downloaded blockchain? Is this attack possible and how is it mitigated in bitcoin?
- There is no way for the chain to be "wrong" without the node noticing it. The node will reject it if it is invalid. If a longer chain exists, the shorter chain will be rejected by the node. It is not incorrect if it is the longest valid chain.
Malware info:
· Malware: https://sourceforge.net/projects/kyeautoclicker/postdownload
· Windows 7 Professional 32bit
· A fully-fledged auto-clicker for all clicking needs.
How did it work?
The software drops executable file immediately after starts. (chrome.exe (PID:2956)).
- Then the malware modifies some files in chrome extension folder
- It then drops a file with a compile date too recent.
- Checks for supported languages
- Reads the name of the computer
- Checks windows trust settings
- Reads settings of system certificates
- Reads the data of windows installation.
Observations:
Observing some patterns on how the malware was first introduced and installed in the system, seems pretty straight forward tactics of injecting a system by introducing some executables deceived in the form of some normal application. The MITRE Attack shows some models used as well like persistence, defense evasion and Discovery.
Can Malicious peer hack freshly installed bitcoin-core node. (n.d.). Https://Bitcoin.Stackexchange.Com/Questions/61845/Can-Malicious-Peer-Hack-Freshly-Installed-Bitcoin-Core-Node.
Coursera. (n.d.). Introduction to Crypto and Cryptocurrencies. Https://Www.Coursera.Org/Learn/Cryptocurrency/Lecture/GFEJL/Cryptographic-Hash-Functions.
1 https://any.run