3-Design Primitives of Blockchain
3-Design Primitives of Blockchain
PERMISSIONS PRIVACY
“PROTOCOLS IN BLOCKCHAIN”
In computer science, a protocol is a set of rules or procedures that govern
the transfer of data establishing how, in order for computers to exchange
information, the information must be structured and how each party will
send and receive it.
This distributed ledger works on pre-defined rules which are agreed upon
by all the participating nodes (the peers) in the network. These rules
include:
RULE 1
RULE 2
HOW TO GOVERN & RULE 3 (IN SOME
VALIDATE CASES)
USING AN ALGO THAT
TRANSACTIONS
DEFINES THE APPLICATION
MECHANISM FOR ALL PROGRAMMING
PARTICIPATING NODES INTERFACES
TO INTERACT WITH
EACH OTHER
The world got introduced to the blockchain with the Bitcoin network.
Following different objectives and use cases that were envisioned, different
protocols were designed. We will look at the key features of three major
blockchain protocols.
• Bitcoin Protocol
• Ethereum Protocol
Bitcoin Protocol
Design objective: allowing crypto payment transactions over a
decentralised network.
OR
The Ethereum blockchain gave a larger, wider horizon to the objectives that
blockchain could serve. Multiple cryptocurrency projects such as VeChain
and OmiseGo were launched using the Ethereum platform. It also became a
platform for dApp development and dApps such as Cryptokitties, Brave, and
PundiX were developed on it.
Essential features of a blockchain protocol
• Transactions and Smart Contracts
Blockchains are essentially ledgers and record transactions. A
transaction with respect to blockchain refers to an exchange of assets
manages under the rules (smart contracts) of the blockchain.
• Consensus and Trustlessness
All peers on a blockchain network reach a consensus to verify
transactions. This consensus is governed by an algorithm fed into the
protocol layer of the blockchain. The blockchain gives all peers an
identical copy of each transaction which eliminates trust thus making
a trust less, distributed network.
(2) It should be easy and fast for others to verify the proof in terms of its
correctness.
For the first property, one must design a proof of work challenge such that
computing a valid proof of work is difficult with low and somewhat random
probability, thus a lot of trial and error is needed.
We illustrate how the PoW works in terms of BGP. When the troops on the
east of the city want to send a message to the west side troops, it follows
the steps of the PoW protocol:
(1) Append a “nonce" (usually start with zero) to the original message,
which is a random hexadecimal value;
(2) Apply hash to the nonce augmented message and check if the hashing
result is less than or equal to a preset value (say starts with five zeros);
(3) If the hash condition is satisfied, the troops on one side of the city will
send the messenger to the troops on the other side of the city with the hash
of the message and the nonce. If not, then increase the nonce by one and
this process iterates until either the desired result is obtained. Finding the
right nonce can be time consuming and computationally expensive;
(5) Repeat the above process for multiple iterations such that multiple
messengers are sent from the east side troops to the west side troops
through the city.
This last step is to address a possible loophole with sending only one
messenger: If the city captured the messenger, got the message, tampered
with it and then accordingly by changing the nonce until the right nonce
value is found such that the desired hash result with required number of
zeros is obtained. Even though this process is computationally costly and
time consuming, it is still possible. The PoW protocol counters this loophole
by increasing strengths in numbers. First, by adding more messengers, the
probability of all of them get caught is reduced significantly. Second, even
some of them got caught, the amount of time required to tamper the
cumulative message and find the corresponding nonce for the hash will be
increased substantially. For a block to be valid in the blockchain, a miner
has to be able to hash it to a value less than or equal to the current target
and then presents its solution to the network for verification by other
nodes. The dual properties of PoW ensures that it is extremely difficult and
time consuming to find the right nonce for the appropriate hash target; and
yet it is super easy and simple to validate the hash result so that no
tampering has been made.
“Privacy and Permission”
In contrast to public blockchains, which everyone can read, write
transactions to, and participate in the consensus process, there is a wide
range of other options on how a blockchain might be designed and
implemented. As mentioned above, if only certain participants can join the
peer-to-peer network, the blockchain is considered permissioned or
private. The two main permissioned types of blockchains can be
categorised as:
The ability to read from the blockchain can also be restricted by different
levels of abstraction, for example, only the root hashes can be made public .
• The private blockchain is more efficient: only trusted peers, with a very
high processing power, are used to verify transactions.
“Security”
Blockchains are secured through a variety of mechanisms that include
advanced cryptographic techniques and mathematical models of behaviour
and decision-making. Blockchain technology is the underlying structure of
most cryptocurrency systems and is what prevents this kind of digital
money from being duplicated or destroyed.