Hyperledger Flashcards
What is Hyperledger
Umbrella project for an open-source software that enables institutions to set up a shared and trustless ledger database for collaboration
3 Features of the Hyperledger Fabric
- permissioned network (MSP to enroll new nodes)
- channels and multi-ledger (connections between peers; each member of a channel maintains a copy of the channel’s specific ledger)
- chaincode (network operators (system chaincode) and developers (application chaincode) to define business logic for the whole channel or a transaction)
What is the MSP?
Membership Service Provider is responsible for only letting authorised clients join the network.
Applications
- handle the UI and enable an end user to use the blockchain
- submit transactions to the network and invoke chaincode calls
Ordering Service main task?
Transactions are ordered sequentially
- transactions are put into a block
- blocks are broadcast to peers that hold the chaincode and ledger
- takes care of authentication
Ordering Service holds chaincode or ledger?
- consists of one or more ordering nodes. The nodes do not store chaincode or the ledger
Ordering Service gets information from?
- applications must submit transactions to an ordering service node.
Peer
- comparable to full node in Bitcoin. Maintains the state of the ledger and executes transactions
- delivers events
Roles for peers
- committing peer (commits transactions, verifies endorsements, validates transactions)
- endorsing peer (is a committing peer, takes transaction proposals and executes them to create endorsements)
What is the chaincode?
- technical container of a group of related smart contracts
- allows to write business logic that changes the state of the ledger
Pros of execution-order-validate
- simultaneous TXs & endorsements
Limitations of Order-Execute
- sequential execution:
of transaction sequentially on all peers limits the effective throughput - non-deterministic code: applications written in general purpose PL need to follow endorsement policies (so be deterministic) otherwise they are rejected by endorsing peers
- confidentiality of execution: (only a few trusted endorsing peers execute the TXs against the chaincode, the rest just updates the state)
Transaction flow steps
- Application submits transaction proposal
- endorsing peers execute the transaction proposal
- read/write set is signed and returned to the application
- signed responses are sent to the ordering service
- ordering service distributes new block to all committing peers
- committing peers validate the transaction (RW set is written to the ledger and new block is added)
- Notify application
RAFT
- crash fault tolerant service
- leader is elected among the ordering nodes and that leader replicates messages to the follower nodes
- as long as there is majority of ordering nodes remaining it is crash fault tolerant (CFT)
- step towards byzantine fault tolerance
channel
a separate blockchain
- only managed by a subset of all available nodes
- isolates transactions of different ledgers