CS 59000-BTS

Hyperledger Questions

Iroha (Interoperability is the main goal)

Note: Currently, the ordering service is a single point of failure that does the ordering, and, therefore, Hyperledger Iroha is neither crash fault-tolerant, nor byzantine fault-tolerant.

YAC Concensus steps

Step 1: The ordering service shares a proposal to all peers. A proposal is an unsigned block created and shared to peers in the network by the ordering service. It contains a batch of ordered transactions.

Step 2: Peers calculate the hash of a verified proposal and sign it. The resulting <Hash, Signature> tuple is called a vote.

Step 3: Based on the hashes created in the previous step, each peer computes an ordering list or order of peers. To do this, the ordering function will need to have knowledge of all the peers voting in the network, and is based on the hash of the proposed block. The first peer in the list is called the leader. The leader is responsible for collecting votes from other peers and sending the commit message.

Step 4: Each peer votes. The leader collects all the votes and determines the supermajority of votes for a certain hash. The leader sends a commit message that contains the votes of the committing block. This response is called a commit.

Step 5: After receiving the commit, the peers verify the commit and apply the block to the ledger. At this point, consensus is complete.

❓ How can voting and hash be used for ordering? Why not timestamps?

❓ What are the stateless and stateful transactions?

Mobile Libraries of Hyperledger Iroha

How can this problem be solve? Does it requiring more tech/tools or it needs more adopter to this YAC algorithm? ❓

Future compatible tool sets

YAC consensus library

Ed25519 digital signature library

SHA-3 hashing library

Iroha transaction serialization library

P2P communication library

iOS library

Android library

JavaScript library

Blockchain explorer/data visualization suite.

⭐ More like a user facing tool set, and emphasize on mobile app development

Ordering and Consensus

It is the responsibility of the leader to collect votes from other peers and forward commit messages to peers.

The main difference between stateless validation and stateful validation is that stateless validation is faster and does not require access to the data on the chain.

Ordering service: Orders transactions into proposals which are sent to peers

Tasks: Collects votes from other peers and forwards commit messages to peers

What is the block storage "Ametsuchi"? ❓

click to edit

Composer

The Benefits of Composer

The following are key benefits of using Hyperledger Composer:

Focusing on the problem

Develop blockchain application starting from the business requirements.

Prototyping

Hyperledger Composer provides a smart tool to revise and rearrange model and logic to build simple Proof of Concepts or MVPs.

Analytics and privacy

Rich queries on the data can be easily set up and performed. Access Control Rules help to preserve a layer of confidentiality for the business operations.

Integration to existing systems

A REST server exposes your Blockchain to a Web or Mobile Application to be integrated in existing systems.

Communication

Finally, Hyperledger Composer can be used to enhance the communication between business and technical teams to facilitate prototyping and development of the blockchain application.

Business Network

Modeling language files (models/*.cto)

To define models for Participants, Assets, Transactions and Events.

Transaction logic (lib/*.js)

To implement the logic of the transactions defined.

Query file (queries.qry)

To design and enable complex queries on the blockchain data.

Access Control file (permissions.acl)

To control visibility and actions on resources.

click to edit

Immutable and distributed is the key for 三权分立

Buyer

Seller

Regulator

Indy

The security and privacy issues in identification and transactions obsolete large value transactions online, such as buying a house or properties.

Buying a house online with zero-day latency! 🎉

click to edit

Personal data is held by its owner (you!), not in identity repositories, reducing the number of high-value data targets. This also reduces the liability of the service currently holding that repository.

❓ Where does the data stored? Blockchain or local (peers'/mine) database(s)?

Features

Decentralized Identifiers (DIDs) created and controlled by the owning entity

The use of DIDs for each relationship, preventing cross-service correlation

Peer-to-peer, end-to-end encryption from message creator to receiver

Verifiable Credentials (VC) held by their owner and used only when necessary

Selective disclosure of VC data - exposing only the data necessary

The use of VCs without the need to contact the issuer.

Proactive not reactive; preventative not remedial[3][30][31][32]

Privacy as the default setting[3][30][31][32]

Privacy embedded into design[3][30][31][32]

Full functionality – positive-sum, not zero-sum[3][30][31][32]

End-to-end security – full lifecycle protection[3][30][31][32]

Visibility and transparency – keep it open[3][30][31][32]

Respect for user privacy – keep it user-centric[3][30][31][32]

click to edit

ZKP Application Similar to Indy is awesome!

Most importantly, there are no credentials on the ledger, and no private data of any kind. In fact, the only data on the ledger is not just data that’s not private, but data you expressly want others to know. All private data is exchanged between identities directly and stored in their secure Wallets. The data on the ledger is used to prove things about that private data such that it can be trusted.

Correct order of the Consensus

Tx Endorsement -> Ordering -> Validation -> Commitment

Roles in Hyperledger Fabiric

Endorsor

Orderer

Committer

Hyperledger Working Groups (Community)

Whitepaper

Blockchain Protocol

Requirements

Identity

Technical (China)

Architecture

How does the PoET random time assigned? By PRG? How do they verify.

Consensus Used In Hyperledger

Kafka

YAC

RBFT

PoET

Default DB in Fabric

Level DB

Blockchain Standard

ISO/TC 307 focuses on standardization of Blockchain and DLT

Hyperledger Fabric Endorsement

A signed response for the result of transation

Endorsement policies are specified when chaincode is deployed

ZKP

Definition

A proof of something about a claim without telling you the value of the claim

Transaction families define a group of operations or transaction types that are allowed on the shared ledgers. True or False?

Hyperledger Fabric

Blockchain Network

A consortium can have any number of organizational members

Network can be start by a single org. But eventually be controlled by a larger set of organizations.

Creating a channel for a consortium

The right to create channel or consortia are granted by the network builder, and this is the core part for the ACL in Hyperledger Fabric! 🚩

Channel provides privacy to the members in the channel and maintaining the shared infrastructure with all the consortium at the same time.

Including the data transacted on the channel are completely separated from the rest of the network and channels.

click to edit

Peears and Ledgers

Peer nodes holds the copy of the copy of the blockchain ledger.

The specific ledger is physically hosted on peer node, but logically hosted on the channel of it.

How peers join net work 🚩

X.509

Public key infrastructure

Also called X.509 Certificates, which is an ITU standard for digital certificates.

Peer configuration is an X.509 identity issued by CA of the channel, which associates peer with organization that built the channel. Once the peer is started, it can join channel using the ordered. The orderer will uses the channel configuration to determine this peer’s permission on this channel. (Permission: such as read/write)

How to add client? 🚩

Just build a smart contract on peer(s) and then connect the client to the peer and the channel

All the access patterns for client are going through smart contract first before the client can access the ledger.

The installation of the smart contract is assigned by the

How smart contract works on HLF? 🚩

Physically hosted by peers

Logically hosted by the channel

Instantiating the contract to let everyone in the channel know, but not the program logic details (private code)

Installed by peers, and can only be accessed by peers

Types of peers 🚩

Committing peers

To help the channel to record validated transactions (appending)

Endorsing peers

Just a peer that has chaincode installed. But it must also have the client application using this chaincode to generate digital signature for the transactions

Static/ Dynamic Lead node

Helping to distribute transactions to committing peers

Anchor peer

inter-organization/channel communication

The Real Power is on the network configuration infrastructure (The zero channel)

click to edit

Tutorial

🚩 Prev: Applications and Peers

click to edit

🚩Docker In Practice - Manning

Chapter 1

The problem it is solving: deployment

Image and Container

Analog to the Class and Object in OOP: The Container of Docker is the instance of an Image, and we have build multiple Container from one Image.

求同存异

Only distributed when differences are found

Layering to save memory

Build and then run, and that's it

You can update images by commit and tagging

Chapter 2

PoET 🚩

Questions ❓

Attack to PoET?

click to edit

How good is the est. of K participants?

Permissioned Blockchain

Ripple

Sawtooth ⭐

click to edit

Transactions don't need to be money 💰

Consensus

Deciding who to recording the transactions

Can we use any distribution other than exponential?

PBFT consensus of Fabric is just voting until 2/3 of the member agree?

click to edit

No consensus?

Assumption: Trusted Execution Environment (TEE)

Can be secure hardwares

e.g.: Intel SGX

What if Intel SGX is not actually secure?

Then we can have DDoS?

⭐ Concepts

K-participants [estimation]

click to edit

click to edit

μlocal=K×μglobal

$$\lambda_{local} = \frac{1}{\mu_{local}} = \frac{1}{\mu_{global}\times K} = \frac{\lambda_{global}}{K}$$

Pick the block that has lower value

$$t_i \leftarrow e^{\lambda_{local}}$$ (note that t_i is trusted)

The protocol just doesn't works, and everything is just broken.

click to edit

Each node pick a random number from exponential distribution.

Ztest

$$\mu_{local} \times \alpha$$, where $$1 < \alpha < \inf$$

S-blocks

Question to solve here: What is the expected number of block to be generated by a specific party?

Attacks

DNS poisoning to prevent other miners to properly work on the protocol

DDoS

SGX is the one to connect to the protocol, thus we will need to compromise that