You are on page 1of 7

18 December 2022 22:30

What are the advantages of smart contracts


1. Cost efficiency
Smart contracts promise to automate business processes that span organisational
boundaries. This can eliminate many operational expenses and save resources, including
the personnel needed to monitor the progress of a complex process that executes in
response to condition that span companies.

2. Processing Speed
Smart contracts can improve the processing speed of business processes that run across
multiple enterprises.

3. Autonomy
Smart contracts are performed automatically by the network and reduce the need for a
third party to manage transaction between businesses.

4. Reliability
Smart contracts can also take advantage of blockchain ledgers and other distributed
ledger technologies to maintain a verifiable record of all activity relate to execution of
complex processes and that cannot be changed after the fact. It also supports automated
transaction that remove the potential for human error and ensure accuracy in executing
the contracts.
______________________________________________________________________________
What are the layers of blockchain.?

⚫ Network layer
⚫ The network layer which is also known as the P2P layer is the one that is responsible for
internode communication.

Blockchain Page 1
internode communication.
⚫ Network layer takes care of discovery, transactions, and block propagation.
⚫ This layer can also called as propagation layer.
⚫ This P2P layer ensures that nodes can discover each other and able to communicate,
propagate and synchronize with each other to maintain valid current state of the blockchain
network.
⚫ P2P network is a computer network where nodes are distributed and share the network’s
workload to reach the end goal.
⚫ Nodes perform transactions in the blockchain.
⚫ There are two kinds of nodes i.e full node and light node.
⚫ Full nodes guarantees the verification and validation of transactions, mining and
enforcement of consensus rules.
⚫ Light nodes only keep the header of the blockchain and can send transactions.

⚫ Consensus layer
⚫ The consensus layer is the core to the existence of blockchain platforms.
⚫ The consensus layer is the most critical and crucial layer for any blockchain be it Ethereum,
Hyperledger or any other.
⚫ Consensus layer is responsible for validating the blocks, ordering the blocks and ensuring
everyone agrees on it.
⚫ The following are the key points regarding the consensus layer:
⚫ Consensus layer create a definite set of agreements between nodes across the distributed
P2P network.
⚫ Consensus layer ensures that power remains distributed and decentralized.
⚫ Thus no single entity can control the entire blockchain network.
⚫ Consensus layer guarantees that a single chain is followed and that it holds the truth.
⚫ Consensus layer is the rules that nodes follow to ensure that transactions are validated
within the boundaries of those rules and that blocks follow those rules.
⚫ Consensus protocol helps to achieve the reliability in a P2P network.

⚫ Application layer
⚫ The application layer comprised of smart contracts, chaincode and DApps.
⚫ Application layer is further divided into two sub-layers i.e application layer and execution
layer.
⚫ Application layer comprise of the applications that are used by end users to interact with
the blockchain network.
⚫ It comprises of scripts, APIs, user interfaces and frameworks.
⚫ For these applications blockchain network is the back-end system and they connect with
blockchain network via APIs.
⚫ Execution layer is the sublayer which consists of smart contracts, underlying rules and
chaincode.
⚫ A transaction travels from application layer to execution layer however the transaction is
validated and executed at the semantic layer.
⚫ Applications send instructions to execution layer which performs the execution of
transactions and ensure the deterministic nature of the blockchain.
_____________________________________________________________________________

What are the uses of sha algorithm


• It’s a secure and trusted industry standard: SHA-256 is an industry standard that is
trusted by leading public-sector agencies and used widely by technology leaders.

Blockchain Page 2
• Collisions are incredibly unlikely: There are 2256 possible hash values when using
SHA-256, which makes it nearly impossible for two different documents to coincidentally

have the exact same hash value. (More on this in the following section).

• The avalanche effect: Unlike some older hashing algorithms, even a very minor change
to the original information completely changes the hash value—what is known as an
avalanche effect.

_____________________________________________________________________________

Which are the components of blockchain

1.Node Application:-
⚫ Every computer, connected to the internet, needs a node application specific to the
blockchain ecosystem that it wants to participate in.
⚫ some of the examples of node application are bitcoin wallet application and bankchain
application.
⚫ Participation through node application may or may not be free from any restrictions.
⚫ for example, in case of a Bankchain as a Blockchain ecosystem, only banks are allowed to
participate.

2.Distributed Ledger (database)


⚫ The distributed ledger means the shared contents and databases available to the
participants of a particular Blockchain Ecosystem.
⚫ The shared ledger lists down the rules or guidelines that need to be followed in each node
application in the blockchain ecosystem.
⚫ For example if you are running a Bitcoin node application, then you have to abide by all the
rules set down in the program code of the Bitcoin node application.
⚫ Can one participate in more than one node application? Absolutely! You can be a part of as
many node applications as you wish and are allowed to (i.e. node applications where there are
no restrictions to enter).

Blockchain Page 3
no restrictions to enter).
3.Consensus Algorithm
⚫ The consensus algorithm provides permanence and security to the data in the blockchain.
⚫ It depicts status of the network and how the nodes in the network arrive at an agreement
regarding what transactions to accept.
⚫ What protects the blockchain from tampering is the fact that changing a block can be done
only by making a new block from its predecessor and it also requires re-generating all successors
and redoing their contents.
⚫ It is to be noted that every block in the blockchain contains a hash of its predecessor block,
thus having a chain of blocks with enormous amount of work contained in them.
⚫ For example, the time taken by Bitcoin to arrive at a consensus of the ledger is a few
minutes while that of ripple is merely a few seconds.
_____________________________________________________________________________

What are the task of miners?


Miners
⚫ Miners create new blocks on the chain through a process called mining.
⚫ In a blockchain every block has its own unique hash, but also references the hash of the
previous block in the chain, so mining a block isn't easy, especially on large chains.
⚫ Miners use special software to solve the incredibly complex math problem of finding a
nonce that generates an accepted hash. Because the nonce is only 32 bits and the hash is 256,
there are roughly four billion possible nonce-hash combinations that must be mined before the
right one is found. When that happens miners are said to have found the "golden nonce" and
their block is added to the chain.
⚫ Making a change to any block earlier in the chain requires re-mining not just the block with
the change, but all of the blocks that come after. This is why it's extremely difficult to
manipulate blockchain technology. Think of it as "safety in math" since finding golden nonces
requires an enormous amount of time and computing power.
⚫ When a block is successfully mined, the change is accepted by all of the nodes on the
network and the miner is rewarded financially.
_____________________________________________________________________________

What is gas and gas limit


Gas is the name for the execution fee that the senders of the transaction will pay for
verification. The more complex computation, the more gas is required to run the smart contract.
"Gas limit" is the maximum amount of work you're estimating a validator will do on a particular
transaction.
_____________________________________________________________________________

What is public and private blockchain


1. Public blockchain:-
• It is the Permissionless distributed ledger technology where anyone can join and do their
transaction.
• Public blockchain is non-restrictive version where each and every peer has a copy of the ledger.
• Also means that anyone can the public blockchain,if they have an internet connection to do
transactiosns in a decentralized manner.
• This user can access current and past records and conduct mining activities, the complex
computations used to verify transactions and add them to the ledger.
• More secure if the users strictly follow security rules and methods.
• Unsafe when participants do not follow the security protocols.

2. Private blockchain

Blockchain Page 4
2. Private blockchain

• A blockchain network that works in a restrictive environment like a closed network, or that is
under the control of a single entity, is a private blockchain.
• While it operates like a public blockchain network in the sense that it uses peer-to-peer
connections and decentralization, this type of blockchain is on a much smaller scale.
• Instead of just anyone being able to join and provide computing power, private blockchains
typically are operated on a small network inside a company or organization.
• They're also known as permissioned blockchains or enterprise blockchains.

_____________________________________________________________________________

What are the benefits of immutable ledger.


• Data Integrity
• Ensures Authenticity and High Quality
• Simplifies Auditing
• Enhanced Privacy
• Problem Solver
• Rising Opportunities
• Prevention of Disputes
_____________________________________________________________________________

List and explain value data types in Solidity.


Value type data types in solidity are listed below:
• Boolean: This data type accepts only two values True or False.
• Integer: This data type is used to store integer values, int and uint are used to
declare signed and unsigned integers respectively.
• Fixed Point Numbers: These data types are not fully supported in solidity yet, as per
the Solidity documentation. They can be declared as fixed and unfixed for signed and
unsigned fixed-point numbers of varying sizes respectively.
• Address: Address hold a 20-byte value which represents the size of an Ethereum
address. An address can be used to get balance or to transfer a balance
by balance and transfer method respectively.
• Bytes: Although bytes are similar to strings, there are some differences between them.
bytes used to store a fixed-sized character set while the string is used to store the
character set equal to or more than a byte. The length of bytes is from 1 to 32, while the
string has a dynamic length. Byte has the advantage that it uses less gas, so better to
use when we know the length of data.
• Enums: It is used to create user-defined data types, used to assign a name to an
integral constant which makes the contract more readable, maintainable, and less prone
to errors. Options of enums can be represented by unsigned integer values starting from
0.
_____________________________________________________________________________

Define transaction and explain its structure.


A transaction refers to a contract, agreement, transfer, or exchange of assets between
two or more parties. The asset is typically cash or property. Likewise, a blockchain
transaction is nothing but data transmission across the network of computers in a
blockchain system. The network of computers in a blockchain store the transactional
data as replicas with the storage typically referred to as a digital ledger.
• Hash encryptions

Blockchain Page 5
• Authentication and authorization
• Mining
• Proof of work
• Proof of stake

Who published a white paper proposing Ethereum in 2013?


• Vitalik Buterin

In which type of network each and every node is itself


client and server?
• Peer-to-Peer Network

what is EVM in blockchain


• The Ethereum Virtual Machine, or EVM, serves as a ‘virtual computer’ or software platform utilized
by developers for creating decentralized applications. EVM could also help in executing and
deploying smart contracts on the Ethereum blockchain.

Which institute standardized AES algorithm


• The National Institute of Standards and Technology (NIST)

What is nonce
• Nonce stands for ‘number used only once’
• i.e. nonce refers to a number or value that can only be used once.
• Nonce is a 32bit(4 byte) random number which can be used one-time.

What Is non repudiation


• Digital signatures ensure that the message received by a recipient has come from the sender
claiming to have sent the information. The property is known as non-repudiation.

What is ICO
• Initial coin offerings (ICOs) are a popular way to raise funds for products and services usually related
to cryptocurrency.

who owns the blockchain


• Summing up. To put it succinctly, nobody owns blockchain technology, and yet, everybody owns it.
That is one of the unique features of blockchain tech, and this collective ownership and
accountability is what makes blockchains very secure and immutable.

What happens if someone loses the private key of this wallet?


• If a user loses their private key, they can no longer access the wallet to spend, withdraw, or transfer
coins. It is, therefore, imperative to save the private key in a secure location. There are a number of
ways that a digital wallet that contains a private key can be stored.

Blockchain Page 6
Blockchain Page 7

You might also like