0% found this document useful (0 votes)
71 views51 pages

Challenges and Types of Blockchain Systems

Uploaded by

ledasi2421
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)
71 views51 pages

Challenges and Types of Blockchain Systems

Uploaded by

ledasi2421
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

Blockchain Technology

1. List out the challenges associated with making resources accessible in a


distributed environment.
1. Naming
2. Access control
3. Security
4. Availability
5. Performance
6. Mutual exclusion of users
7. Fairness
8. Consistency

2. Why is Distribution required in BlockChain Technology?


1. Sharing of information and services.
2. Possibility to add components increases availability , performance , reliability ,
fault tolerance and scalability.

3. List out the goals of Distributed Systems.


1. Making resources accessible
2. Distribution transparency
3. Openness
4. Scalability
5. Security
6. System Design requirements

4. What do you mean by byzantine faults?


A node that exhibits arbitrary behavior is also known as a byzantine [Link] may
send/transmit arbitrary messages at arbitrary times , commit omissions, a process may
stop or take an incorrect step.
This can be a result of an attack by adversaries, a software bug, or data corruption.
State machine replication protocols such as PBFT(Practical Byzantine Fault Tolerance)
was developed to address this second type of faults.

5. List out the challenges in Distributed System Design.


6. What are peer to peer networks?
Based on a decentralized concept where network participants conduct transactions
without needing any middle man , intermediaries or central server. No administrator is
required to maintain track of user transactions on the network. The peers in the network
cooperate to handle deals and manage the BTC.

7. How do peer to peer networks work?


8. Differentiate the different types of peer to peer networks.
9. What are the benefits of Peer To Peer Block chain network?
10. Differentiate between name node and data node.

11. Illustrate how data is stored in HDFS with suitable diagrams.


12. Why do the blocks replicate in data nodes while storing?

13. Define the term “BlockChain”


14. What do you mean by “Append-Only” feature in Block chain?

15. Explain the generic elements of a block chain with suitable diagram.
16. Compare and contrast the different types of blockchain. Also List out the Benefits
and limitations of block chain.

Benefits:
1. Decentralization
2. Transparency and trust
3. Immutability
4. High availability
5. Highly secure
6. Simplification of current paradigms
7. Faster dealings
8. Cost saving
Limitations:
1. Scalability
2. Adaptability
3. Regulation
4. Relatively immature technology
5. Privacy
Types:
1. Distributed ledgers
2. Distributed Ledger Technology (DLT)
3. Blockchains
4. Ledgers

Distributed ledgers
1. distributed ledger is a broad term describing shared databases.
2. all blockchains are fundamentally distributed ledgers, all distributed ledgers are not
necessarily a blockchain.

Distributed ledger technology


1. DLTs usually serve as a shared database, with all participants known and
verified.
2. They do not have a cryptocurrency or do not require mining to secure the ledger.

Public ledger
1. not owned by anyone.
2. They are open to the public, and anyone can participate as a node in the
decision-making process.
3. Users may or may not be rewarded for their participation.
4. All users maintain a copy of the ledger on their local nodes and use a distributed
consensus mechanism to decide the eventual state of the ledger.
5. Ex: Bitcoin and Ethereum
Permissioned Ledger
1. is a blockchain where participants of the network are already known and trusted.
2. do not need to use a distributed consensus mechanism;
3. instead, an agreement protocol is used to maintain a shared version of the truth
about the state of the records on the blockchain.
4. Ex: Bitcoin can become a permissioned ledger if an access control layer is
introduced on top of it that verifies the identity of a user and then allows access to
the blockchain.

Shared Ledger
1. all blockchains, fall into the category of a shared ledger.

Tokenized blockchains
1. These blockchains are standard blockchains that generate cryptocurrency as a
result of a consensus process via mining or initial distribution.
2. Bitcoin and Ethereum are prime examples of this type of blockchain.

Tokenless blockchains
1. they do not have the basic unit for the transfer of value.
2. they are still valuable in situations where there is no need to transfer value
between nodes and only the sharing of data among various trusted parties is
required.
3. This is similar to full private blockchains, the only difference being that use of
tokens is not required.
4. This can also be thought of as a shared distributed ledger used for storing data.
5. It does have its benefits when it comes to immutability, security, and consensus
driven updates but are not used for common blockchain application of value
transfer or cryptocurrency.

Fully private and proprietary blockchains


1. in specific private settings within an organization, there could be a need to share
data and provide some level of guarantee of the authenticity of the data.
2. Ex: allow for collaboration and the sharing data between various government
departments.
3. In that case, no complex consensus mechanism is required, apart from simple
state machine replication and an agreement protocol with known central
validators.
4. Even in private blockchains, tokens are not really required, but they can be used
as means of transferring value or representing some real- world asset.

Private blockchain
1. they are open only to a consortium or group of individuals or organizations who
have decided to share the ledger among themselves.
2. Ex: HydraChain and Quorum.
Semiprivate blockchains
1. part of the blockchain is private and part of it is public.
2. this is still just a concept today, and no real world POCs have yet been
developed.
3. the private part is controlled by a group of individuals, while the public part is
open for participation by anyone.
4. semi-decentralized model, where it is controlled by a single entity but still allows
for multiple users to join the network by following appropriate procedures.

Sidechains
1. known as pegged sidechains.
2. is a concept whereby coins can be moved from one blockchain to another and
moved back again.
3. altcoins (alternative cryptocurrencies) whereby coins are burnt as a proof of an
adequate stake.

17. Differentiate between byzantine Fault Tolerance based consensus and Leader
Election based consensus algorithm.

Traditional Byzantine Fault Tolerance (BFT)-based: this method relies on a simple


scheme of nodes that are publisher-signed messages. Eventually, when a certain
number of messages are received, then an agreement is reached.
Leader election-based consensus mechanisms: This arrangement requires nodes to
compete in a leader- election lottery, and the node that wins proposes a final value. For
example, the PoW used in Bitcoin falls into this category

Two main categories of consensus mechanisms


1. Proof-based, leader-election lottery based, or the Nakamoto consensus whereby
a leader is elected at random (using an algorithm) and proposes a final value.
This category is also referred to as the fully decentralized or permissionless type
of consensus mechanism. This type is well used in the Bitcoin and Ethereum
blockchain in the form of a PoW mechanism.
2. BFT-based is a more traditional approach based on rounds of votes. This class of
consensus is also known as the consortium or permissioned type of consensus
mechanism.
3. BFT-based consensus mechanisms perform well when there are a limited
number of nodes, but they do not scale well. On the other hand, leader-election
lottery based (PoW) type consensus mechanisms scale very well but perform
very slowly.
4. Ex: PBFT, Hybrid BFT, BlockDAG, Tezos, Stellar, and GHOST- find the right
balance between scalability and performance.
18. List and explain the different types of consensus mechanisms used in block chain
technology.
Proof of Work (PoW):
1. This type of consensus mechanism relies on proof that adequate computational
resources have been spent before proposing a value for acceptance by the
network.
2. This scheme is used in Bitcoin, Litecoin, and other cryptocurrency blockchains.
3. Currently, it is the only algorithm that has proven to be successful against any
collusion attacks on a blockchain network, such as the Sybil attack.

Proof of Stake(PoS):
1. This algorithm works on the idea that a node or user has an adequate stake in
the system; that is, the user has invested enough in the system so that any
malicious attempt by that user would outweigh the benefits of performing such an
attack on the network.
2. This idea was first introduced by Peercoin, and it is going to be used in the
Ethereum blockchain version called Serenity.
3. Another important concept in PoS is coin age, which is a criterion derived from
the amount of time and number of coins that have not been spent.
4. In this model, the chances of proposing and signing the next block increase with
the coin age.

Delegated proof of stake(DPoS):


1. This is an innovation over standard PoS, whereby each node that has a stake in
the system can delegate the validation of a transaction to other nodes by voting.
2. It is used in the BitShares blockchain.

Proof of Elapsed Time(PoET)


1. Introduced by Intel in 2016, PoET uses a Trusted Execution Environment (TEE)
to provide randomness and safety in the leader election process via a
guaranteed wait time.
2. It requires the Intel Software Guard Extensions (SGX) processor to provide the
security guarantee for it to be secure.

Proof of Deposit
1. In this case, nodes that wish to participate in the network have to make a security
deposit before they can mine and propose blocks.
2. This mechanism is used in the Tendermint blockchain.

Proof of Importance
1. This idea is significant and different from PoS.
2. PoI not only relies on how large a stake a user has in the system, but it also
monitors the usage and movement of tokens by the user in order to establish a
level of trust and importance.
3. It is used in the NEM coin blockchain.

Federated consensus or federated Byzantine consensus


1. This mechanism is used in the stellar consensus protocol.
2. Nodes in this protocol retain a group of publicly-trusted peers and propagate only
those transactions that have been validated by the majority of trusted nodes.

Reputation-based mechanisms
1. a leader is elected by the reputation it has built over time on the network.
2. It is based on the votes of other members.

Proof of Activity
1. This scheme is a combination of PoS and PoW, which ensures that a stakeholder
is selected in a pseudorandom but uniform fashion.
2. This is a comparatively more energy-efficient mechanism as compared to PoW.
3. It utilizes a new concept called Follow the Satoshi.
4. In this scheme, PoW and PoS are combined together to achieve consensus and
good level of security.
5. This scheme is more energy efficient as PoW is used only in the first stage of the
mechanism, after the first stage it switches to PoS which consumes negligible
energy.

Proof of Capacity
1. This scheme uses hard disk space as a resource to mine the blocks.
2. This is different from PoW, where CPU resources are used.
3. In in PoC, hard disk space is utilized for mining and as such is also known as
hard drive mining.
4. This concept was first introduced in the Burstcoin cryptocurrency.

Proof of Storage
1. This scheme allows for the outsourcing of storage capacity.
2. This scheme is based on the concept that a particular piece of data is probably
stored by a node which serves as a means to participate in the consensus
mechanism.
3. Several variations of this scheme have been proposed, such as Proof of
Replication, Proof of Data Possession, Proof of Space, and Proof of Space-Time.

19. “A distributed system cannot have consistency, availability, and partition


tolerance simultaneously” - Justify

A distributed system cannot have consistency, availability, and partition tolerance


simultaneously.
1. Consistency is achieved if both nodes have the same shared state; that is, they
have the same up-to-date copy of the data.
2. Availability is achieved if both nodes are up and running and responding with the
latest copy of data.
3. Partition tolerance is achieved if communication does not break down between
two nodes (either due to network issues, Byzantine faults, and so forth), and they
are able to communicate with each other.
4. In blockchains, consistency is sacrificed in favor of availability and partition
tolerance.
5. In this scenario, Consistency (C) on the blockchain is not achieved
simultaneously with Partition tolerance (P) and Availability (A), but it is achieved
over time.
6. This is called eventual consistency, where consistency is achieved as a result of
validation from multiple nodes over time.
7. The concept of mining was introduced in Bitcoin for this purpose.
8. Mining is a process that facilitates the achievement of consensus by using the
PoW consensus algorithm.

20. Illustrate the working model of the public-key cryptography signature scheme with
suitable diagram.
Also called asymmetric cryptography or asymmetric key cryptography.
Asymmetric cryptography refers to a type of cryptography where the key that is used to
encrypt the data is different from the key that is used to decrypt the data. This is also
known as public key cryptography.

21. Explain the working principle of RSA digital signature algorithm with suitable
diagram.

Digital signing (left) and verification process (right) (Example of RSA digital signatures)

1. If a sender wants to send an authenticated message to a receiver, there are two


methods that can be used: sign then encrypt and encrypt then sign.
a. Sign then encrypt
With this approach,
i. the sender digitally signs the data using the private key,
ii. appends the signature to the data, and
iii. then encrypts the data and the digital signature using the receiver's public
key.
b. Encrypt then sign
c. With this method, the sender encrypts the data using the receiver's public key
and then digitally signs the encrypted data.

22. Explain the security properties of Message Authentication Codes.


Message Authentication Codes (MACs) provide two key security properties:

Message Integrity: MACs ensure that the message has not been altered during
transmission. Any modification to the message will result in a mismatched MAC tag upon
verification.

Message Authentication: MACs verify that the message was sent by someone who
possesses the secret key, confirming the sender’s authenticity. Only those with the key
can generate a valid MAC, preventing forgery.
23. Consider the following conditions and write the security property associated with
it.
i. h(x) = y
ii. m != x & h(m) = h(x)
iii. h(x) != h(z)

1. This property can be explained by using the simple equation shown as follows:
i.h(x) = y
2. Here, h is the hash function, x is the input, and y is the hash.
3. The first security property requires that y cannot be reverse-computed to x.
4. x is considered a preimage of y, hence the name preimage resistance.
5. This is also called a one-way property.

1. The second preimage resistance property requires that given x and h(x),
2. it is almost impossible to find any other message m, where m != x and hash of m
= hash of x or h(m) = h(x).
3. This property is also known as weak collision resistance.

1. The collision resistance property requires that two different input messages
should not hash to the same output.
2. In other words, h(x) != h(z). This property is also known as strong collision
resistance.

24. List out the various types of security protocols

Various types of security protocols – authentication protocols, non-repudiation protocols,


and key management protocols.

25. Explain the working principle of SHA-256 algorithm with suitable illustrations. (one
round compression function)

Refer crypto PPT


26. Give an appropriate scenario where the following wallets can be used.
a. Non deterministic wallets
b. Brain Wallets
c. Mobile Wallets
d. Online Wallets
e. Hierarchically Deterministic Wallets
f. Paper Wallets

Wallet software is used to store private or public keys and bitcoin address.
27. Illustrate the following scenario using protocol messages with suitable diagram.
Alice wants to establish a communication with bob. She needs to send a
transaction as a response to the getdata protocol message. Also she wants to
know the information about all of her peers.

Step 1: Alice sends a version message to Bob, indicating her intent to establish
communication. This message typically includes her protocol version, node ID,
timestamp, and other details about her node.

Step 2: Bob responds with a version message of his own, acknowledging


Alice’s request and establishing his end of the connection.

Step 3: Bob sends a verack (version acknowledgment) message to Alice to


confirm he has received and validated her version message.
Step 4: Alice responds with her own verack message, completing the
handshake and allowing them to communicate further.

Step 5: Bob sends a getdata message to Alice, requesting a specific


transaction or data he needs from her.

Step 6: Alice responds with a tx (transaction) message, providing the transaction


data Bob requested.

Step 7: Alice wants to know information about her peers, so she sends a
getaddr message to Bob, requesting addresses of her peers.

Step 8: Bob responds with an addr message, listing addresses of peers that
Alice can connect to.

28. Explain working principle of mining algorithm with suitable diagram.


29. Write down the command to know the current network target difficulty level to
generate a hash.
30. Represent a genesis block with suitable diagram.

31. Draw a Merkle tree to achieve Merkle Root as HABCDEFGHIJKLMNOP.

32. How does peer discovery works in peer to peer network?


33. “Alice wants to use her bitcoins to pay for some goods which Bob is selling
through bitcoin network.” - How double spending will be possible for the following
scenario? Give Explanation to prevent the double spending with suitable
illustrations.

Double spending in a cryptocurrency network like Bitcoin refers to the risk of a user (e.g.,
Alice) spending the same Bitcoin more than once. In a scenario where Alice wants to
pay Bob for goods using Bitcoin, double spending could occur if she tries to send the
same Bitcoin to another party (or even back to herself) while simultaneously paying Bob.

In this scenario, double spending could happen in several ways:

Race Attack:

Alice creates two transactions with the same input (unspent transaction output, or
UTXO).

She sends one transaction to Bob (to pay for goods) and sends a conflicting transaction
to a different recipient or back to herself.

If Bob accepts the transaction as valid without sufficient confirmations, there’s a risk that
Alice’s second transaction could be confirmed first, invalidating the transaction Bob
accepted.

Finney Attack:

Alice mines a block that includes a transaction paying herself with the same Bitcoin she
plans to send to Bob.
Before broadcasting this block, she sends a conflicting transaction to Bob for his goods.

If Bob delivers the goods before enough confirmations, Alice broadcasts her mined block
with her transaction, effectively canceling the transaction to Bob.

51% Attack:

If Alice controls more than 50% of the network’s mining power, she could attempt to
rewrite the blockchain to invalidate the transaction to Bob.

This would allow her to redirect the funds back to herself after Bob has already accepted
payment.

Preventing Double Spending: Solutions and Illustration

To prevent double spending, the Bitcoin protocol employs several key mechanisms.
Here’s how these mechanisms work to secure the transaction between Alice and Bob:

1. Use of Confirmations

Requirement: Bob should wait for multiple confirmations before considering the
transaction as final. In Bitcoin, six confirmations are generally considered secure.

Explanation: Each confirmation represents an additional block added after the block
containing Alice’s transaction. This makes it increasingly difficult and costly for Alice to
reverse the transaction, especially in a well-secured blockchain.

Illustration of Confirmations:

After six confirmations, it becomes extremely unlikely for the transaction to be reversed,
ensuring Bob’s payment is secure.

2. Using a Network of Nodes to Verify the Transaction

Requirement: Transactions are propagated to a large number of nodes in the network,


which verify the transaction's validity before including it in a block.
Explanation: When Alice broadcasts her transaction to pay Bob, it spreads across the
network and is added to the mempool (the pool of unconfirmed transactions). If Alice
tries to broadcast a second conflicting transaction, nodes will detect the double spend
and reject the conflicting transaction.

Illustration of Node Verification:

This process helps to prevent double spending, as only one transaction with the same
input can be confirmed in a block.

3. Use of Time-Stamped Blockchain

Requirement: Every block in the blockchain is timestamped and linked to the previous
block.

Explanation: The chronological order of transactions is maintained in the blockchain.


Once Alice’s transaction to Bob is added to a block and subsequently confirmed by
additional blocks, the time-stamped order makes it very difficult to alter or reverse the
transaction.

Illustration of Blockchain Time-Stamping:

Each block includes the hash of the previous one, creating a chain of secure,
time-ordered records that is difficult to alter.

34. Write a Script to send 10BTC to the anonymous receiver using P2PKH and P2SH
in Bitcoin Network.
35. Calculate a Network Difficulty of a block chain network for the given scenario.
Previous network target of the block chain is 500 and time taken to add a new
block in the current block chain is 20 minutes.

36. Assume that a node is proposing a new transaction in the block chain network.
Maximum Size of the block chain is 500 bytes. Output value of the proposed
transaction is 1000 BTC. nLock time of the proposed transaction contains 15 bits.
Number of Signature operation required is 3 and the proposed transaction
receives 15 confirmations after the successful execution of PoW. Size of the
proposed block is 250 bytes. Verify whether the given transaction is valid or not.
Justify your answer.
To determine the validity of the proposed transaction, we’ll need to examine each
parameter and confirm whether it aligns with the rules typically applied in blockchain
systems. Here’s a breakdown of each factor:

1. Maximum Block Size:


○ The blockchain’s maximum allowable block size is 500 bytes, and the
proposed transaction is within a block that is 250 bytes.
○ Condition Check: Since 250 bytes < 500 bytes, the block size constraint is
met.
2. Output Value of the Transaction:
○ The transaction proposes an output of 1000 BTC. There is no upper limit
specified for output value in typical blockchain protocols like Bitcoin, so
this value is permissible as long as it matches the sender's balance.
○ Condition Check: The output value of 1000 BTC does not violate any
restrictions here.
3. nLock Time:
○ The nLockTime value of 15 bits means it can represent values up to
215−1=327672^{15} - 1 = 32767215−1=32767.
○ In blockchain networks, nLockTime is typically used to delay the
execution of a transaction until a specific block height or timestamp. Since
this value does not affect transaction validity in terms of basic inclusion in
a block, there is no issue here.
○ Condition Check: The 15-bit nLockTime does not impact validity.
4. Signature Operations Required:
○ The transaction requires 3 signature operations, which should typically be
within the allowed limit for a standard block (e.g., Bitcoin allows a
maximum of 20,000 signature operations per block).
○ Condition Check: With only 3 signature operations required, this
transaction easily falls within acceptable limits.
5. Confirmations After Proof of Work (PoW):
○ After the block is mined and confirmed through PoW, it has received 15
confirmations. In most blockchains, 6 confirmations are generally
considered sufficient to ensure finality, so this is more than adequate.
○ Condition Check: The transaction has received more than enough
confirmations to be considered valid and secure.
6. Block Size vs Transaction Size and Network Limits:
○ Since the proposed block size is within the maximum block size limit, and
other parameters (output, nLockTime, signature operations,
confirmations) are within acceptable ranges, there’s no indication of
invalidity based on the provided constraints.

37. Define the term “Bit Coin”


It is a combination of peer-to-peer network,protocols, software that facilitate the creation
and usage of the digital currency named bitcoin.

38. Illustrate the process of node discovery protocol in bitcoin network with suitable
example.

39. Compare and contrast Full node and SPV nodes in Bitcoin network.
40. Assume that you are asked to establish a peer to peer connection among non
standard nodes in the bit coin network. Identify suitable protocol to do so and
justify your answer.
41. Identify the type of wallet used in the following scenarios and explain the steps to
be followed to make the payment.
Mr.X uses a wallet which stores randomly generated private keys for making
payments in the bitcoin network.
Mr.X uses a wallet in which keys are derived out of a seed value via hash
functions.
Mr.X uses a wallet which stores private keys in a tree structure derived from a
seed.
Mr.X uses a wallet in which master private key can also be derived from the hash
of passwords that are memorized
Mr.X uses a wallet which uses tamper-resistant device to store keys.
Mr.X uses a wallet which provides various methods to make payments, most
notably the ability to use smartphone cameras to scan QR codes quickly and
make payments.
42. Compare and contrast Hard Fork and Soft Fork in Bitcoin network.

Refer to Fork PPT

43. Discuss briefly about the elements of ethereum block chain.

Keys and Addresses: Ethereum uses asymmetric cryptography, specifically private and
public keys, to secure user identities and transactions. The private key is used to sign
transactions, while the public key generates an address, which is shared publicly as the
user’s identity on the network.
Accounts: Ethereum has two types of accounts – Externally Owned Accounts (EOAs),
controlled by private keys, and Contract Accounts, which are associated with smart
contracts. EOAs are controlled by users, while contract accounts run code and have no
private keys, making them accessible only through transactions.
Transactions and Messages: Transactions are operations that modify the blockchain
state, often involving the transfer of Ether or the execution of code on a smart contract.
Messages, often called internal transactions, are data sent between contracts as part of
transaction executions, enabling contract-to-contract interactions.
Ether (Cryptocurrency/Tokens): Ether (ETH) is the native cryptocurrency of the Ethereum
network and is primarily used to pay for computational work (gas fees) to execute
transactions or run smart contracts. Ethereum also supports ERC-20 tokens, which are
user-created tokens that can represent assets or currencies on the platform.
Ethereum Virtual Machine (EVM): The EVM is a decentralized runtime environment
where all Ethereum accounts and smart contracts live. It processes and executes smart
contract code using gas to measure computational steps. This ensures that all nodes in
the Ethereum network execute smart contracts consistently.
Smart Contracts: Smart contracts are self-executing code stored on the blockchain. They
run on the EVM and execute automatically when certain conditions are met, enabling
decentralized applications (DApps) by automating processes without intermediaries.

44. List out the steps involved in Ethereum state transition functions.

1. Confirm the transaction validity by checking the syntax, signature validity, and nonce.
2. The transaction fee is calculated, and the sending address is resolved using the
signature.
Furthermore, sender's account balance is checked and subtracted accordingly, and
nonce is incremented.
An error is returned if the account balance is not enough.
3. Provide enough Ether (gas price) to cover the cost of the transaction. This is charged
per byte incrementally proportional to the size of the transaction.
In this step, the actual transfer of value occurs.
The flow is from the sender's account to receiver's account.
The account is created automatically if the destination account specified in the
transaction does not exist yet.
Moreover, if the destination account is a contract, then the contract code is executed.
This also depends on the amount of gas available.
If enough gas is available, then the contract code will be executed fully; otherwise, it will
run up to the point where it runs out of gas.
4. In cases of transaction failure due to insufficient account balance or gas, all state
changes are rolled back except for fee payment, which is paid to the miners.
5. Finally, the remainder (if any) of the fee is sent back to the sender as change and fee
are paid to the miners accordingly. At this point, the function returns the resulting state
which is also stored on the blockchain.

45. Compare and Contrast the properties of Externally Owned Accounts and Contract
Accounts.
46. Whar are the different types of transactions in Ethereum Blockchain?
47. List out the essential parameters that are required when creating an account.

48. Compare and Contrast Decentralized Autonomous Organizations and


Decentralized Autonomous Societies.
49. List out the operations performed by DAPPS.

1. Establishment of consensus by a DApp can be achieved using consensus


algorithms such as PoW and PoS.
2. So far, only PoW has been found to be incredibly resistant to 51% attacks, as is
evident from Bitcoin.
3. Furthermore, a DApp can distribute tokens (coins) via mining, fundraising, and
development.

50. Define the term “Smart Contract”.


A smart contract is a secure and unstoppable computer program representing an
agreement that is automatically executable and enforceable.

51. “Smart contracts are inherently required to be deterministic.” – Comment on this


statement.
○ This property will allow a smart contract to be run by any node on a network and
achieve the same result.
○ If the result differs even slightly between nodes, then consensus cannot be
achieved, and a whole paradigm of distributed consensus on blockchain can fail.
○ Moreover, it is also desirable that the contract language itself is deterministic,
thus ensuring integrity and stability of the smart contracts.
○ Deterministic in the sense that there are no non-deterministic functions used in
the language, which can produce different results on various nodes.
○ A deterministic feature ensures that smart contracts always produce the same
output for a specific input.
○ In other words, programs, when executed, produce a reliable and accurate
business logic that is entirely in line with the requirements programmed in the
high-level code.

52. List out the properties of smart contract.


A smart contract has the following four properties:
1. Automatically executable
2. Enforceable
3. Semantically sound
4. Secure and unstoppable

53. Compare and Contrast Bitcoin and Ethereum Block chain.


54. Write a syntax to define a function in solidity language.
55. Write a structure for input parameters and output parameters of a function in
solidity language.

Input parameters of a function are declared in the form of <data type>


<parameter name>.
This example clarifies the concept where uint x and uint y are input parameters of the
checkValues function:

contract myContract
{
function checkValues(uint x, uint y)
{
}
}

Output parameters of a function are declared in the form of <data type>


<parameter name>. This example shows a simple function returning a uint value:

contract myContract
{
function getValue() returns (uint z)
{
z=x+y;
}
}

A function can return multiple values. In the preceding example function, getValue only
returns one value, but a function can return up to 14 values of different data types.

56. Illustrate the issues in solidity language using suitable example. (Solidity
programs)

REFER PPT - Issues

57. List out the various functionalities performed by iterator in Ethereum Virtual
Machine.
58. Describe the implementation of chain code in hyperledger fabric.
[Link] “Solo” and “Kafka” Ordereing Schemes.

[Link] the following sceenario. Mr.X wants to discover the list of peers participating
in his peer to peer network and transfer 100 ether to his immediate peer using
hyperledger fabric. Explain the different kind of message communication he is supposed
to use in order to complete the given scenario.
[Link] the various components of the fabric with reference architecture.

1. Consensus layer: These services are responsible for facilitating the agreement process
between the participants on the blockchain network.
2. The consensus is required to make sure that the order and state of transactions is
validated and agreed upon in the blockchain network.
3. Smart contract layer: These services are responsible for implementing business logic as
per the requirements of the users. Transaction are processed based on the logic defined
in the smart contracts that reside on the blockchain.
4. Communication layer: This layer is responsible for message transmission and exchange
between the nodes on the blockchain network.
5. Security and crypto layer: These services are responsible for providing a capability to
allow various cryptographic algorithms or modules to provide privacy, confidentiality and
non-repudiations services.
6. Data stores: This layer provides an ability to use different data stores for storing state of
the ledger. This means that data stores are also pluggable and allows usage of any
database backend.
7. Policy services: This set of services provide the ability to manage different policies
required for the blockchain network. This includes endorsement policy and consensus
policy.
8. APIs and SDKs: This layer allows clients and applications to interact with the blockchain.
An SDK is used to provide mechanisms to deploy and execute chaincode, query blocks
and monitor events on the blockchain.

[Link] the membership services offered by hyper ledger fabric


63. Explain the Consensus services offered by hyper ledger fabric.

[Link] and explain the Requirements and Design goals of hyper ledger fabric.

You might also like