BC III IA Question Bank (1) Ans
BC III IA Question Bank (1) Ans
Keys and addresses Keys and addresses are used in the Ethereum blockchain
to represent ownership and transfer ether. The keys used are made up of pairs
of private and public parts. The private key is generated randomly and is
kept secret, whereas a public key is derived from the private key. Addresses
are derived from public keys and are 20-byte codes used to identify
accounts.
2. The public key is then derived from this private key using the Elliptic
Curve Digital Signature Algorithm (ECDSA) recovery function.
3. An address is derived from the public key, specifically, from the rightmost
160 bits of the Keccak hash of the public key.
• A private key:
b51928c22782e97cca95c490eb958b06fab7a70b9512c38c36974f47b954ffc4
• A public key:
3aa5b8eefd12bdc2d26f1ae348e5f383480877bda6f9e1a47f6a4afb35cf998ab
847 f1e3948b1173622dafc6b4ac198c97b18fe1d79f90c9093ab2ff9ad99260
• An address: 0x77b4b5699827c5c49f73bd16fd5ce3d828c36f32
2. Ans(i)
2. Sender Address
• This is the address of the person (or contract) who started the transaction or call.
3. Gas Price
• It's how much the sender is willing to pay per unit of gas.
• Higher gas price can make your transaction get picked up faster by miners.
4. Input Data
• This is the data sent to the contract, like function name and parameters.
• The original address that started the transaction, even if it went through several
contracts.
6. Value
7. Bytecode
• It runs on the Ethereum Virtual Machine (EVM) and lives on the blockchain.
8. Block Header
10. Permission
• These are rules or settings that define what actions the contract can take.
1. Available Gas
3. Memory Contents
o Used for storing data needed only during execution (not persistent).
4. Number of Words
5. Stack Contents
(iii)
In Ethereum, native contracts (also called precompiled contracts) are special contracts that
are hardcoded into the Ethereum Virtual Machine (EVM). They are optimized for
performance and perform complex cryptographic functions with reduced gas costs.
The Istanbul release of Ethereum includes 9 native contracts at fixed addresses (0x01 to
0x09). These are:
o Gas: 3000.
o Output: 32 bytes.
o Output: 20 bytes.
3 ANS
The Ethereum Virtual Machine (EVM) is a 256-bit stack-based virtual machine used to
execute smart contracts in Ethereum. It transforms the system state by executing bytecode
instructions.
EVM Operation
1. Program Code:
Stored in Virtual ROM, this is the smart contract bytecode.
2. CODECOPY Instruction:
Copies program code from ROM to Main Memory for execution.
3. Main Memory:
A temporary, word-addressable memory (like RAM), where instructions (like PUSH,
ADD, STOP) are stored as 256-bit words.
4. Program Counter:
Keeps track of the next instruction to be executed.
5. EVM Stack:
A LIFO stack with a maximum depth of 1024, used to perform all computations. It
stores 32-byte (256-bit) values. Instructions operate by pushing/popping values
on/from the stack.
6. Execution:
7. Exception Handling:
If gas runs out or an invalid instruction is encountered, the EVM halts execution and
reverts changes.
Storage
Description Volatile Access
Type
4.ANS
Ethereum is a state machine – every transaction changes the state of the system. That state
must be securely stored and verifiable, which is done using data structures like tries (prefix
trees) and hashes.
• It’s stored using a Merkle Patricia Trie (MPT) for efficient verification, updating,
and security.
• This trie is hashed into a State Root, stored in the block header (proof of the whole
blockchain state at that block).
Field Description
Number of transactions sent from the account (used to prevent replay attacks).
Nonce
For contracts, it’s the number of contracts created.
Storage
Root hash of the Account Storage Trie (MPT) that stores smart contract data.
Root
Code Keccak-256 hash of the smart contract code. For externally owned accounts
Hash (EOAs), it's the hash of an empty string.
Diagram Explanation
1. Account State
• The root hash of this trie is the storage root field in the account.
• This root is stored in the block header, so any node can verify the full Ethereum state
using this hash.
5.ANS
What is Hyperledger?
• Its goal is to help create tools and frameworks so companies can build strong
and secure blockchain applications.
1. Distributed Ledgers
These are actual blockchain platforms that you can use to build and run blockchain
networks.
• Fabric: A flexible and secure blockchain for businesses where only approved
members can join.
2. Libraries
These are sets of tools that developers can reuse when building blockchain
applications.
3. Tools
• Cello: Makes it easy to create and manage blockchain networks like a service.
6.ANS
1. Hyperledger Aries
• What it is: A toolkit for handling digital identities and secure communication
between people or systems.
• Why it’s useful: It helps build systems where users control their own digital identity
and can share verified information safely.
• Example: Imagine a digital ID card that you own and can share with others without
needing a middleman.
2. Hyperledger Transact
• What it is: A tool that helps run and manage the rules for transactions (like contracts
or agreements) on different blockchains.
• Why it’s useful: It allows developers to write transaction logic once and use it on
different blockchain platforms.
• Example: You write a set of rules for buying and selling something, and you can run
those rules on different blockchains like Sawtooth or Fabric.
3. Hyperledger Quilt
• What it is: A tool that helps different blockchains talk to each other and move money
or assets between them.
• Why it’s useful: It lets you transfer value across different blockchain networks
smoothly.
• What it is: A shared toolkit for cryptography (which is like secret codes and security
math).
• Why it’s useful: It helps all projects use strong, tested security methods without each
project having to build their own from scratch.
• Example: When a project needs to securely sign data or prove something without
revealing too much info, it uses Ursa to do it safely.
7.ANS
What is this diagram?
This diagram shows how Hyperledger, an enterprise blockchain platform, is built from
different parts — like building blocks that work together to run a secure and trusted
blockchain network.
There are 5 major parts (colored boxes) that represent different jobs in the system:
• Includes:
• Includes:
Like college rules – who can enter which building, who can see exam results, etc.
• Includes:
Like a shared online notebook that everyone can see but can’t change without
permission.
• It sits above the blockchain, meaning it works with the blockchain to process
activities like:
o Submitting data
o Checking if it’s valid
o Recording it
Like the main office that handles all form submissions in a college.
• Includes:
Like a vending machine — you press a button (trigger a contract), and it gives
you something automatically based on rules.
• Like a notice board or WhatsApp group where everyone gets updates in real-
time.
8.ANS
Hyperledger Fabric is a private and secure blockchain system where only authorized
members can join, share data, and run business logic using smart contracts (called
chaincode here). It's modular, flexible, and supports smart contracts in different
languages like Go, Java, and Node.js.
• Issues:
Think of it like a college ID system where only registered students/staff are allowed
in.
2. Blockchain Services
a. Consensus Services
o Kafka (crash-tolerant)
o Raft (leader-based)
b. Distributed Ledger
• Made up of:
Like your notebook (blockchain) + marks list (world state) that keeps getting
updated.
c. Peer-to-Peer (P2P) Protocol
• Types of messages:
Like students sharing info using WhatsApp – who’s online, what’s new, etc.
d. Ledger Storage
• These are rules and logic written in code, called Chaincode in Fabric.
Components:
Like an automatic vending machine that gives items when rules are met.
9.ANS
Transaction Lifecycle in Hyperledger Fabric (Figure 17.8 Explained)
Purpose:
This diagram shows how a transaction flows from a client to the ledger, passing through
various components like endorsers, orderers, and committers.
Step-by-Step Explanation:
2. Simulation by Endorser
• The endorsed RW Set is signed and sent back to the Fabric SDK.
• The orderer does not verify the logic – it just takes the transaction and queues it.
7. Validation by Committers
9. Notification to Client
10.ANS
This diagram shows how a transaction (e.g., "transfer coins" or "update product
status") flows through the Hyperledger Sawtooth network — from a client all the way
to being saved in the blockchain.
Step-by-Step Flow:
• A client creates and sends a transaction using a REST API to a validator node.
• This is like submitting a form to the blockchain.
• The validator node shares the transaction with other validators in the network.
• One of the validators is chosen as the leader (by the consensus engine).
• This leader puts the transaction(s) into a candidate block — a proposed new
block for the chain.
4. Block Propagation
• Think of this as sharing the proposed update with the whole class before
finalizing it.
5. Validation of Block
• This step uses a transaction processor (smart contract logic) to check and
execute each transaction inside the block.
6. Block is Committed
o All validators do this locally (in their own copy of the ledger).
11.ANS
• Originally designed for the financial industry, but now used in healthcare,
insurance, supply chain, and government.
• Solves the problem of different organizations keeping their own copies of data,
reducing errors, cost, and complexity.
o Corda Enterprise – for businesses with extra features like firewall, high
availability, and better security
Main Components:
1. Corda Node:
3. Doorman (Permissioning):
4. Notary Service:
5. Vault:
6. Client Applications:
7. Administrator:
8. AMPQ / TLS:
1. Node
a. Persistence Layer
b. Network Interface
c. RPC Interface
d. Service Hub
• Offers helpful tools and services (e.g., access to vaults, storage) that CorDapps
and flows can use.
f. CorDapp Interface
• CorDapps are smart contracts and workflows built for business use.
2. CorDapps
3. Other Nodes
4. Node’s Owner
• Communicates with the node via RPC client and Web server.
7. Notary Service
8. Oracle Service
• Feeds real-world data into the Corda network (like exchange rates, weather,
etc.).
Transactions in Corda
Vaults
• Use SQL databases and can hold both on-ledger and off-ledger data.