Fabric Flashcards
1
Q
World state component
A
- Describes the state of the ledger at a given point in time.
- The ledger has a replaceable data store for the world state.
- By default, this is a LevelDB key-value store database (or CouchDB).
2
Q
Transaction log component
A
Records all transactions which have resulted in the current value of the world state.
3
Q
How assets are represented in Hyperledger Fabric
A
- As a collection of key-value pairs.
- Can be represented in binary and/or JSON form.
4
Q
Ordering service
A
- The ordering service is the component which gathers endorsed transactions from applications and orders them into transaction blocks, which are subsequently distributed to every peer node in the channel. It does this according to the policies defined in channel configuration.
- When acting at the network level, ordering service role is to provide a management point for network resources according to the policies defined in network configuration.
- When acting at the channel level, orderer role is to gather transactions and distribute blocks inside channel.
5
Q
Membership Service Provider (MSP)
A
- The mapping of certificates to member organizations.
- The MSP identifies which Root CAs and Intermediate CAs are accepted to define the members of a trust domain by listing the identities of their members, or by identifying which CAs are authorized to issue valid identities for their members.
- MSP goes beyond simply listing who is a network participant or member of a channel. It is the MSP that turns an identity into a role by identifying specific privileges an actor has on a node or channel.
6
Q
Smart Contracts, how to create them
A
- Client application has to go through smart contract to get to ledger.
- Smart contract must be installed on the peer to access the ledger, and then defined on a channel (instantiated).
- Each organization needs to approve a chaincode definition
- Program Logic remains private to those nodes who have installed it
- Supplied within the chaincode definition (during instantiation) is the endorsement policy. It describes which organizations must approve transactions before they will be accepted by other organizations onto their copy of the ledger.
7
Q
Chaincode vs Smart Contract
A
- Multiple smart contracts can be defined within the same chaincode.
- When a chaincode is deployed, all smart contracts within it are made available to applications. Endorsement policy applies to all of the smart contracts defined within it.
8
Q
System Chaincodes
A
Domain independent system interactions, unrelated to these smart contracts for business processes.
9
Q
Order-Execute Transaction process
A
- Validates and orders transactions then propagates them to all peer nodes.
- Each peer then executes the transactions sequentially.
- Must be deterministic - for this reason written in DSL like Solidity.
- Transactions are executed sequentially by all nodes, performance and scale is limited.
10
Q
Execute-Order-Validate Transaction process
A
- Execute (endorse) a transaction and check its correctness, thereby endorsing it. Each transaction need only be executed (endorsed) by the subset of the peer nodes necessary to satisfy the transaction’s endorsement policy (like - each org must endorse given transaction). This allows for parallel execution increasing overall performance and scale of the system.
- Order transactions via a (pluggable) consensus protocol.
- Validate transactions against an application-specific endorsement policy before committing them to the ledger.
11
Q
Fabric Channel
A
- In Fabric channels, participants on a Fabric network establish a sub-network where every member has visibility to a particular set of transactions.
- Channel works like a network tunnel.
- If two participants form a channel, then those participants — and no others — have copies of the ledger for that channel.
- Channels contain Membership Service Provider instances allowing for crypto materials to be derived from different certificate authorities.
- A channel’s ledger contains a configuration block defining policies, access control lists, and other pertinent information.
12
Q
What is system channel
A
Using the system channel ordering service nodes distribute network configuration transactions.
13
Q
How network and channel configurationsare stored
A
- Every configuration change results in a new configuration block transaction being generated.
- All peer nodes have a copy of channel configuration.
- Every ordering service node will have its own copy of the network configuration.
14
Q
Private Data on Fabric
A
- Private data allows collections between members on a channel, allowing much of the same protection as channels without the maintenance overhead of creating and maintaining a separate channel.
- Thus, channels keep transactions private from the broader network whereas collections keep data private between subsets of organizations on the channel.
- The actual private data is sent peer-to-peer via gossip protocol to only the organization(s) authorized to see it can be accessed from chaincode on these authorized peers.
- A hash of that data, which is endorsed, ordered, and written to the ledgers of every peer on the channel. The hash serves as evidence of the transaction and is used for state validation and can be used for audit purposes.
15
Q
Peers
A
- Peer nodes are the network components where copies of the blockchain ledger are hosted.
- Peer node configuration has an X.509 identity which associates peer with it’s Organization. Orderer uses the channel configuration to determine peer permissions on this channel.