0% found this document useful (0 votes)
15 views12 pages

Blockchain

The document provides an overview of blockchain technology, focusing on key concepts such as non-repudiation, the structure of block headers, and the importance of cold wallets for security. It discusses the functionalities of Ethereum, smart contracts, and Hyperledger frameworks, as well as the role of cryptocurrencies like Bitcoin and Ether in modern finance. Additionally, it addresses the implications of anonymity in cryptocurrency transactions and the significance of cryptoeconomics in securing public networks.

Uploaded by

unniza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views12 pages

Blockchain

The document provides an overview of blockchain technology, focusing on key concepts such as non-repudiation, the structure of block headers, and the importance of cold wallets for security. It discusses the functionalities of Ethereum, smart contracts, and Hyperledger frameworks, as well as the role of cryptocurrencies like Bitcoin and Ether in modern finance. Additionally, it addresses the implications of anonymity in cryptocurrency transactions and the significance of cryptoeconomics in securing public networks.

Uploaded by

unniza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Blockchain

Objectives
1. The sender, after sending a message, cannot deny later that they sent the message: - Non-
repudiation
2. Size of Block Header : - 80 Bytes
3. An offline wallet or cold wallet that is not connected to the network provides the highest
level of security for savings.
4. When the transactions are validated, new Bitcoins get mined and a maximum of 21
million Bitcoins can ever be produced.
5. Stream ciphers convert one symbol of plaintext into one symbol of ciphertext.
6. RC4 is not used in IP.
7. In DES, Size of the key is 56 bits.
8. If the output is a 256-bit hash value, then the output space can have a maximum of 2^256
values.
9. Blockchain was invented in which year? – 2009
10. Real world applications of blockchain: - Healthcare, Banking, Distributed clod storage.
11. Bitcoin is created by: - Satoshi Nakamoto.
12. Wallets is used for storing Bitcoin.
13. What is private key: - A key not to be given to public.
14. How blocks are linked in Blockchain: - Backword to Previous block.
15. ./network.sh down command to remove any containers or artifacts in blockchain.
16. Members of a Hyperledger fabric network enrol through a trusted MSP (Membership
Service Provider).
17. revert(): abort execution and revert state changes.
18. Smart contract automate a workflow, triggering the next action when conditions are met.
19. Distributed application, or dapp, typically describes a web- or smartphone-accessible
front end which GUI application that uses the EVM as its back end.
20. HyperLedger is a project of open source blockchain and its related application started in
December 2015.
21. Custom Token are similar to credit card rewards points today.
22. Gas cost of Operation name call is 20.
23. Ethereum does make provisions for one common use-case of smart contracts, which is a
subcurrency, a.k.a. token.
24. Ethereum and Bitcoin, the Merkle tree structure is used to record the transaction ledger in
each block.
25. Mining data can be stored in multiple formats
26. The price of ether is whatever the market dictates, and is predicated mostly on demand of
time on the EVM.
27. 60 million ETH were sold at prices varying from 1,000 to 2,000 ETH per bitcoin.
28. Mining can be defined as dedicating computational effort of a given version of history as
a correct one.
29. Solidity adheres to all the same syntactical regularities as JavaScript and C when it comes
to loops.
30. ecrecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) returns (address): Recovers address
associated with the public key from elliptic curve signature, returns 0 on error

1
Unit 2
1. Explain the concept What Ethereum Does?
 In the abstract, open source blockchain networks such as Ethereum and Bitcoin are kits
that allow you to pop up an economic system in software, complete with account
management and a native unit of exchange to pass between accounts. Kind of like the
game Monopoly.
 People call these native units of exchange coins, tokens, or cryptocurrencies, but
they’re no different from tokens in any other system: they’re a form of money (or scrip)
that is usable only within that system.
 Blockchains work something like mesh networks or local area networks (LANs); they
are merely connected to other “peer” computers running the same software.
 When you want to make one of these peer-to-peer (P2P) networks accessible through
a web browser, you need to use special software libraries such as Web3.js to connect
an application’s front end (the GUI you see in a browser), via JavaScript APIs, to its
back end (the blockchain).
 In Ethereum, you can take this concept one step further by easily writing financial
contracts with other users inside the system. As you’ll see, these financial contracts are
called smart contracts.

2. Explain three core parts of a Blockchain in details.


A blockchain can be thought of as a database that is distributed, or duplicated, across many
computers. The innovation represented by the word blockchain is the specific ability of this
network database to reconcile the order of transactions, even when a few nodes on the
network receive transactions in various order.
 Peer-to-peer networking: A group of computers such as the BitTorrent network that
can communicate among themselves without relying on a single central authority
and therefore not presenting a single point of failure.
 Asymmetric cryptography: A way for these computers to send a message encrypted
for specific recipients such that anyone can verify the sender’s authenticity, but only
intended recipients can read the message contents. In Bitcoin and Ethereum,
asymmetric cryptography is used to create a set of credentials for your account, to
ensure that only you can transfer your tokens.
 Cryptographic hashing: A way to generate a small, unique “fingerprint” for any
data, allowing quick comparison of large datasets and a secure way to verify that
data has not been altered; in both Bitcoin and Ethereum, the Merkle tree data
structure is used to record the canonical order of transactions, which is then hashed
into a “fingerprint” that serves as a basis of comparison for computers on the
network, and around which they can quickly synchronize.

2
3. What Smart Contracts (Really) Do?
 There’s one term which will continue to pop up in Ethereum, and that is the notion of
a smart contract: some business logic that runs on the network, semi-autonomously
moving value and enforcing payment agreements between parties.
 Smart contracts are often equated to software applications, but this a reductive analogy;
they’re more like the concept of classes in conventional object-oriented programming
When developers speak of “writing smart contracts,” they are typically referring to the
practice of writing code in the Solidity language to be executed on the Ethereum
network.
 When the code is executed, units of value may be transferred as easily as data. As stated
in this chapter already, the promise of digital money is immense.

4. What are Virtual Machines, Exactly? Explain The Role of the Ethereum Protocol in
Banking.
 A virtual machine (VM), in the Ethereum context, is one giant global computer
composed of constituent nodes, which are themselves computers too.
 A virtual machine is an emulation of a computer system by another computer system.
 Virtual machines can be created with hardware, software, or both. In the case of
Ethereum, it’s both. Rather than securely network thousands of discrete machines, as
with Fedwire, Ethereum takes the approach of securely operating one very large
machine that can encompass the whole Earth.
 The Fedwire system is a settlement system with a user experience tailored to state-
chartered banks and their operators.
 It makes little or no concern for the end user of a retail bank, for example; that’s the job
of the retail bank.
 Software developers will recognize Fedwire as a “platform for banks.” What the bank
chooses to build on top of Fedwire (the customer experience, the online banking tools,
the brick-and-mortar branches, the financial products, and the cross-selling) is what
distinguishes it from other banks on the Fedwire system.

5. Write a note on Ether as a Currency and Commodity.


 It’s commonly said that the bitcoin isn’t backed by anything, and that’s true. Of course,
modern fiat currencies aren’t backed by anything either. But they’re different:
endorsed by a government, a fiat currency is held by default by anyone paying taxes
and buying government bonds. Some international commodities sales are denominated
in dollars, too (for example, oil) giving people another reason to hold dollars.
 For cryptocurrencies, challenges to adoption remain. Today, these digital tokens
remain a fast, secure, public payment layer on top of the existing fiat money system;
an experimental deployment that might someday grow to replace the centralized
payments networking technologies used by companies like Visa and MasterCard
today.
 However, incredible possibilities are on the horizon as governments and private
institutional investors begin to create large markets for financial products and services
denominated in cryptocurrencies. Central banks may even adopt the technology. As of
this writing, at least one country has issued a digital dollar using Bitcoin software:
Barbados. Others are actively researching the prospect.

3
6. Explain Anonymity in Cryptocurrency.
 Bitcoins and ether are not anonymous payment instruments. Anyone who knows your
public key can look on the blockchain and see the dates and amounts of transactions
coming in and out of your account.
 From this data, they might be able to put together a pattern of transactions from which
they could deduce your activities.
 Federal authorities are already using machine-learning transactions to decode spending
patterns on dark-market sites such as AlphaBay.
 Anonymity, secrecy, and privacy in cryptocurrency are generally conflated by
newbies, sometimes with disastrous ends.
 Bitcoin and Ethereum addresses are pseudonymous by nature; they’re not linked to
your real name or information.
 But every transaction you send is public, in the sense that anyone can see the
transaction on the blockchain. This is why public blockchains are touted for their
transparency; if you know someone’s public key, you can look up all their transactions.
Data within smart contracts themselves are encoded but not encrypted. Encryption is
used only to hash large datasets and verify transaction senders and recipients.
However, you can encrypt data yourself before putting it into an Ethereum smart
contract, if you’d like to use the public Ethereum chains in a private manner.

4
Unit 3

1. What is Hyperledger? Explain framework and tools of it.


 Hyperledger is an open source project created to support the development of
blockchain-based distributed ledgers.
 Hyperledger consists of a collaborative effort to create the needed frameworks,
standards, tools and libraries to build blockchains and related applications.
 HyperLedger Frameworks: -
 Hyperledger Fabric: - This is a permission blockchain infrastructure with SDKs
for Node.js, Java, and GoLang. Hyperledger Fabric is the heart of Hyperledger
and supports chaincode in GoLang and JavaScript
 Hyperledger Burrow: - This is an Ethereum VM built to specification.
 Hyperledger Indy: - Think independent. This is a tool and library for running
independent identities on distributed ledgers.
 Hyperledger tools: -
 Hyperledger Caliper: - This is a blockchain benchmark tool.
 Hyperledger Cello: - This is an on-demand blockchain module toolkit for
creating, managing, and terminating blockchains.
 Hyperledger Explorer: - This is a module to view, invoke, deploy, and query
blocks, transactions, and network data.

2. Write a note on Installing Hyperledger Fabric and Composer and Prerequisites.


 A good place to start with a Hyperledger network is to install Hyperledger Fabric and
Composer.
 You will be setting up the environment by installing all the tools and libraries as well
as Hyperledger Fabric and Composer; then you will verify installation went well by
starting and stopping Hyperledger Fabric and checking that Composer’s libraries
installed correctly.
 Pre-requisites: -
 Verify the already installed prerequisites.
 Update Git.
 Install Node Version Manager.
 Update Node.js.
 Install VSCode.
 Install Hyperledger Composer Extension.
 Install the Hyperledger Composer Essential CLI tools.
 Install Hyperledger Fabric.

5
3. Write note on Business Network Archive.
 The business network model includes assets and the transactions related to these assets.
Hyperledger Composer needs the following to be packaged together: a network model
file, a JavaScript file (.js), an access control file (.acl), and a query file (.qry).
 These files are definition files that generate your network. –
 Network model (.cto): - This is the file that defines the assets, transactions, and
participants who can interact with these assets.
 JavaScript file (.js): - This is the file that defines the transaction processor
functions. It is the chaincode.
 Access control (ACL) (.acl): - This is the file that contains the access control
rules that define the rights of the different participants.
 Query (.qry): - This is the file that defines the queries that can run in a network.
 Hyperledger Composer takes these four files and creates a business network definition
that is packaged as an archive (.bna) file. The .bna files can be deployed on the
Hyperledger Fabric network.

4. List Hyperledger Fabric components.


 Assets: - An asset is anything that has value. An asset has state and ownership.
 Shared Ledger: - The ledger records the state and ownership of an asset.
 Smart Contracts: - Hyperledger Fabric smart contracts are called chaincode. Chaincode
is software that defines assets and related transactions; in other words, it contains the
business logic of the system.
 Peer Nodes: - Peers are a fundamental element of the network because they host
ledgers and smart contracts. A peer executes chaincode, accesses ledger data,
endorses transactions, and interfaces with applications.
 Channels: - Channels are a logical structure formed by a collection of peers. This
capability allows a group of peers to create a separate ledger of transactions.
 Organizations: - The Hyperledger Fabric network is built from the peers owned and
contributed by the different organizations that are members of the network. The
network exists because organizations contribute their individual resources to the
collective network.
 Membership Service Provider: - The MSP is implemented as a Certificate
Authority to manage certificates used to authenticate member identity and roles. No
unknown identities can transact in the Hyperledger Fabric network.
 Ordering Services: - The ordering service packages transactions into blocks to be
delivered to peers on a channel. It guarantees the transaction delivery in the network.

6
5. Explain the concept EVM as Back End.
 Software apps are typically discussed in two halves: the front end and the back end.
 The back end usually refers to the database and the logic, the front end usually refers to
the part of the application the user sees.
 In software interface design, controls is the general term for the little buttons, sliders,
dials, hearts, stars, thumbs-up icons, and any other little thing you can click to make
something happen.
 Neither EVM nor the Bitcoin virtual machine are powerful today. The EVM will
continue to get faster as the core developers iterate toward a faster block time.
 Although the EVM itself is a fully fledged computer, it is not yet a complete end-to-
end platform capable of hosting HTML/CSS interfaces; the most useful role it can play
is as the back end to a distributed application.

6. Explain the concept Cryptocurrency Is a Measure of Time.


 Because cryptoassets and cryptocurrencies are impossible to counterfeit, this gives
them an interesting property as a measure of time.
 Cryptocurrencies, as of this writing, are not redeemable by any central authority for
gold or fiat currency.
 However, they are classified as property or currency in a handful countries.
Nevertheless, it can be said that cryptocurrency get their price from the marketplace:
they are worth whatever someone in the marketplace will pay.
 This is in contrast to say, a gold-backed currency, which is redeemable from the local
treasury, or even a treasury bond, and which a government guarantees it will redeem
for its own fiat currency decades into the future.
 As a result of its status as a decentralized digital medium of exchange, cryptocurrencies
can be conceptualized as “assets backed by anything.” It doesn’t matter whether you’re
trading cattle, bananas, soybean futures, or private equities—the deal can be done in
cryptocurrency. The only challenge is agreeing on a price.

7
Unit 4
1. Why Is Cryptoeconomics Useful?
 First and foremost, cryptoeconomics is about engineering a layer of defense between
public networks and attackers of all sizes.
 It combines game theoretical system design, encryption, and cryptographic hashing to
protect a commonly used, commonly operated resource—in this case, a global
transaction state machine.
 Because public chains are public, they need to be resilient against attackers with large
amounts of computing power.
 Hence, networks with more nodes, and more geographically distributed nodes, owned
by discrete unlinked owners, are considered more secure.
 Mining pools contribute to centralization, which is why any pool with larger than 25
percent hashpower is approaching the threshold of network threat.
 Should two such pools emerge, they might quickly get control of a network. By using
the custom, ASIC-resistant Ethash algorithm and designing the network to quickly
increase in difficulty, the protocol designers ensured there would be little incentive for
miners to professionalize and consolidate.

2. Explain Mining in Blockchain.


 In Ethereum, miners refers to a vast global network of computers, operated mostly by
enthusiasts in their homes and offices, running Ethereum nodes that are paid in ether
tokens for the work of executing smart contracts and validating the canonical order of
transactions around the world.
 The process of mining is undertaken by each individual node, but the term also refers
to the collective effort of the network: individual nodes mine, and the network itself
can be said to be secured by mining.
 Miners process transactions in groups known as blocks. We previously defined a block,
in the abstract, as a collated set of transactions that take place over a given period of
time.
 However, a block can also refer to the data object containing those transactions, stored
on Ethereum nodes.
 Each time a node starts, it must download the blocks it missed while offline.
 Each block contains some metadata from the previous block, to prove it is authentic
and build on the existing blockchain.
 The “true” order of transactions is hard for the network to determine. Mining nodes in
different parts of the world may receive new transactions out of order.

8
3. Explain Difficulty in Bitcoin and Factors Required for Block Validation.
 Ethereum and Bitcoin are self-regulating networks. As a network gets more popular,
more mining hashpower joins in search of profits, and blocks might be found too
quickly.
 If blocks are found too quickly or slowly, the system changes the difficulty to get within
range of its ideal block time.
 Network difficulty may decrease or go flat if miners begin to drop off the network or if
overall hashpower decreases.
 After the Ethereum network experienced attacks in October and November 2016, the
market price of ether dropped, and hashrate was reduced as miners who couldn’t make
a profit turned off their machines.
 Factors Required for Block Validation: -
 Every candidate block that each individual miner constructs and seeks to
validate contains four pieces of data:
 Hash of the transaction ledger for this block (as this machine heard about
it).
 Root hash of the entire blockchain.
 Block number since the chain started.
 Difficulty of this block.

4. Explain Ether Issuance Scheme.


 Ether is created by the network to pay miners. However, some ether was presold in
mid2014 to bootstrap the funding of the network.
 Approximately 60 million ETH were sold at prices varying from 1,000 to 2,000 ETH
per bitcoin.
 From the presale forward, the system will issue 15.6 million ether per year in the form
of rewards paid to miners.
 Ether never stops being issued, but the amount issued per year is a smaller and smaller
percentage of the overall pool.
 As you can see in Figure 7-1, the small uptick in the curved line at 2014–2015 indicates
the presale period.

9
 Thus, ether’s issuance scheme is inflationary (in terms of quantity, not price) until
approximately 2025, and deflationary in quantity thereafter. The price of ether is
whatever the market dictates, and is predicated mostly on demand of time on the EVM.

5. How Ethereum and Bitcoin Use Trees?


 In mathematics, a tree is an ordered data structure used to store an associative array of
keys and values. A radix tree is a variant that is compressed, requiring less memory.
 Creating a Merkle tree requires hashing a large number of “chunks” of transaction data
together until they become only one: a root hash.
 In Ethereum and Bitcoin, the Merkle tree structure is used to record the transaction
ledger in each block.
 The root for the Merkle tree is hashed in with other metadata and included in the header
of the subsequent block.
 Thus, it can be said that each additional transaction (within each block) irrevocably
changes the Merkle root; even one wrong transaction will make the root hash look
completely different and thus, obviously wrong.
 This is how blocks can prove their legitimate ancestry to the block validator algorithm,
which is part of the overall block processing routine.

6. Explain the steps the block validator algorithm.


 Here are all the steps the block validator algorithm takes, in order:
 Check if the previous block referenced exists and is valid.
 Check that the timestamp of the block is greater than that of the referenced
previous block and less than 15 minutes into the future.
 Check that the block number, difficulty, transaction root, uncle root and gas
limit (various low-level Ethereum-specific concepts) are valid.
 Check that the nonce on the block is valid, showing the evidence of proof of
work.
 Apply all transactions in this now-validated block to the EVM state. If any
errors are thrown, or if total gas exceeds the GASLIMIT, return an error and
roll back the state change.
 Add the block reward to the final state change.
 Check that the Merkle tree root final state is equal to the final state root in the
block header.

10
Unit 5
1. Write note on Seven Ways to Think about Smart Contracts and Dapp Contract Data
Models.
 Behind every dapp is a series of smart contracts. Smart contracts are useful in these
scenarios, which may make fun problem areas for prototyping:
 Maintain an accounting system for something in the real world, or for other
contracts
 Create forwarding contracts, such as a savings account that resends income to a
separate bucket automatically
 Manage a relationship between several parties, such as a freelancer agreement
or payroll
 Act as a software library for other contracts
 Act as controllers for other systems or sets of contracts
 Serve as application-specific logic for a communal web service
 Serve as a utility that developers can use on a single-serving basis, such as a
random number generator.

2. Differentiate Public Nodes vs. Self-Hosted Nodes.


 Blockchains are decentralized networks of nodes.
 All nodes have the same copy of data and they agree on the state of data always.
 When we develop applications for blockchains, we can make our application talk to
any of the nodes of the target network.
 There can be mainly two set-ups for this:
 Application and node both run locally: - The application and the node both run
on the local machine. This means we will need our application users to run a
local blockchain node and point the application to connect with it. This model
would be a purely decentralized model of running an application. An example
of this model is the Ethereum-based Mist browser, which uses a local geth node.

 Public node: - The application talks to a public node hosted by a third party.
This way our users don’t have to host a local node. There are several advantages
and disadvantages of this approach. While the users don’t have to pay for power
and storage for running a local node, they need to trust a third party to broadcast

11
their transactions to the blockchain. The Ethereum browser plugin metamask
uses this model and connects with public hosted Ethereum nodes.

3. Public vs. Private Blockchains.


Public Private
Public blockchains are also called Private blockchains are also called
permissionless blockchain permissioned blockchains
Public or permissionless blockchains do not Private blockchains have a limited number of
restrict addition of new nodes to the networknodes in the network and not everyone can
and anyone can join the network join the network
Public blockchains are Bitcoin and Ethereum Private blockchain can be a network of a few
main nets. Ethereum nodes connected to each other but
not connected to the main net.
The public blockchains have a predefined set Private blockchains are generally used by
of rules and the private ones can have a enterprises to exchange data among
different set of rules per blockchain themselves and their partners and/or among
their suborganizations.

12

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy