hyperledger
play

Hyperledger Georgios Pallikaras 1 Overview History What is the - PowerPoint PPT Presentation

Hyperledger Georgios Pallikaras 1 Overview History What is the Hyperledger? Components Transactions Comparison to Corda and Ethereum 2 02/12/2020 2 History Traditional model One business network Many transaction


  1. Hyperledger Georgios Pallikaras 1

  2. Overview ∙ History ∙ What is the Hyperledger? ∙ Components ∙ Transactions ∙ Comparison to Corda and Ethereum 2 02/12/2020 2

  3. History Traditional model One business network ∙ Many transaction records ∙ New Technologies Digitalization ∙ Cloud ∙ Same old structure ∙ 3

  4. History What if instead of the old structure there is a new common, private network for businesses? 4

  5. History In 2015 the linux foundation announced the hyperledger project Umbrella project It is a platform that encourages a collaborative approach to developing blockchain technologies 5

  6. What is the Hyperledger Fabric? Hyperledger is a cross-industry blockchain technology. ∙ Encourages businesses to create Private and Permissioned blockchain ∙ systems. Shared ledger ∙ Smart Contracts (GOlang, NodeJS, Java) ∙ Modularity ∙ 6

  7. ● Like all blockchains, fabric stores history of transactions in a chronological ledger What actually stores? There is no specific currency in fabric Assets They can be anything: Real estate to contracts or just foods Represented as binary or in JSON format 7

  8. Chaincode ● In fabric assets can be modified by the use of chaincode (smart contracts) ● It’s software that defines and modifies the assets and transaction instruction ● Members of the private network interact with the ledger via chaincode 8

  9. How exactly it works? Key Words: Which words do you think are 1. Organizations the most important ones? 2. Network 3. Ordering service 4. Policies 5. Certified authority 6. Membership Service Provider (MSP) 7. Consortium 8. Channels 9. Peers and Ledgers Did you notice? 10. Applications and Smart Contacts - Ledger s 9

  10. Let’s Start... In order to start an organization needs (R4) to create a network . A network is defined by the ordering service. O4 The R4 is the one who created the configuration that includes the policies applied to that network Ordering service? CA4? Later... 10

  11. What is the CA4? Via PKI The network is private and permissioned. Every organization and its members that wants to join the network has to provide an digital identity. Digital identity: cryptographically validated digital certificates Provided by certificate authorities . The mapping of certificates to member organizations is achieved by via a structure called Membership Service Provider . 11

  12. Membership Service provider The MSP provides credentials to the clients. It is a structure that maps an organization to the certificate this organization holds. Because the private key (that the CA provides to an organization) can never be shared, the MSP is the mechanism that proves that the organization is the one that it claims to be. Authenticates , authorizes , and manages identities on a permissioned blockchain network 12

  13. Continue... R1 can have administrative rights to the network as long as the NC4 configurations are updated by R4. Now both have administrative rights to the network even if O4 runs under R4 infrastructure 13

  14. Consortium “A group with a shared destiny” Some businesses may need to interact with each other. In order to do that the administrators need to let those organizations join the network and then create a group called consortium. A consortium defines the set of organizations in the network who share a need to transact with one another But how do they interact? 14

  15. CHANNELS Private Communication mechanism for consortium members ● Completely separated configuration and policies Admins allowed the creation of the channel. BUT 1. No participating in the channel unless R1 and R2 approve 2. No modification of CC1 policies What about O4? 15

  16. CHANNELS Why they are important in the Hyperledger Fabric? It is a mechanism for private communication and private data amongst participants. “Free from the network” Data and infrastructure is isolated for the members. 16

  17. Where are the nodes, the ledger, the smart contracts and in general the Blockchain? 17

  18. Peer nodes are the network components where copies of the blockchain ledger are hosted. They join channels and they have identity. (P1 from CA1) Peer send join request to O4. O4 uses cc1 to determinate P1 permissions. Copy of the Ledger is physically stored in peers but in logically belongs to channels. 18

  19. Smart contract defines the transaction logic. It is installed on peers and defined to the channel. The client application (A1) uses the channel to “interact” with the Ledger but only via the smart contract. Did you notice the word interact? Can someone interact with the Ledger? 19

  20. Smart contracts continued After a smart contract is developed it can be installed in any peer node that belongs to the organization. No need to install in every node. In order for the other components of c1 to be able to interact with S5 the S5 should be instantiated into c1. 20

  21. Some important details about smart contracts and chaincode: Each organization -that participates in the channel- needs to approve a chaincode definition, a set of parameters that establish how a chaincode will be used on a channel. Only then the smart contract can be used to interact with the ledger. Even if an application is connected to the channel and can access the ledger via the smart contract, it doesn’t mean that it can see the actual code written. This is private to the peer that the smart contract is installed to. The applications of the channel can see only an interface. 21

  22. The Ledger In Hyperledger Fabric, a ledger consists of two distinct parts – a world state and a blockchain. ● World state holds the current values of a set of ledger state. It makes it easier to access the current value of a state rather than checking the entire transaction log. The world state can change frequently, as states can be created, updated and deleted. (key-value pairs) ● The blockchain is a transaction log that records all the changes that have resulted in the current the world state. It is immutable . 22

  23. World State A ledger state records a set of facts about a particular business object. An application program can invoke a smart contract which uses simple ledger APIs to get, put and delete states. The world state is implemented as a database . 23

  24. Blockchain The blockchain is structured as sequential log of interlinked blocks, where each block contains a sequence of transactions, each transaction representing a query or update to the world state. 24

  25. One last term before showing the transaction flow... Endorsement policies describe which organizations (peers) must approve transactions before they will be accepted by other organizations onto their copy of the ledger. 25

  26. 26

  27. Transaction Flow Phase 1 1. The client sends a transaction proposal to the endorsing peers(peers that need to “approve” the transaction). 2. Endorsing peers verify the identity of the client and the validity of the request and execute the transaction by invoking the chaincode. They do NOT apply changes to the ledger yet. 3. Peers get the results of the executed transaction and send a proposal response back to the client. (the sign the transaction) Endorsement policy is used by the app to decide which peers should receive the proposal. L This phase ends when the A1 P1 app has received enough signed responses from the S peers. 27

  28. The transaction consists of 1. Header (contains metadata such as the name of the chain code) 2. Signature (Cryptographic signatures that assures the integrity of the transaction details) 3. Proposal (input parameters from A1 to S1) 4. Response (captures the before and after values of the world state, as a Read Write set) 5. Endorsements (a list of signed transaction responses from each required organization sufficient to satisfy the endorsement policy) 28

  29. Transaction Flow Phase 2 1. The client sends a transaction proposal together with the response to the ordering service . 2. The ordering service orders the transaction in chronological order (by channel), without inspecting the transaction itself. 3. The OS arrange batches of submitted transactions into a well-defined sequence and package them into blocks . These blocks will become the blocks of the blockchain. A1 OS 29

  30. Transaction Flow Phase 3 1. After the block creation by the OS, the OS distributes the block to the peers in the channel. 2. The peers now verify the transactions in the block and append the block to their own ledger If not every peer is connected to the OS, gossip protocol is used. A peer will process each transaction in the P1 sequence in which it appears in the block. Also note that this validation is different OS than the endorsement check in phase 1. P2 In case the application violates the endorsement policy, the peer is still able to reject the transaction in phase 3. 30

  31. Details about ordering service ● Orderers besides their ordering role, they also maintain a list of organizations in the channel ● Enforce basic access control for channels ● Even if OS handles transactions in a specific way, they can use different implementation for achieving consensus. Kafka Raft Solo 31

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend