Friday, June 15, 2018

IBM Blockchain Platform: Develop concepts using the online playground environment

Playground Tutorial

In this step by step tutorial we'll walk through setting up a business network, defining our assets, participants and transactions, and testing our network by creating some participants and an asset, and submitting transactions to change the ownership of the asset from one to another. This tutorial is intended to act as an introduction to IBM Blockchain Platform: Develop concepts using the online playground environment.

Step One: Open the IBM Blockchain Platform: Develop Playground

Open Blockchain Platform Playground (note, this link will take you to the web Blockchain Platform Playground - you can also follow along in a local version if you've already installed the development environment).

You should see the My Business Networks screen. The My Business Networks page shows you a summary of the business networks you can connect to, and the identities you can use to connect to them. Don't worry about this too much for the time being, as we're going to create our own network.

Step Two: Creating a new business network

Next, we want to create a new business network from scratch. A business network has a couple of defining properties; a name, and an optional description. You can also choose to base a new business network on an existing template, or import your own template.

Next, we want to create a new business network from scratch. A business network has a couple of defining properties; a name, and an optional description. You can also choose to base a new business network on an existing template, or import your own template.
  • Click Deploy a new business network under the Web Browser heading to get started.
  • The new business network needs a name, let's call it tutorial-network.
  • Optionally, you can enter a description for your business network.
  • Next we must select a business network to base ours on, because we want to build the network from scratch, click empty-business-network.
  • Now that our network is defined, click Deploy.

NOTE: If you are using playground locally and connecting to a real Fabric please refer to the additional notes at the bottom of the tutorial.




Step Three: Connecting to the business network

Now that we've created and deployed the business network, you should see a new business network card called admin for our business network tutorial-network in your wallet. The wallet can contain business network cards to connect to multiple deployed business networks.

When connecting to an external blockchain, business network cards represent everything necessary to connect to a business network. They include connection details, authentication material, and metadata.

To connect to our business network click Connect now under our business network card


Step Four: Adding a model file

As you can see, we're in the Define tab right now, this tab is where you create and edit the files that make up a business network definition, before deploying them and testing them using the Test tab.

As we selected an empty business network template, we need to modify the template files provided. The first step is to update the model file. Model files define the assets, participants, transactions, and events in our business network.

For more information on our modeling language, check our documentation.
  1. Click the Model file to view it.
  2. Delete the lines of code in the model file and replace it with this:
/**
 * My commodity trading network
 */
namespace org.example.mynetwork
asset Commodity identified by tradingSymbol {
    o String tradingSymbol
    o String description
    o String mainExchange
    o Double quantity
    --> Trader owner
}
participant Trader identified by tradeId {
    o String tradeId
    o String firstName
    o String lastName
}
transaction Trade {
    --> Commodity commodity
    --> Trader newOwner
}
This domain model defines a single asset type Commodity and single participant type Trader and a single transaction type Trade that is used to modify the owner of a commodity.

Step Five: Adding a transaction processor script file

Now that the domain model has been defined, we can define the transaction logic for the business network. Composer expresses the logic for a business network using JavaScript functions. These functions are automatically executed when a transaction is submitted for processing.

For more information on writing transaction processor functions, check our documentation.

  1. Click the Add a file button.
  2. Click the Script file and click Add.
  3. Delete the lines of code in the script file and replace it with the following code:
/**
 * Track the trade of a commodity from one trader to another
 * @param {org.example.mynetwork.Trade} trade - the trade to be processed
 * @transaction
 */
async function tradeCommodity(trade) {
    trade.commodity.owner = trade.newOwner;
    let assetRegistry = await getAssetRegistry('org.example.mynetwork.Commodity');
    await assetRegistry.update(trade.commodity);
}

This function simply changes the owner property on a commodity based on the newOwner property on an incoming Trade transaction. It then persists the modified Commodity back into the asset registry, used to store Commodity instances.

Step Six: Access control:
Access control files define the access control rules for business networks. Our network is simple, so the default access control file doesn't need editing. The basic file gives the current participant networkAdmin full access to business network and system-level operations.

While you can have multiple model or script files, you can only have one access control file in any business network.

Step Seven: Deploying the updated business network
Now that we have model, script, and access control files, we need to deploy and test our business network.

Click Deploy changes to upgrade the business network.

NOTE: If you are using playground locally and connecting to a real Fabric please refer to the additional notes at the bottom of the tutorial.


Step Eight: Testing the business network definition

Next, we need to test our business network by creating some participants (in this case Traders), creating an asset (a Commodity), and then using our Trade transaction to change the ownership of the Commodity.

Click the Test tab to get started.

Step Nine: Creating participants
The first thing we should add to our business network is two participants.

  1. Ensure that you have the Trader tab selected on the left, and click Create New Participant in the upper right
  2. What you can see is the data structure of a Trader participant. We want some easily recognizable data, so delete the code that's there and paste the following:
{
  "$class": "org.example.mynetwork.Trader",
  "tradeId": "TRADER1",
  "firstName": "Jenny",
  "lastName": "Jones"
}
      3. Click Create New to create the participant.
      4. You should be able to see the new Trader participant you've created. We need another Trader to test our Trade transaction though, so create another Trader, but this time, use the following data
{
  "$class": "org.example.mynetwork.Trader",
  "tradeId": "TRADER2",
  "firstName": "Amy",
  "lastName": "Williams"
}

Make sure that both participants exist in the Trader view before moving on!

Step Ten: Creating an asset
Now that we have two Trader participants, we need something for them to trade. Creating an asset is very similar to creating a participant. The Commodity we're creating will have an owner property indicating that it belongs to the Trader with the tradeId of TRADER1.

  1. Click the Commodity tab under Assets and click Create New Asset.
  2. Delete the asset data and replace it with the following:
  3. {
      "$class": "org.example.mynetwork.Commodity",
      "tradingSymbol": "ABC",
      "description": "Test commodity",
      "mainExchange": "Euronext",
      "quantity": 72.297,
      "owner": "resource:org.example.mynetwork.Trader#TRADER1"
    }
  4. After creating this asset, you should be able to see it in the Commodity tab.

Step Eleven: Transferring the commodity between the participants
Now that we have two Traders and a Commodity to trade between them, we can test our Trade transaction.

Transactions are the basis of all change in a IBM Blockchain Platform: Develop business network, if you want to experiment with your own after this tutorial, try creating another business network from the My Business Network screen and using a more advanced business network template.

To test the Trade transaction:
  1. Click the Submit Transaction button on the left.
  2. Ensure that the transaction type is Trade.
  3. Replace the transaction data with the following, or just change the details:
  4. {
      "$class": "org.example.mynetwork.Trade",
      "commodity": "resource:org.example.mynetwork.Commodity#ABC",
      "newOwner": "resource:org.example.mynetwork.Trader#TRADER2"
    }
  5. Click Submit.
  6. Check that our asset has changed ownership from TRADER1 to TRADER2, by expanding the data section for the asset. You should see that the owner is listed as resource:org.example.mynetwork.Trader#TRADER2.
  7. To view the full transaction history of our business network, click All Transactions on the left. Here is a list of each transaction as they were submitted. You can see that certain actions we performed using the UI, like creating the Trader participants and the Commodity asset, are recorded as transactions, even though they're not defined as transactions in our business network model. These transactions are known as 'System Transactions' and are common to all business networks, and defined in the IBM Blockchain Platform: Develop Runtime.
Logging out of the business network:

Now that transactions have successfully run, we should log out of the business network, ending up at the My Business Network screen where we started.

In the upper-right of the screen is a button labelled admin. This lists your current identity, to log out, click admin to open the dropdown menu, and click My Business Networks.

Deploying a Business Network to a real Fabric.

Using Playground locally, you can use connections to "Web Browser" which works in the browser local storage, or you can use Connections to a real Fabric usually in a group called "hlfv1"

If you are connecting to a real Fabric, then you will likely have already created a Card for an identity with PeerAdmin and ChannelAdmin roles - this is often called PeerAdmin. This is the card that you use to Deploy and Update your network with Composer.

When you are deploying your network to a real Fabric there are additional fields to complete before you can click the Deploy button - you need to supply the details of the Network Administrator.

Scroll to the bottom of the Deploy Screen to find CREDENTIALS FOR NETWORK ADMINISTRATOR. For a simple Development Fabric and many Test networks you can supply an ID and Secret. Enrollment ID - admin Enrollment Secret - adminpw

When the ID and Secret are specified, you can click the Deploy button and resume the tutorial at Step Three.

If you are working with a Custom or Production Fabric - contact your Fabric Administrator for details of the Network Administrator.

Updating a Business Network when connected to a real Fabric

When you are using a real Fabric and click Deploy Changes you will see an addition popup dialog asking you to specify an Installation Card and an Upgrade card from dropdown lists. Typically you specify the same PeerAdmin card as used to deploy the initial network. If you are uncertain, contact your Fabric Administrator.

Select the cards, and click the Upgrade button. Note that on a real Fabric this can take a few minutes to complete.

Resume the Tutorial at Step Eight.

Thursday, June 14, 2018

5 ways blockchain is transforming Financial Services



The Financial Services industry is fundamentally about facilitating the trusted exchange of value between multiple, untrusting parties. Brokering that trust is an enormous responsibility and carries significant risk, which is why the industry has become increasingly reliant on costly intermediaries, manual processes, and error-prone reconciliations. Today, more and more Financial Services institutions are looking to blockchain to enable more efficient cross-organizational collaboration, eliminate intermediaries, and create disruptive business models.
Blockchain appeared in 2008 as the basis of the Bitcoin protocol. Bitcoin’s combination of cryptography and distributed systems enables value to be transferred as quickly as the internet transfers data. While this was initially limited to facilitating immediate "spot" transactions, new protocols such as Corda and Ethereum eventually enabled users to set terms under which they would transfer value at a future point in time. It was then that enterprises – particularly in the financial services industry – began to take notice.

Over the past 2-3 years, blockchain has emerged as a viable technology for addressing multi-party business processes and value exchange without complex shared data schemes and third-party intermediaries. At its core, a blockchain is a secure, shared, distributed ledger – a new shared data structure where banks can record transactions and work together to validate updates. Smart contracts act as a shared tool to govern changes to the underlying ledger in accordance to pre-agreed rules or terms.

This shared record enables organizations to collaborate more efficiently – and because every member of the network holds a record of every transaction, it is nearly impossible to manipulate data undetected. While cryptocurrencies like Bitcoin were responsible for popularizing blockchain technology, blockchain protocols with business-oriented uses are now proliferating, revealing the value of this innovative technology to disrupt business models and transform operations. This offers three key benefits:

1) Risk Mitigation
2) Cost Reduction
3) Improved Customer Outcomes

Let’s take a look at five functions of Financial Services that are already being transformed by blockchain technology.

1. Trade Finance - Risk Mitigation & Cost Reduction

Helping to mange the financial risk of international trade for importing and exporting parties

Current state
Today’s solutions for managing trade finance are built on antiquated technology and processes that exist in silos. This adds significant risks, complexity, and time into trade processes, as all parties have to manually verify data. Pain points include:
  • Error-prone, manual processes for creating, validating, and auditing trade data and documentation
  • Siloed data that is difficult to verify, leading to multiple versions of the truth and major fraud, compliance, and audit risks
  • Disconnected legacy systems that limit new business opportunities and make it difficult for small and medium businesses to gain access to financing alternatives


Future state
Blockchain opens the door for streamlined trade finance, enabling participants to exchange data easily and track assets in real-time. Corda can be leveraged, where it is an enterprise-grade ledger that enables banks to limit who sees what information and selectively share data with only relevant parties. The solution involves blockchain technology paired with any cloud services and APIs, and could be used in the future to involve technologies like AI, machine learning, IoT, and more. Benefits include:
  • Simplified integration between banks, corporations, and the ecosystem of trade service providers of KYC and credit data
  • Reduced risk of fraud and lower compliance costs
  • New business opportunities enabled by ease of connections to new origination sources and the ability to build secure data pipelines to pools of financeable assets


2. Commercial Insurance: Risk Mitigation & Cost Reduction

High-value insurance scenarios, such as reinsurance, or maritime and aviation insurance

Current state
Specialty insurance deals with high-value assets and typically requires collaboration between many parties: insurers, consumers, brokers, aggregators, platforms, reinsurers, banks, and more. This means that guaranteeing visibility and efficiency between each party is critical. Pain points include:
  • Siloed information and lack of standardization of documents and policies results in time and money wasted on manually resolving different data sets
  • Lack of real-time visibility into asset location and condition
  • Difficulty of accurate underwriting and pricing, due to lack of clarify
  • Inefficient, paper-based tracking mechanisms, resulting in time-intensive audits
  • High incidence of fraud and financial crime


Future state
Blockchain’s ability to provide a single source of truth provides massive operational simplification and data transparency between many parties. Furthermore, blockchain can facilitate the creation of trade consortiums that many organizations can easily join, such as the platform created by EY, Microsoft, and Guardtime. Benefits include:
  • Reduced frictional costs and administrative burden, faster payment reconciliation, indisputable audit trails, and lower risk of fraud
  • Improved data quality through real-time visibility into the location, condition, and safety of high-value assets moving around the world
  • Accurate, dynamic, and fair underwriting and pricing based on better risk assessments
  • Better customer service by improving timeliness of claims’ processing and payments


3. Regulatory Compliance: Risk Mitigation, Cost Reduction

Maintaining and documenting compliance with government regulations – such as DoddFrank, Basel III, and KYC/AML – meant to ensure stability and resiliency of markets, protect consumers, and prevent money laundering

Current state
Regulatory requirements are critical to ensuring stability and resiliency of markets, protecting consumers, and reducing the risk of criminal behavior – but maintaining compliance is a hurdle for banks. Failure to prove compliance may result in massive fines.
Pain points include:
  • Duplicative and siloed data sources
  • Time-consuming, manual review, reconciliation, and auditing processes
  • Difficulty maintaining data lineage across multiple systems
  • Risk of data breach at multiple steps in the process


Future state
Blockchain can enable faster, more accurate, more secure reporting by automating compliance processes that draw on undisputable data sources.
  • Private blockchains like Corda, Hyperledger enable regulator nodes to “pull” more trade data in a consistent format, requiring less active resourcing from banks
  • Secure recording, storage, and review of customer and transaction data throughout the lifecycle, resulting in a significant reduction in back office regulatory reporting costs
  • Aggregation of traditionally siloed data sources
  • Regulators can use blockchain to check for compliance in real time, reducing the need for costly inperson audits


4. Claims Processing: Risk Mitigation, Cost Reduction, Improved Customer Outcomes

Processing insurance disbursements to beneficiaries while protecting against fraud

Current state
The insurance industry is particularly vulnerable to having multiple disparate copies of the same data – and the process of mediating between different versions of the truth is time-consuming and expensive. Pain points include:
  • Time-consuming and expensive process of gathering information for assessments
  • Differing opinions about the correct value of a claim between a claimant, insurer, broker, adjuster, and more
  • Customer frustration due to opaque processes and delays in claims processing
  • Threat of insurance fraud


Future state
Automatic claims built on blockchain smart contracts enable a single version of the truth for claim data, increase trust between parties, and create a more efficient claims process.
Benefits include:
  • More accurate assessments through historical claims data
  • Integrated data source for all parties, reducing conflicts about claim value
  • Automatic disbursement when criteria are met, reducing hassle for beneficiary
  • Reduced risk of fraudulent claims


5. B2B Contract Processing: Cost Reduction, Improved Customer Outcomes

Services offered by a bank to act as an intermediary between two contracting parties, securely store contract documentation, hold money in escrow, or guarantee a loan

Current state
The current process of contract processing, such as setting up a bank guarantee, often requires multiple in-person meetings between multiple parties and the bank – and this can be a frustrating process. Pain points include:
  • Time-consuming creation process for all parties, often requiring multiple in-person visits to the bank to go over paperwork
  • Repetitive verification process for any changes to the agreement
  • Heavy dependence on physical documents, which run the risk of getting lost


Future state
Banks can use blockchain technology to build secure Digital Lockers that store sensitive documents. By creating and maintaining contracts in a Digital Locker, banks can enable all parties to easily and securely collaborate on documents. Benefits include:
  • Superior customer experience, as customers no longer have to make multiple bank visits
  • Faster and easier document verification and approval
  • Increased security and ease of access for documents
  • Instead of meeting in-person to create and update bank guarantees, the borrower, lender, and bank can all collaborate in real-time on documents stored in a secure digital locker


Conclusion:

We’ve seen five areas of the Financial Services industry where blockchain is already showing promise by enabling dramatically reduced risks, lowered costs, and improved customer experience. As blockchain technology grows and matures, it will create dramatic shifts in the industry that will go beyond improving existing processes.
Across the entire life of an asset, blockchain can provide total visibility of movement between banks and customers. This represents a total shift in the longstanding “financial supply chain” from opaque and siloed to transparent and indisputable. With a new era of radical transparency and efficiency improvements, intermediaries can be replaced with direct, trusting relationships between financial institutions and their customers. 

Blockchain's importance is so well realized that there are many strartup and enterprises who are investing in Blockchain. Below is the global landscape of Blockchain companies in Financial services, a report prepared by William Mougayar from http://startupmanagement.org

Here is where you can find the PDF Version of this copy and here is the Googlesheet version.




Tuesday, June 5, 2018

Hyperledger Composer - Installation


Installing pre-requisites

The Hyperledger Composer pre-requisites can be installed on Ubuntu or MacOS. Choose your operating system to jump to the appropriate section, or scroll down to find the instructions:

Ubuntu
To run Hyperledger Composer and Hyperledger Fabric, we recommend you have at least 4Gb of memory.

The following are prerequisites for installing the required development tools:

  • Operating Systems: Ubuntu Linux 14.04 / 16.04 LTS (both 64-bit), or Mac OS 10.12
  • Docker Engine: Version 17.03 or higher
  • Docker-Compose: Version 1.8 or higher
  • Node: 8.9 or higher (note version 9 is not supported)
  • npm: v5.x
  • git: 2.9.x or higher
  • Python: 2.7.x
  • A code editor of your choice, we recommend VSCode.

**If installing Hyperledger Composer using Linux, be aware of the following advice:

  • Login as a normal user, rather than root.
  • Do not su to root.
  • When installing prerequisites, use curl, then unzip using sudo.
  • Run prereqs-ubuntu.sh as a normal user. It may prompt for root password as some of it's actions are required to be run as root.
  • Do not use npm with sudo or su to root to use it.
  • Avoid installing node globally as root.**

If you're running on Ubuntu, you can download the prerequisites using the following commands:

curl -O https://hyperledger.github.io/composer/prereqs-ubuntu.sh
chmod u+x prereqs-ubuntu.sh

Next run the script - as this briefly uses sudo during its execution, you will be prompted for your password.

./prereqs-ubuntu.sh

Installing the development environment

Follow these instructions to obtain the Hyperledger Composer development tools (primarily used to create Business Networks) and stand up a Hyperledger Fabric (primarily used to run/deploy your Business Networks locally). Note that the Business Networks you create can also be deployed to Hyperledger Fabric runtimes in other environments e.g. on a cloud platform.

Before you begin
Make sure you have installed the required pre-requisites, following the instructions in Installing pre-requisites.

These instructions assume that you've not installed the tools and used them before. If this is not the case, you might want to check that your previous setup is completely destroyed before you start following this guide. To learn how to do this, skip to the Appendix.


To provide flexibility and enable the maximum number of dev, test and deployment scenarios, Composer is delivered as a set of components you can install with npm and control from the CLI. These instructions will tell you how to install everything first, then how to control your development environment.

Installing components
Step 1: Install the CLI tools
There are a few useful CLI tools for Composer developers. The most important one is composer-cli, which contains all the essential operations, so we'll install that first. Next, we'll also pick up generator-hyperledger-composer, composer-rest-server and Yeoman plus the generator-hyperledger-composer. Those last 3 are not core parts of the development environment, but they'll be useful if you're following the tutorials or developing applications that interact with your Business Network, so we'll get them installed now.

1. Essential CLI tools:
npm install -g composer-cli

2. Utility for running a REST Server on your machine to expose your business networks as RESTful APIs:
npm install -g composer-rest-server

3. Useful utility for generating application assets:
npm install -g generator-hyperledger-composer

4. Yeoman is a tool for generating applications, which utilises generator-hyperledger-composer:
npm install -g yo


Step 2: Install Playground
If you've already tried Composer online, you'll have seen the browser app "Playground". You can run this locally on your development machine too, giving you a UI for viewing and demonstrating your business networks.

Browser app for simple editing and testing Business Networks:

npm install -g composer-playground

Step 3: Set up your IDE
Whilst the browser app can be used to work on your Business Network code, most users will prefer to work in an IDE. Our favourite is VSCode, because a Composer extension is available.

Install VSCode from this URL: https://code.visualstudio.com/download

Open VSCode, go to Extensions, then search for and install the Hyperledger Composer extension from the Marketplace.

Step 4: Install Hyperledger Fabric
This step gives you a local Hyperledger Fabric runtime to deploy your business networks to.

1. In a directory of your choice (we will assume ~/fabric-tools), get the .zip file that contains the tools to install Hyperledger Fabric:

mkdir ~/fabric-tools && cd ~/fabric-tools

curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-dev-servers.zip
unzip fabric-dev-servers.zip

A tar.gz is also available if you prefer: just replace the .zip file with fabric-dev-servers.tar.gz1 and the unzip command with a tar xvzf command in the above snippet.

2. Use the scripts you just downloaded and extracted to download a local Hyperledger Fabric runtime:

cd ~/fabric-tools
./downloadFabric.sh

Congratulations, you've now installed everything required for the typical Developer Environment. Read on to learn some of the most common things you'll do with this environment to develop and test your Blockchain Business Networks.

Controlling your dev environment

Starting and stopping Hyperledger Fabric
You control your runtime using a set of scripts which you'll find in ~/fabric-tools if you followed the suggested defaults.

The first time you start up a new runtime, you'll need to run the start script, then generate a PeerAdmin card:

cd ~/fabric-tools
./startFabric.sh
./createPeerAdminCard.sh

You can start and stop your runtime using ~/fabric-tools/stopFabric.sh, and start it again with ~/fabric-tools/startFabric.sh.

At the end of your development session, you run ~/fabric-tools/stopFabric.sh and then ~/fabric-tools/teardownFabric.sh. Note that if you've run the teardown script, the next time you start the runtime, you'll need to create a new PeerAdmin card just like you did on first time startup.

The local runtime is intended to be frequently started, stopped and torn down, for development use. If you're looking for a runtime with more persistent state, you'll want to run one outside of the dev environment, and deploy Business Networks to it. Examples of this include running it via Kubernetes, or on a managed platform such as IBM Cloud.

Start the web app ("Playground")
To start the web app, run:
composer-playground

It will typically open your browser automatically, at the following address: http://localhost:8080/login

You should see the PeerAdmin@hlfv1 Card you created with the createPeerAdminCard script on your "My Business Networks" screen in the web app: if you don't see this, you may not have correctly started up your runtime!

Congratulations, you've got all the components running, and you also know how to stop and tear them down when you're done with your dev session.

Appendix: destroy a previous setup

If you've previously used an older version of Hyperledger Composer and are now setting up a new install, you may want to kill and remove all previous Docker containers, which you can do with these commands:

    docker kill $(docker ps -q)
    docker rm $(docker ps -aq)
    docker rmi $(docker images dev-* -q)

Introduction to Hyperledger Composer - Typical Solution Architecture



Hyperledger Composer enables architects and developers to quickly create "full-stack" blockchain solutions. i.e. business logic that runs on the blockchain, REST APIs that expose the blockchain logic to web or mobile applications, as well as integrating the blockchain with existing enterprise systems of record.



Hyperledger Composer is composed of the following high-level components:
  • Execution Runtimes
  • JavaScript SDK
  • Command Line Interface
  • REST Server
  • LoopBack Connector
  • Playground Web User Interface
  • Yeoman code generator
  • VSCode and Atom editor plugins

Execution Runtimes
Hyperledger Composer has been designed to support different pluggable runtimes, and currently has three runtime implementations: 
* Hyperledger Fabric version 1.0. State is stored on the distributed ledger. 
* Web, which executes within a web page, and is used by Playground. State is stored in browser local storage. 
* Embedded, which executes within a Node.js process, and is used primarily for unit testing business logic. State is stored in an in-memory key-value store.

Connection Profiles

Connection Profiles are used across Hyperledger Composer to specify how to connect to an execution runtime. There are different configuration options for each type of execution runtime. For example, the connection profile for an Hyperledger Fabric version 1.0 runtime will contain the TCP/IP addresses and ports for the Fabric peers, as well as cryptographic certificates etc.

Connection Profiles are referred to by name (in both code and on the command line) and the connection profile documents (in JSON format) are resolved from the user's home directory.

JavaScript SDK
The Hyperledger Composer JavaScript SDK is a set of Node.js APIs the enables developers to create applications to manage and interact with deployed business networks.

The APIs are split between two npm modules:

1. composer-client used to submit transactions to a business network or to perform Create, Read, Update, Delete operations on assets and participants
2. composer-admin used to manage business networks (deploy, undeploy)
Details of all the APIs are available as JSDocs.

composer-client
This module would usually be installed as a local dependency of an application. It provides the API that is used by business applications to connect to a business network to access assets, participants and submitting transactions. When in production this is only module that needs to be added as a direct dependency of the application.

composer-admin
This module would usually be installed as a local dependency of administrative applications. This API permits the creation of and deployment of business network definitions.

Command Line Interface
The composer command line tool enables developers and administrators to deploy and managed business network definitions.

REST Server
The Hyperledger Composer REST Server automatically generates a Open API (Swagger) REST API for a business network. The REST Server (based on LoopBack technology) converts the Composer model for a business network into an Open API definition, and at runtime implements Create, Read, Update and Delete support for assets and participants and allows transactions to be submitted for processing or retrieved.

LoopBack Connector
The Hyperledger Composer LoopBack Connector is used by the Composer REST Server, however it may also be used standalone by integration tools that support LoopBack natively. Alternatively it may be used with the LoopBack tools to create more sophisticated customizations of the REST APIs.

Playground Web User Interface
Hyperledger Composer Playground is a web user interface to define and test business networks. It allows a business analyst to quickly import samples and prototype business logic that executes on the Web or Hyperledger Fabric runtime.

Yeoman Code Generators
Hyperledger Composer uses the Open Source Yeoman code generator framework to create skeleton projects:
  • Angular web application
  • Node.js application
  • Skeleton business network


VSCode and Atom Editor Extensions
Hyperledger Composer has community contributed editor extensions for VSCode and Atom. The VSCode extension is very powerful and validates Composer model and ACL files, providing syntax highlighting, error detection and snippets support. The Atom plugin is much more rudimentary and only has basic syntax highlighting.

Monday, June 4, 2018

Introduction to Hyperledger Composer - Key Concepts



Welcome to Hyperledger Composer

Hyperledger Composer is an extensive, open development toolset and framework to make developing blockchain applications easier. Our primary goal is to accelerate time to value, and make it easier to integrate your blockchain applications with the existing business systems. You can use Composer to rapidly develop use cases and deploy a blockchain solution in weeks rather than months. Composer allows you to model your business network and integrate existing systems and data with your blockchain applications.

Hyperledger Composer supports the existing Hyperledger Fabric blockchain infrastructure and runtime, which supports pluggable blockchain consensus protocols to ensure that transactions are validated according to policy by the designated business network participants.

Everyday applications can consume the data from business networks, providing end users with simple and controlled access points.

You can use Hyperledger Composer to quickly model your current business network, containing your existing assets and the transactions related to them; assets are tangible or intangible goods, services, or property. As part of your business network model, you define the transactions which can interact with assets. Business networks also include the participants who interact with them, each of which can be associated with a unique identity, across multiple business networks.



How does Hyperledger Composer work in practice?

For an example of a business network in action; a realtor can quickly model their business network as such:

Assets: houses and listings
Participants: buyers and homeowners
Transactions: buying or selling houses, and creating and closing listings
Participants can have their access to transactions restricted based on their role as either a buyer, seller, or realtor. The realtor can then create an application to present buyers and sellers with a simple user interface for viewing open listings and making offers. This business network could also be integrated with existing inventory system, adding new houses as assets and removing sold properties. Relevant other parties can be registered as participants, for example a land registry might interact with a buyer to transfer ownership of the land.

Key Concepts in Hyperledger Composer

Hyperledger Composer is a programming model containing a modeling language, and a set of APIs to quickly define and deploy business networks and applications that allow participants to send transactions that exchange assets.

Hyperledger Composer Components

You can experience Hyperledger Composer with our browser-based UI called Hyperledger Composer Playground. Playground is available as a hosted version (no install necessary) or a local install (good for editing and testing sample business networks offline).

Developers who want to use Hyperledger Composer's full application development capabilities should install the Developer Tools.

Key Concepts in Hyperledger Composer

Blockchain State Storage

All transactions submitted through a business network are stored on the blockchain ledger, and the current state of assets and participants are stored in the blockchain state database. The blockchain distributes the ledger and the state database across a set of peers and ensures that updates to the ledger and state database are consistent across all peers using a consensus algorithm.

Connection Profiles

Hyperledger Composer uses Connection Profiles to connect to a runtime. A Connection Profile is a JSON document that lives in the user's home directory (or may come from an environment variable) and is referenced by name when using the Composer APIs or the Command Line tools. Using connection profiles ensures that code and scripts are easily portable from one runtime instance to another. You can read more about Connection Profiles in the reference section.

Assets

Assets are tangible or intangible goods, services, or property, and are stored in registries. Assets can represent almost anything in a business network, for example, a house for sale, the sale listing, the land registry certificate for that house, and the insurance documents for that house may all be assets in one or more business networks.

Assets must have a unique identifier, but other than that, they can contain whatever properties you define. Assets may be related to other assets or participants.

Participants

Participants are members of a business network. They may own assets and submit transactions. Participant types are modeled, and like assets, must have an identifier and can have any other properties as required.

Identities and ID cards

Within a business network, participants can be associated with an identity. ID cards are a combination of an identity, a connection profile, and metadata. ID cards simplify the process of connecting to a business network, and extend the concept of an identity outside the business network to a 'wallet' of identities, each associated with a specific business network and connection profile.

Transactions

Transactions are the mechanism by which participants interact with assets. This could be as simple as a participant placing a bid on a asset in an auction, or an auctioneer marking an auction closed, automatically transferring ownership of the asset to the highest bidder.

Queries

Queries are used to return data about the blockchain world-state. Queries are defined within a business network, and can include variable parameters for simple customization. By using queries, data can be easily extracted from your blockchain network. Queries are sent by using the Hyperledger Composer API.

Events

Events are defined in the business network definition in the same way as assets or participants. Once events have been defined, they can be emitted by transaction processor functions to indicate to external systems that something of importance has happened to the ledger. Applications can subscribe to emitted events through the composer-client API.

Access Control

Business networks may contain a set of access control rules. Access control rules allow fine-grained control over what participants have access to what assets in the business network and under what conditions. The access control language is rich enough to capture sophisticated conditions declaratively, such as "only the owner of a vehicle can transfer ownership of the vehicle". Externalizing access control from transaction processor function logic makes it easier to inspect, debug, develop and maintain.

Historian registry

The historian is a specialised registry which records successful transactions, including the participants and identities that submitted them. The historian stores transactions as HistorianRecord assets, which are defined in the Hyperledger Composer system namespace.

Saturday, June 2, 2018

Introduction to Hyperledger


One of the most common questions that I see is 'What is hyperledger?' and soon followed by 'Is hyperledger IBM's blockchain?'. In this post I will aim to answer these two, and other questions around this topic.

What is Hyperledger?

From it's website, "the Hyperledger project is an open source collaborative effort created to advance cross-industry blockchain technologies. It is a global collaboration including leaders in finance, banking, IoT, supply chain, manufacturing and technology." The project aims to bring together a number of independent efforts to develop open protocols and standards, by providing a modular framework that supports different components for different uses. This would include a variety of blockchains with their own consensus and storage models, and services for identity, access control, and contracts.

Hyperledger Approach:
  • The collaborative and open source nature of Hyperledger project is best reflected in the 'umbrella' approach:
  • Hyperledger project is an incubator for multiple blockchain projects
  • It provides consistent license, IP and standards
  • Hyperledger provides common branding and encourages interoperability of components
  • It is a community with over 100 members, and several projects in incubation
  • It provides a robust community blockchain technical projects, with well-defined governance controlled by no single company.

Hyperledger's objective:

The objective of the Hyperledger project is to advance cross-industry collaboration by developing blockchains and distributed ledgers, with a particular focus on improving the performance and reliability of these systems (as compared to comparable cryptocurrency designs) so that they are capable of supporting global business transactions by major technological, financial and supply chain companies.
The project will integrate independent open protocols and standards by means of a framework for use-specific modules, including blockchains with their own consensus and storage routines, as well as services for identity, access control and smart contracts.

Members and governance:

Early members of the initiative included blockchain ISVs, (Blockchain, ConsenSys, Digital Asset, R3, Onchain), well-known technology platform companies (Cisco, Fujitsu, Hitachi, IBM, Intel, NEC, NTT DATA, Red Hat, VMware), financial services firms (ABN AMRO, ANZ Bank, BNY Mellon, CLS Group, CME Group, the Depository Trust & Clearing Corporation (DTCC), Deutsche Börse Group, J.P. Morgan, State Street, SWIFT, Wells Fargo), Business Software companies like SAP, Systems integrators and others such as: (Accenture, Calastone, Wipro, Credits, Guardtime, IntellectEU, Nxt Foundation, Symbiont). This list is growing every day..

The governing board of the Hyperledger Project consists of twenty members chaired by Blythe Masters, (CEO of Digital Asset), and a twelve-member Technical Steering Committee chaired by Christopher Ferris, CTO of Open Technology at IBM.


Hyperledger Frameworks:
Hyperledger is just one of the many projects run by The Linux Foundation. 

1. Fabric - Modular, Smart Contracts, configurable consesus

Hyperledger Fabric is a permissioned blockchain infrastructure, originally contributed by IBM and Digital Asset, providing a modular architecture with a delineation of roles between the nodes in the infrastructure, execution of Smart Contracts (called "chaincode" in Fabric) and configurable consensus and membership services. A Fabric Network comprises "Peer nodes", which execute chaincode, access ledger data, endorse transactions and interface with applications. "Orderer nodes" which ensure the consistency of the blockchain and deliver the endorsed transactions to the peers of the network, and MSP services, generally implemented as a Certificate Authority, managing X.509 certificates which are used to authenticate member identity and roles.  It leverages container technology to host smart contracts (“chaincode”) that comprise the application logic of the system.

Fabric is primarily aimed at integration projects, in which a Distributed Ledger Technology (DLT) is required, offering no user facing services other than an SDK for Node.js, Java and Go.

Fabric supports chaincode in Go and JavaScript (via Hyperledger Composer, or natively since v1.1) out-of-the-box, and other languages such as Java by installing appropriate modules. It is therefore potentially more flexible than competitors that only support a closed Smart Contract language.

2. Sawtooth - Implementation of PET (Proof of Elapsed Time) using SGX

Contributed by Intel, Hyperledger Sawtooth utilises a novel consensus mechanism known as "Proof of Elapsed Time," a lottery-design consensus protocol that builds on trusted execution environments provided by Intel's Software Guard Extensions (SGX). An effort is underway to mount the Hyperledger Burrow EVM application engine as a Sawtooth transaction processor. It was written mostly in Python instead of Go. 

The consensus algorithm is called “Proof of elapsed time” and actually wants to improve what we know as a Proof of Work (also called “mining”) especially from the world of cryptocurrencies. PoET implements a hardware-based random number generator that selects which network node is allowed to close the next block of the Blockchain. The hardware requirements for this are the Software Guard Extensions (Intel SGX). This is an extended x86 CPU architecture that provides a particularly protected memory area for processes. The tedious puzzle process at the PoW is therefore abbreviated by a quick draw about the SGX at the PoET. This creates a much more scalable and energy-saving consensus mechanism. Unfortunately, this mechanism is heavily dependent on the hardware, which in turn depends on Intel. Ideologically, the PoET is questionable because consensus could be controlled by a central authority. The required SGX architecture also makes homogeneous blockchain networks difficult to manage because all nodes depend on the right physical machines.

The use of Sawtooth makes sense in some contexts. Nevertheless, one should know exactly on what technical conditions the consensus is based and how it can be manipulated. After all, an untrustworthy consensus undermines the entire effort required for blockchain usage.

3. Burrow – Build to support Ethereum Virtual Machine

Burrow is a blockchain client including a built-to-specification Ethereum Virtual Machine. Contributed by Monax and sponsored by Monax and Intel. The goal of Burrow is to build a technological bridge to the Ethereum blockchain. This is because many organizations behind project Hyperledger have also joined the Ethereum Enterprise Alliance. They are therefore interested in both ecosystems and want to benefit from them. What Burrow already offers at its early stage is a simple Blockchain architecture. This consists of three components, which (as with Fabric and Sawtooth) must be distributed redundantly over the built private blockchain network.

One of Burrow’s components is responsible for building consensus on the network, implementing Proof of Stake using the Tendermint protocol. On the subject of Proof of Stake you can hear a lot about Casper from the ranks of the Ethereum project. Casper and Tendermint differ in their approaches to implementing PoS, and there is a very informative article on Medium that explains and compares both of them.

The second component is the implementation of the Ethereum Virtual Machine (EVM). With this, Burrow actually doesn’t want to deviate very far from the EVM specification. Rather, identities are added to it. Specific authorizations can be defined for each identity. Thus, Burrow turns the normal Public Ethereum VM into a VM for a permissioned blockchain.

The third component is the API gateway, which provides the state from the local ledger of a node and the state of the distributed ledger via REST and JSON-RPC to the outside world.

The choice of Burrow is therefore particularly interesting if existing smart contracts from the Ethereum world are to be used in a private or permissioned blockchain. The Solidity programming language is also used in the development of smart contracts at Burrow. The reality of Proof of Stake as an experimental consensus mechanism should also be included in a decision.

4. Indy - Supports decentralized identity management

Indy is a Hyperledger project for supporting independent identity on distributed ledgers. It provides tools, libraries, and reusable components for providing digital identities rooted on blockchains or other distributed ledgers. Contributed by the Sovrin Foundation. The project’s mission is to manage unique identities for global use. The identities are managed in a separate distributed ledger and are also to be made usable outside the private blockchain network via interfaces. The Sovrin Foundation’s identity tool “Sovrin” uses Indy and contributes significantly to development in this way.

The heart of Indy has another name: Plenum. It implements features similar to those in Fabric (organizations, participants and related identities), but specifically for the use case of identity management, which is different from Fabric’s general approach. This document provides a helpful overview of Plenum and its integration with Indy. Plenum implements the Redundant Byzantine Fault Tolerance (RBFT) protocol.

Indy is interesting for permissioned blockchain consortia who want to manage unique identities between each other in a trustworthy way. These can optionally be consumed by other groups or even publicly. The project is technically of a high quality and fully concentrates on the needs of this one use case. Therefore, use for decentralized identity management is recommended. Indy’s tools can also be combined with other platform solutions, so that an individual identity blockchain network is not required at all cost for its usage.

5. Iroha - Light weight variant of Fabric developed in C++, with focus on mobile applications.

Iroha is also an active project that is currently working on version 1.0. The initial work on the project came from the Japanese companies Hitachi, Soramitsu, Colu and NTT Data. The principles of Iroha are very similar to Fabric, but based on a different codebase. Iroha is developed in C++, using a modern codebase and clean design. The project therefore sees its unique selling points in a high performance and simplicity of the architecture. It is aimed at applications in which fast synchronous transactions with small payloads are required. For this purpose, decentralized backends of mobile applications are considered a valid use case.

Business logic is also achieved as chain code in Iroha, usually written in Java. The resulting artefact is executed in a sandboxed JVM on each node. Aspects such as currencies and communication with mobile devices are, however, already features of Iroha. This means that you do not have to implement separate chain code for each application.


Hyperledger Tools: 

The tools from the Hyperledger project are each aimed at one of the presented platforms. They can generally not be used with each other or across several solutions.

1. Composer - Collaboration tools for building blockchain business networks

Hyperledger Composer is a set of collaboration tools for building blockchain business networks that make it simple and fast for business owners and developers to create smart contracts and blockchain applications to solve business problems. Built with JavaScript, leveraging modern tools including node.js, npm, CLI and popular editors, Composer offers business-centric abstractions as well as sample apps with easy to test devops processes to create robust blockchain solutions that drive alignment across business requirements with technical development.

Blockchain package management tooling contributed by IBM. Composer is a user-facing rapid prototyping tooling, running on top of Hyperledger Fabric, which allows the easy management of Assets (data stored on the blockchain), Participants (identity management, or member services) and Transactions (Chaincode, a.k.a Smart Contracts, which operate on Assets on the behalf of a Participant). The resulting application can be exported as a package (a BNA file) which may be executed on a Hyperledger Fabric instance, with the support of a Node.js application (based on the Loopback application framework) and provide a REST interface to external applications.

Composer provides a GUI user interface "Playground" for the creation of applications, and therefore represents an excellent starting point for Proof of Concept work.



2. Caliper - to measure the performance of a specific blockchain implementation

Hyperledger Caliper is a blockchain benchmark tool and one of the Hyperledger projects hosted by The Linux Foundation. Hyperledger Caliper allows users to measure the performance of a specific blockchain implementation with a set of predefined use cases. Hyperledger Caliper will produce reports containing a number of performance indicators, such as TPS (Transactions Per Second), transaction latency, resource utilisation etc. The intent is for Caliper results to be used by other Hyperledger projects as they build out their frameworks, and as a reference in supporting the choice of a blockchain implementation suitable for a user’s specific needs. Hyperledger Caliper was initially contributed by developers from Huawei, Hyperchain, Oracle, Bitwise, Soramitsu, IBM and the Budapest University of Technology and Economics.

3. Explorer - Web application to view, invoke, deploy, query data stored in ledger

Hyperledger Explorer is a blockchain module and one of the Hyperledger projects hosted by The Linux Foundation. Designed to create a user-friendly Web application, Hyperledger Explorer can view, invoke, deploy or query blocks, transactions and associated data, network information (name, status, list of nodes), chain codes and transaction families, as well as any other relevant information stored in the ledger. Hyperledger Explorer was initially contributed by IBM, Intel and DTCC.

The Explorer can also be used in conjunction with Fabric. It is to be configured for one or multiple channels in a Fabric network. From then on, a web interface can be used to make the state and history visible in the distributed ledger. The tool is therefore suitable for different needs under the use of Fabric, e. g. if parties are supposed get a simple view of data in the blockchain or as a tool for administrators and auditors.

4. Quilt - offers interoperability between ledger systems by implementing the ILP 

Hyperledger Quilt is a business blockchain tool and one of the Hyperledger projects hosted by The Linux Foundation. Hyperledger Quilt offers interoperability between ledger systems by implementing the Interledger protocol (also known as ILP), which is primarily a payments protocol and is designed to transfer value across distributed ledgers and non-distributed ledgers. The Interledger protocol provides atomic swaps between ledgers (even non-blockchain or distributed ledgers) and a single account namespace for accounts within each ledger. With the addition of Quilt to Hyperledger, The Linux Foundation now hosts both the Java (Quilt) and JavaScript (Interledger.js) Interledger implementations. Hyperledger Quilt was initially contributed by NTT Data and Ripple.

5. Cello - DevOps and on-demand service model to blockchain
Hyperledger Cello is a blockchain module toolkit and one of the Hyperledger projects hosted by The Linux Foundation. Hyperledger Cello aims to bring the on-demand “as-a-service” deployment model to the blockchain ecosystem to reduce the effort required for creating, managing and terminating blockchains. It provides a multi-tenant chain service efficiently and automatically on top of various infrastructures, e.g., baremetal, virtual machine, and more container platforms (like Kubernetes and Docker Swarm). It can manage multiple blockchain networks, not just one. The status of the systems is also displayed via a dashboard. This means that resources can also be scaled and managed. So far only Fabric 1.0 networks are supported in Cello. As a short summary, Cello is meant to bring DevOps approaches and practices to the Hyperledger platform projects.Hyperledger Cello was initially contributed by IBM, with sponsors from Soramitsu, Huawei and Intel.

Baohua Yang and Haitao Yue from IBM Research are committed part-time to developing and maintaining the project.

Conclusion:

The Hyperledger project pursues several approaches for the implementation of private and permissioned blockchain applications. Fabric seems to be considered the most mature and active of them. For the beginning, however, this was an overview of Hyperledger, which should help to roughly understand the individual projects. Since the platforms provide different approaches for different scenarios, the overview can help you make a decision for the right platform.

However, the most extensive and flexible project, designed with the widest range of use cases in mind, is Fabric. The biggest tool from the project, Composer, can be seen as a framework for Fabric. It facilitates the development and modeling of business networks. Cello and Explorer can also be used with Fabric. This shows that Fabric is working hard on good tooling. Fabric is currently the best choice for most applications.

Friday, June 1, 2018

Blockchain A-Z


Blockchain A-Z covers all of the important keywords that you need to know if you are just getting into blockchain!

51% Attack

When more than half of the computing power of a cryptocurrency network is controlled by a single entity or group, this entity or group may issue conflicting transactions to harm the network, should they have the malicious intent to do so.

Address

Cryptocurrency addresses are used to send or receive transactions on the network. An address usually presents itself as a string of alphanumeric characters. It will look something like - 1MhN5qfH1vgx9CLL17i3DK9D2gzrHR7dZF

Altcoin
An altcoin is the community accepted name for any coin that isn’t Bitcoin. Examples are Dash and Monero.

ASIC

Short form for ‘Application Specific Integrated Circuit’. Often compared to GPUs, ASICs are specially made for mining and may offer significant power savings.

Bit 

There are 1,000,000 bits per bitcoin so 1 bit = 0.000001 BTC.   Cheaper items are denominated in bits.

Bitcoin

Bitcoin is the first decentralised, open source cryptocurrency that runs on a global peer to peer network, without the need for middlemen and a centralised issuer.


Block

Blocks are packages of data that carry permanently recorded data on the blockchain network.

Blockchain

A blockchain is a shared ledger where transactions are permanently recorded by appending blocks. The blockchain serves as a historical record of all transactions that ever occurred, from the genesis block to the latest block, hence the name blockchain.

Block Explorer

Block explorer is an online tool to view all transactions, past and current, on the blockchain. They provide useful information such as network hash rate and transaction growth.

Block Ciphers

Block Ciphers are a method of encrypting text (to produce ciphertext) in which a cryptographic key and algorithm are applied to a block of data at once as a group rather than to one bit at a time.

Block Height

The number of blocks connected on the blockchain.

Block Reward

A form of incentive for the miner who successfully calculated the hash in a block during mining. Verification of transactions on the blockchain generates new coins in the process, and the miner is rewarded a portion of those.

BTC

A common unit to describe one bitcoin, as USD represents one United States Dollar

Central Ledger

A ledger maintained by a central agency.

Chain Linking

Chain Linking is the process of connecting two blockchains with each other, thus allowing transactions between the chains to take place. This will allow blockchains like Bitcoin to communicate with other sidechains, allowing the exchange of assets between them

COLD STORAGE

Moving crypto-currency ‘offline’ Paper/hardware wallet.


Confirmation

The successful act of hashing a transaction and adding it to the blockchain.

Consensus

Consensus is achieved when all participants of the network agree on the validity of the transactions, ensuring that the ledgers are exact copies of each other.

Consortium Blockchain

Consortium Blockchain is a blockchain where the consensus process is controlled by a pre-selected set of nodes; for example, one might imagine a consortium of 15 financial institutions, each of which operates a node and of which ten must sign every block for the block to be valid. The right to read the blockchain may be public or restricted to the participants. There are also hybrid routes such as the root hashes of the blocks being public together with an API that allows members of the public to make a limited number of queries and get back cryptographic proofs of some parts of the blockchain state. These blockchains may be considered “partially decentralized”

Cryptocurrency

Also known as tokens, cryptocurrencies are representations of digital assets.

Cryptographic Hash Function

Cryptographic hashes produce a fixed-size and unique hash value from variable-size transaction input. The SHA-256 computational algorithm is an example of a cryptographic hash.

Dapp

A decentralised application (Dapp) is an application that is open source, operates autonomously, has its data stored on a blockchain, incentivised in the form of cryptographic tokens and operates on a protocol that shows proof of value.

DAO

Decentralised Autonomous Organizations can be thought of as corporations that run without any human intervention and surrender all forms of control to an incorruptible set of business rules.

Distributed Ledger

Distributed ledgers are ledgers in which data is stored across a network of decentralized nodes. A distributed ledger does not have to have its own currency and may be permissioned and private.

Distributed Network

A type of network where processing power and data are spread over the nodes rather than having a centralised data centre.

Difficulty

This refers to how easily a data block of transaction information can be mined successfully.

Digital Commodity

A digital commodity is a scarce, electronically transferrable, intangible, with a market value.

Digital Identity

A digital identity is an online or networked identity adopted or claimed in cyberspace by an individual, organization, or electronic device.

Digital Signature

A digital code generated by public key encryption that is attached to an electronically transmitted document to verify its contents and the sender’s identity.

Double Spending

Double spending occurs when a sum of money is spent more than once.

Ethereum

Ethereum is a blockchain-based decentralised platform for apps that run smart contracts, and is aimed at solving issues associated with censorship, fraud and third party interference.

Ethereum Classic

Ethereum Classic is a split from an existing cryptocurrency, Ethereum after a hard fork.

EVM

The Ethereum Virtual Machine (EVM) is a Turing complete virtual machine that allows anyone to execute arbitrary EVM Byte Code. Every Ethereum node runs on the EVM to maintain consensus across the blockchain.

Fiat Currency

Fiat currency is any money declared by a government to be to be valid for meeting a financial obligation, like USD or EUR.

FOMO

Fear of Missing Out.

Fork

Forks create an alternate version of the blockchain, leaving two blockchains to run simultaneously on different parts of the network.

FUD

Fear, Uncertainty, and Doubt. (Alleged) propaganda to lower prices.

Full Node

A Full Node is a node that fully enforces all of the rules of the blockchain

Gas

Gas is a measurement roughly equivalent to computational steps (for Ethereum). Every transaction is required to include a gas limit and a fee that it is willing to pay per gas; miners have the choice of including the transaction and collecting the fee or not. Every operation has a gas expenditure; for most operations it is ~3–10, although some expensive operations have expenditures up to 700 and a transaction itself has an expenditure of 21000.

Genesis Block

The first or first few blocks of a blockchain.

Hard Fork

A type of fork that renders previously invalid transactions valid, and vice versa. This type of fork requires all nodes and users to upgrade to the latest version of the protocol software.

Hash

The act of performing a hash function on the output data. This is used for confirming coin transactions.

Hashcash

Hashcash is a proof-of-work system used to limit email spam and denial-of-service attacks, and more recently has become known for its use in bitcoin (and other cryptocurrencies) as part of the mining algorithm.

Hash Rate

Measurement of performance for the mining rig is expressed in hashes per second.

Halving

Halving is the reduction of minable reward every so many blocks. For Bitcoin the reward is halved after the first 210,000 blocks are mined and then every 210,000 thereafter.

Hybrid PoS/PoW

A hybrid PoS/PoW allows for both Proof of Stake and Proof of Work as consensus distribution algorithms on the network. In this method, a balance between miners and voters (holders) may be achieved, creating a system of community-based governance by both insiders (holders) and outsiders (miners).

Initial Coin Offering (ICO)

Initial Coin Offering (ICO) is an event in which a new cryptocurrency sells advance tokens from its overall coinbase, in exchange for upfront capital. ICOs are frequently used for developers of a new cryptocurrency to raise capital.

Ledger

A ledger is an append-only record store, where records are immutable and may hold more general information than financial records.

Litecoin

Litecoin is a peer-to-peer cryptocurrency based on the Scrypt proof-of-work network. Sometimes referred to as the silver of bitcoin’s gold.

Mining

Mining is the act of validating blockchain transactions. The necessity of validation warrants an incentive for the miners, usually in the form of coins. In this cryptocurrency boom, mining can be a lucrative business when done properly. By choosing the most efficient and suitable hardware and mining target, mining can produce a stable form of passive income.

Multi-Signature or multisig

Multi-signature addresses provide an added layer of security by requiring more than one key to authorize a transaction. It refers to having more than one signature to approve a transaction. This form of security is beneficial for a company receiving money into their BTC wallet. If a company wants to keep it so that one employee doesn’t have sole access to a transaction, multisig allows for a transaction to be verified by two separate employees before it’s complete.

Node

A copy of the ledger operated by a participant of the blockchain network.

Oracles

Oracles work as a bridge between the real world and the blockchain by providing data to the smart contracts.

Peer to Peer

Peer to Peer (P2P) refers to the decentralized interactions between two parties or more in a highly-interconnected network. Participants of a P2P network deal directly with each other through a single mediation point.

Permissioned Ledger

A Permissioned Ledger is a ledger where actors must have permission to access the ledger. Permissioned ledgers may have one or many owners. When a new record is added, the ledger’s integrity is checked by a limited consensus process. This is carried out by trusted actors — government departments or banks, for example — which makes maintaining a shared record much simpler that the consensus process used by unpermissioned ledgers.

Permissioned Blockchain

Permissioned Blockchains provide highly-verifiable data sets because the consensus process creates a digital signature, which can be seen by all parties.

Protocols

Protocols are sets of formal rules describing how to transmit or exchange data, especially across a network.

Public Address

A public address is the cryptographic hash of a public key. They act as email addresses that can be published anywhere, unlike private keys.

Private Key

A private key is a string of data that allows you to access the tokens in a specific wallet. They act as passwords that are kept hidden from anyone but the owner of the address.

Proof of Authority (PoA)

Proof of Authority is a consensus mechanism in a private blockchain which essentially gives one client (or a specific number of clients) with one particular private key the right to make all of the blocks in the blockchain

Proof of Stake (PoS)

A consensus distribution algorithm that rewards earnings based on the number of coins you own or hold. The more you invest in the coin, the more you gain by mining with this protocol. Proof of stake has been considered the greener alternative to Proof of Work (PoW). Where PoW requires the prover to perform a certain amount of computational work, a proof of stake system requires the prover to show ownership of a certain amount of money, or stake.

Proof of Work (PoW)

A consensus distribution algorithm that requires an active role in mining data blocks, often consuming resources, such as electricity. The more ‘work’ you do or the more computational power you provide, the more coins you are rewarded with. The proof of work for Bitcoin is referred to as a “nonce,” or number used only once.

Protocols

Protocols are sets of formal rules describing how to transmit or exchange data, especially across a network.

Ripple

Ripple is a payment network built on distributed ledgers that can be used to transfer any currency. The network consists of payment nodes and gateways operated by authorities. Payments are made using a series of IOUs, and the network is based on trust relationships.

Satoshi

The penny of bitcoin.  1 Satoshi = 0.00000001 BTC  This is the smallest measurement of bitcoin.

Scrypt

Scrypt is a type of cryptographic algorithm and is used by Litecoin. Compared to SHA256, this is quicker as it does not use up as much processing time.

SHA-256

SHA-256 is a cryptographic algorithm used by cryptocurrencies such as Bitcoin. However, it uses a lot of computing power and processing time, forcing miners to form mining pools to capture gains.

Signature

A signature is the mathematical operation that lets someone prove their sole ownership over their wallet, coin, data or on. An example is how a Bitcoin wallet may have a public address, but only a private key can verify with the whole network that a signature matches and a transaction is valid. These are only known to the owner and are basically mathematically impossible to uncover.

Smart Contracts

Smart contracts encode business rules in a programmable language onto the blockchain and are enforced by the participants of the network.

Soft Fork

A soft fork differs from a hard fork in that only previously valid transactions are made invalid. Since old nodes recognize the new blocks as valid, a soft fork is essentially backward-compatible. This type of fork requires most miners upgrading in order to enforce, while a hard fork requires all nodes to agree on the new version.

Solidity

Solidity is Ethereum’s programming language for developing smart contracts.

Stream Ciphers

Stream Ciphers are a method of encrypting text (cyphertext) in which a cryptographic key and algorithm are applied to each binary digit in a data stream, one bit at a time.

Token

A token is a digital identity for something that can be owned.

Tokenless Ledger

A tokenless ledger refers to a distributed ledger that doesn’t require a native currency to operate.

Testnet

A test blockchain used by developers to prevent expending assets on the main chain.

Transaction Block

A collection of transactions gathered into a block that can then be hashed and added to the blockchain.

Transaction Fee

All cryptocurrency transactions involve a small transaction fee. These transaction fees add up to account for the block reward that a miner receives when he successfully processes a block.

Turing Complete

Turing complete refers to the ability of a machine to perform calculations that any other programmable computer is capable of. An example of this is the Ethereum Virtual Machine (EVM).

Unpermissioned Ledgers

Unpermissioned ledgers such as Bitcoin have no single owner — indeed, they cannot be owned. The purpose of an unpermissioned ledger is to allow anyone to contribute data to the ledger and for everyone in possession of the ledger to have identical copies.

Wallet

A file that houses private keys. It usually contains a software client which allows access to view and create transactions on a specific blockchain that the wallet is designed for.

WHALE

Someone who owns lots of crypto.