MB Notes
MB Notes
1. Write briefly about how blockchain works, and what benefits, features, and
limitations of blockchain.
Blockchain is a distributed ledger technology that allows multiple parties to securely
and transparently exchange data without the need for a centralized intermediary. Here's
a simplified explanation of how blockchain works:
- A transaction is initiated
- The transaction is verified
- The transaction is added to a block
- The block is added to the chain
- Consensus is maintained
- The blockchain is immutable
Benefits,
Decentralization
This is a core concept and benefit of blockchain. There is no need for a trusted third
party or intermediary to validate transactions; instead a consensus mechanism is used
to agree on the validity of transactions.
As blockchains are shared and everyone can see what is on the blockchain, this allows
the system to be transparent and as a result trust is established.
Immutability
Once the data has been written to the blockchain, it is extremely difficult to change it
back. It is not truly immutable but, due to the fact that changing data is extremely
difficult and almost impossible, this is seen as a benefit to maintaining an immutable
ledger of transactions.
High availability
As the system is based on thousands of nodes in a peer-to-peer network, and the data is
replicated and updated on each and every node, the system becomes highly available.
Highly secure
The current model in many industries such as finance or health is rather disorganized,
wherein multiple entities maintain their own databases and data sharing can become
very difficult due to the disparate nature of the systems. But as a blockchain can serve
as a single shared ledger among interested parties, this can result in simplifying this
model by reducing the complexity of managing the separate systems maintained by
each
Faster dealings
Cost saving
As no third party or clearing houses are required in the blockchain model, this can
massively eliminate overhead costs in the form of fees that are paid to clearing houses
or trusted third parties.
Features,
DISTRIBUTED CONSENSUS
TRANSACTION VERIFICATION
Any transactions posted from nodes on the blockchain are verified based on a
predetermined set of rules and only valid transactions are selected for inclusion in a
block.
PLATFORMS FOR SMART CONTRACTS
A blockchain is a platform where programs can run that execute business logic on
behalf of the users. As explained earlier, not all blockchains have a mechanism to
execute smart contracts; however, this is now a very desirable feature.
Blockchain enables the transfer of value between its users via tokens. Tokens can be
thought of as a carrier of value.
GENERATING CRYPTOCURRENCY
This is an optional feature depending on the type of blockchain used. A blockchain can
generate cryptocurrency as an incentive to its miners who validate the transactions and
spend resources in order to secure the blockchain.
SMART PROPERTY
For the first time it is possible to link a digital or physical asset to the blockchain in an
irrevocable manner, such that it cannot be claimed by anyone else; you are in full
control of your asset and it cannot be double spent or double owned.
PROVIDER OF SECURITY
Blockchain is based on proven cryptographic technology that ensures the integrity and
availability of data.Other security services such as nonrepudiation and authentication
are also provided by blockchain as all actions are secured by using private keys and
digital signatures.
IMMUTABILITY
This is another key feature of blockchain: records once added onto the blockchain are
immutable.
UNIQUENESS
This feature of blockchain ensures that every transaction is unique and has not been
spent already. This is especially relevant in cryptocurrencies where much desirable
detection and avoidance of double spending are a key requirement.
SMART CONTRACTS
Limitations,
Data privacy: While blockchain technology provides a high level of security and
transparency, there are still concerns around data privacy, especially when it
comes to sensitive or confidential information.
User experience: Some blockchain applications can be complex and difficult for
users to understand and interact with, which can limit their adoption and use.
PROOF OF WORK
This type of consensus mechanism relies on proof that enough computational resources
have been spent before proposing a value for acceptance by the network. This is used
in bitcoin and other cryptocurrencies. Currently, this is the only algorithm that has
proven astonishingly successful against Sybil attacks.
PROOF OF STAKE
This algorithm works on the idea that a node or user has enough stake in the system;
for example the user has invested enough in the system so that any malicious attempt
would outweigh the benefits of performing an attack on the system. This idea was first
introduced by Peercoin and is going to be used in the Ethereum blockchain.
DEPOSIT-BASED CONSENSUS
Nodes that wish to participate on the network have to put in a security deposit before
they can propose a block.
PROOF OF IMPORTANCE
This idea is important and different from Proof of Stake. Proof of importance not only
relies on how much stake a user has in the system but it also monitors the usage and
movement of tokens by the user to establish a level of trust and importance. This is
used in Nemcoin.
Used in the stellar consensus protocol, nodes in this protocol keep a group of publicly
trusted peers and propagates only those transactions that have been validated by the
majority of trusted nodes.
REPUTATION-BASED MECHANISMS
As the name suggests, a leader is elected on the basis of the reputation it has built over
time on the network. This can be based on the voting from other members.
Practical Byzantine Fault Tolerance (PBFT) achieves state machine replication, which
provides tolerance against Byzantine nodes. Various other protocols, including but are
not limited to PBFT, PAXOS, RAFT, and Federated Byzantine Agreement (FBA), are
also being
3. Explain the birth of the blockchain along with the history of the blockchain.
Blockchain technology was first introduced in 2008 with the publication of a whitepaper
titled "Bitcoin: A Peer-to-Peer Electronic Cash System" by an unknown person or group
of people using the pseudonym "Satoshi Nakamoto". The whitepaper described a
decentralized, digital currency system that would allow for secure, peer-to-peer
transactions without the need for a trusted third party such as a bank.
The first implementation of blockchain technology was the Bitcoin blockchain, which
was launched in 2009. The Bitcoin blockchain is a decentralized, public ledger that
records all Bitcoin transactions in chronological order. The ledger is maintained by a
network of users called "nodes" who validate and confirm transactions.
Since then, blockchain technology has been adopted in various industries, including
finance, supply chain management, healthcare, and more. It has also inspired the
development of new technologies and platforms, such as decentralized finance (DeFi)
and non-fungible tokens (NFTs).
Data can be stored directly in a blockchain, and with this, it does achieve
decentralization, but a major disadvantage of this approach is that blockchain is not
suitable for storing large amounts of data by design. It can store simple transactions and
some arbitrary data but is certainly not suitable for storing images or large blobs of data,
as is the case in traditional database systems. A better alternative is to use distributed
hash tables (DHTs). DHTs were originally used in peer-to-peer file sharing software,
such as BitTorrent, Napster, Kazaa, and Gnutella. BitTorrent turns out to be the most
scalable and fast network, but the issue is that there is no incentive for users to keep
the files indefinitely. Users do not usually keep files permanently, and if nodes leave the
network that has data required by someone, there is no way to retrieve it except having
the required nodes rejoin the network again so that the files become available once
more. Two main requirements here are high availability and link stability, which means
that data should be available when required and network links should also always be
accessible. Inter Planetary File System (IPFS) by Juan Benet possesses both of these
properties and the vision is to provide a decentralized World Wide Web by replacing the
HTTP protocol. IPFS uses Kademlia DHT and merkle DAG (Directed Acyclic Graph)
to provide the storage and searching functionality, respectively.
The incentive mechanism is based on a protocol known as Filecoin that pays incentives
to nodes that store data using the BitSwap mechanism. The BitSwap mechanism allows
nodes to keep a simple ledger of bytes sent or bytes received under a one-to-one
relationship. Also, a Git-based version control mechanism is used in IPFS to provide
structure and control over the versioning of data.
There are other alternatives, such as Ethereum swarm, storj, and maidsafe. Ethereum
has its own decentralized and distributed ecosystem that uses Swarm for storage and
the whisper protocol for communication. Maidsafe is aiming to provide a decentralized
World Wide Web. All these projects will be discussed later in the book in more detail.
Communication
Now imagine a network that allows users to be in control of their communication; no one
can shut it down for political or censorship reasons. This could be the next step toward
decentralizing communication networks in the blockchain ecosystem. It must be noted
that this model may only be required in a jurisdiction where the Internet is censored and
controlled by the government.
As mentioned earlier, the original vision of the Internet was to build a decentralized
network; however, over the years, with the advent of large-scale service providers such
as Google, Amazon, and eBay, the control is shifting toward the big players. For
example, e-mail is a decentralized system at its core; anyone can run an e- mail server
with minimal effort and can start sending and receiving e-mails, but there is a better
alternative available that is already providing a managed service for end users, so there
is a natural inclination toward selecting a centralized service as it is more convenient
and free. Free services, however, are being offered at the cost of valuable personal data
and many users are not aware of this fact. This is one example that shows how the
Internet has moved toward centralization. Blockchain has once again given this vision of
decentralization to the world and now concerted efforts are being made to harness this
technology and gain the benefits that it can provide.
Computation
The following diagram shows the decentralized ecosystem overview where, on the
bottom layer, Internet or Meshnets provides a decentralized communication layer, then
a storage layer uses technologies such as IPFS and BigChainDB to enable
decentralization, and finally, you see the blockchain that serves as a decentralized
processing layer. Blockchain can, in a limited way, provide a storage layer too, but that
seriously hampers the speed and capacity of the system; therefore, other solutions such
as IPFS and BigChainDB are more suitable to store large amounts of data in a
decentralized way. At the top, the Identity and Wealth layers are shown. Identity on the
Internet is a very big topic and systems such as bitAuth and OpenID have provided
authentication and identification services with varying degrees of decentralization and
security assumptions.
With the emergence of the decentralization paradigm, different terminologies and buzz
words are now appearing in the media and in academic literature. With the advent of the
blockchain technology, it is now possible to build software versions of traditional
physical organizations. In the context of decentralization, the upcoming concepts are
worth discussing.
UNIT 2
Even without considering the many possible uses of Bitcoin and blockchain technology,
Bitcoin, at its most fundamental level, is a core breakthrough in computer science, one
that builds on 20 years of research into cryptographic currency, and 40 years of
research in cryptography, by thousands of researchers around the world. Bitcoin is a
solution to a long-standing issue with digital cash: the double-spend problem. Until
blockchain cryptography, digital cash was, like any other digital asset, infinitely copiable
(like our ability to save an email attachment any number of times), and there was no
way to confirm that a certain batch of digital cash had not already been spent without a
central intermediary. There had to be a trusted third party (whether a bank or a
quasibank like PayPal) in transactions, which kept a ledger confirming that each portion
of digital cash was spent only once; this is the double-spend problem. A related
computing challenge is the Byzantine Generals’ Problem, connoting the difficulty of
multiple parties (generals) on the battlefield not trusting each other but needing to have
some sort of coordinated communication mechanism.
Bitcoin is money, digital cash, a way of buying and selling things over the Internet. The Bitcoin
value chain is composed of several different constituencies: software developers, miners,
exchanges, merchant processing services, web wallet companies, and users/consumers. From
an individual user’s perspective, the important elements in transacting coins (I’ll use “coin” in the
generic sense here) are an address, a private key, and wallet software. The address is where
others can send Bitcoin to you, and the private key is the cryptographic secret by which you can
send Bitcoin to others. Wal‐ let software is the software you run on your own computer to
manage your Bitcoin. There is no centralized “account” you need to register with another
company; if you have the private key to an address, you can use that private key to access the
coin associated with that address from any Internet-connected computer (including, of course,
smartphones). Wallet software can also keep a copy of the blockchain—the record of all the
transactions that have occurred in that currency—as part of the decentralized scheme by which
coin transactions are verified.
As responsible consumers, we are not used to many of the new aspects of blockchain
technology and personal cryptosecurity; for example, having to back up our money.
Decentralized autonomy in the form of private keys stored securely in your ewallet means that
there is no customer service number to call for password recovery or private key backup. If your
private key is gone, your Bitcoin is gone. This could be an indication that blockchain technology
is not yet mature enough for mainstream adoption; it’s the kind of problem that consumer-facing
Bitcoin startups such as Circle Internet Financial and Xapo are trying to solve. There is an
opportunity for some sort of standardized app or service for ewallet backup (for example, for
lost, stolen, bricked, or upgraded smartphones or laptop/tablet-based wallets), with which users
can confirm exactly what is happening with their private keys in the backup service, whether
they self-administer it or rely on external vendors. Personal cryptosecurity is a significant new
area for consumer literacy, because the stakes are quite high to ensure that personal financial
assets and transactions are protected in this new online venue of digital cash. Another element
of personal cryptosecurity that many experts recommend is coin mixing, pooling your coins with
other transactions so that they are more anonymous, and using services like Dark Coin, Dark
Wallet, and BitMixer. As the marketplace of alternative currencies grows, demand for a unified
ewallet will likely rise, because installing a new and separate wallet is required for most
blockchain-related services, and it is easy to have 20 different ewallets crowding your
smartphone.
Despite their current clunkiness in implementation, cryptocurrencies offer many great benefits in
personal cryptosecurity. One of the great advantages is that blockchain is a push technology
(the user initiates and pushes relevant information to the network for this transaction only), not a
pull technology (like a credit card or bank for which the user’s personal information is on file to
be pulled any time it is authorized). The credit card technology was not developed to be secure
on the Internet the way that blockchain models are developing now. Pull technology requires
having datastores of customer personal information that are essentially centralized honey pots,
increasingly vulnerable to hacker identity theft attacks (Target, Chase, and Dairy Queen are just
a few recent examples of large-scale identity-theft vendor database raids). Paying with Bitcoin
at any of the 30,000 vendors that accept it as of October 2014 (e.g., Overstock, New Egg, and
Dell Computer) means not having to entrust your personal financial information to centralized
vendor databases. It might also possibly entail a lower transaction fee (Bitcoin transaction fees
are much lower than merchant credit card processing fees).
UNIT 3
In addition to Blockchain 2.0 protocol projects, there are several developer platform
companies and projects offering tools to facilitate application development.
Blockchain.info has a number of APIs for working with its ewallet software (it’s one of
the largest ewallet providers) to make and receive payments and engage in other
operations. Chain has interfaces to make calls to the data available in full blockchain
nodes, and standard information queries such as the Bitcoin balances by address and
push notifications when there is activity with a certain address. Stellar is a
semidecentralized (maintained by gateway institutions, not miners) public ledger
platform and unified development environment (blockchain APIs, multisig APIs) linked to
the Stripe payment network.59 Related to Stellar are Block.io, Gem, and BlockCypher,
which have multisig wallet APIs.
More unified API development environments will be needed that include the many
diverse and growing parts of the blockchain ecosystem (storage, file serving,
messaging, wallet interactions, mobile payments, identity confirmation, and reputation).
There is also an opportunity to link blockchain development environments out to other
major segments like the machine-to-machine (M2M) communication and
Internet-of-Things (IoT) networks infrastructure for rapid application development. An
example of an advanced integrated application of this kind envisioned for the far‐ ther
future could be a smartwatch that can interact with smart-city traffic-sensor data to
automatically reserve and pay for lane space with a Bitcoin-denominated smart
contract.
There is a need for a decentralized ecosystem surrounding the blockchain itself for
full-solution operations. The blockchain is the decentralized transaction ledger that is
part of a larger computing infrastructure that must also include many other functions such as
storage, communication, file serving, and archiving. Specific projects that are developing
solutions for the distributed blockchain ecosystem include Storj for any sort of file storage (text,
images, audio, multimedia); IPFS for file serving, link maintenance, and storage; and Maidsafe
and Ethereum for storage, communication, and file serving. First, in terms of storage, perhaps
the most obvious need is for secure, decentralized, off-chain storage for files such as an
electronic medical record (EMR) or genome, or even any simple Microsoft Word document,
which would not be packed into the 40-byte (40-character) OP_RETURN field used for
transaction annotation (even in the case of Florincoin’s 528-character annotation field). File
storage could either be centralized (like Dropbox or Google Drive) or could be in the same
decentralized architecture as the blockchain. The blockchain transaction that registers the asset
can include a pointer and access method and privileges for the off-chain stored file.
Second, in the case of file serving, the IPFS project has proposed an interesting technique for
decentralized secure file serving. IPFS stands for InterPlanetary File System, which refers to the
need for a global and permanently accessible filesystem to resolve the problem of broken
website links to files, well beyond the context of blockchain technology for the overall
functionality of the Internet. Here, BitTorrent peer-to-peer file-sharing technology has been
merged with the tree and versioning functionality of Git (initially applied to software but
“confirmable versioning” as a concept is more widely applicable to any digital asset). IPFS, then,
is a global, versioned, peer-to- peer filesystem, a system for requesting and serving a file from
any of the multiple places it might exist on the Web (versus having to rely on a central
repository) per a hash (unique code) that confirms the file’s integrity by checking that spam and
viruses are not in the file.60 IPFS is congruent with the Bitcoin technical architecture and ethos,
rewarding file-sharing nodes with Filecoin.
Third, in the area of archiving, a full ecosystem would also necessarily include longevity
provisioning and end-of-product-life planning for blockchains. It cannot be assumed that
blockchains will exist over time, and their preservation and accessibility is not trivial. A
blockchain archival system like the Internet Archive and the Wayback Machine to store
blockchains is needed. Not only must blockchain ledger transactions be preserved, but we also
need a means of recovering and controlling previously recorded blockchain assets at later dates
(that might have been hashed with proprietary algorithms) because it is likely that certain
blockchains will go out of business. For example, it is great that someone established
proof-of-existence of her will on the Bitcoin blockchain in 2014, but how can we know that the
will can be rehashed and authenticated in 60 years when it needs to be verified? If blockchains
are to become the lingua franca archival mechanism for the whole of a society’s documents,
longevity, preservation, and access mechanisms need to be built into the value chain explicitly.
Further, the existence of these kinds of tools—those that archive out-of-use blockchains and
consider the full product lifecycle of the blockchain—could help to spur mainstream adoption.
Blockchain technology is bringing together concepts and operations from several fields,
including computing, communications networks, cryptography, and artificial intelligence.
In Satoshi Nakamoto’s original plan, there were three steps, only two of which have
been implemented in Bitcoin 1.0. These are the blockchain (the decentralized public
transaction ledger) and the Bitcoin protocol (the transaction system to move value
between parties without third-party interaction). This has been fine for the Blockchain
1.0 implementation of currency and payment transactions, but for the more complicated
tier of Blockchain 2.0 applications such as the recording and transfer of more complex
assets like smart property and smart contracts, we need the third step—a more robust
scripting system—and ultimately, Turing completeness (the ability to run any coin,
protocol, or blockchain). Nakamoto envisioned not just sending money from point A to
point B, but having programmable money and a full feature set to enable it. One
blockchain infrastructure project aiming to deliver a Turing- complete scripting language
and Turing-complete platform is Ethereum.
Ethereum is a platform and a programming language for building and publishing dis‐
tributed applications. More fundamentally, Ethereum is a foundational general-purpose
cryptocurrency platform that is a Turing-complete virtual machine (meaning that it can
run any coin, script, or cryptocurrency project). Rather than being a blockchain, or a
protocol running over a blockchain, or a metaprotocol running over a protocol like other
projects, Ethereum is a fundamental underlying infrastructure platform that can run all
blockchains and protocols, rather like a unified universal development platform. Each
full node in the Ethereum network runs the Ethereum Virtual Machine for seamless
distributed program (smart contract) execution. Ethereum is the underlying
blockchain-agnostic, protocol-agnostic platform for application development to write
smart contracts that can call multiple other blockchains, protocols, and cryptocurrencies.
Ethereum has its own distributed ecosystem, which is envisioned to include file serving,
messaging, and reputation vouching. The first component is Swarm
(“Ethereum-Swarm,” not to be confused with the crowdfunding site Swarm) as a
decentralized file-serving method. A second component is Whisper
(“Ethereum-Whisper,” also not to be confused with other similarly named projects),
which is a peer-to-peer protocol for secret messaging and digital cryptography. A third
component is a reputation system, a way to establish reputation and reduce risk
between agents in trustless networks, possibly provided by TrustDavis, or ideas
developed in a hackathon project, Crypto Schwartz.
4. Explain about the solidity of smart contract and some attacks on smart
contracts.
Assignment 2
UNIT 4
UNIT 5
While blockchain technology has the potential to transform supply chain management by
providing greater transparency and security, there are still some limitations that need to be
addressed. Here are some of the key limitations of blockchain in the supply chain:
1. Scalability: One of the biggest limitations of blockchain in the supply chain is scalability.
Blockchain networks can become slow and inefficient when processing large volumes of
data, which can make it difficult to scale up the network to accommodate a growing
number of transactions.
2. Interoperability: Another limitation is interoperability, which refers to the ability of
different blockchain networks to communicate with each other. Currently, there are many
different blockchain platforms being used in the supply chain, which can make it difficult
to share data and collaborate across different networks.
3. Data privacy: While blockchain technology can provide greater transparency and
security, there are still concerns around data privacy. Companies need to ensure that
sensitive data is not exposed on the blockchain, and that appropriate measures are in
place to protect confidential information.
4. Integration: Integrating blockchain technology into existing supply chain systems can
also be a challenge, as it requires significant changes to existing processes and systems.
5. Cost: Implementing blockchain technology can be expensive, especially for smaller
businesses that may not have the resources to invest in the technology.
4. Myths and reality of blockchain technology.
Reality: While blockchain transactions are pseudonymous, meaning that they do not
reveal the user's identity, the transactions are still public and traceable. It is possible to
analyze the transaction history to uncover the identity of the user.
Reality: While blockchain is generally more secure than traditional systems, it is still
vulnerable to certain types of attacks. Additionally, the security of a blockchain network
depends on the implementation and the consensus mechanism used.
Reality: While blockchain can be faster than traditional systems for certain use cases, it
can also be slower due to the decentralized nature of the network and the need for
consensus.
Reality: While blockchain can be complex, there are many resources available that
explain it in simple terms. Additionally, many blockchain applications are designed to be
user-friendly.
Reality: While blockchain is decentralized in terms of the ledger, there are still
centralized elements in many blockchain networks, such as the development team or
the consensus mechanism.
Reality: While blockchain transactions are generally immutable, there are instances
where changes can be made to the ledger, such as through a hard fork or a 51% attack.
Myth 8: Blockchain is only for large corporations.
Reality: While blockchain can eliminate the need for intermediaries in some cases, such
as for peer-to-peer transactions, there are many use cases where intermediaries are still
necessary.