First, start the process of developing code on the Java chain 1. Make sure you have grandle tools.2. Download the binary distribution package from the http://gradle.org/gradle-download/3. Unpack, move to the location you want, add the Grandle Bin directory to the system path4. Ensure that the GRANDLE-V command can be executed, the version shown is 2.12 or higher5. Ensure Grandle daemon can be quickly created6. Make sure you've turned jdk8.0 and also make sure that the Java directory is in your p
Fabric Source Analysis 2--peer command structure
Peer directory Structure
Peer directory structure itself is very clear, a main.go file, the rest of the folder, in addition to the COMMON,GOSSIP are all sub-command set, there are chaincode,channel,clilogging,node,version five, their respective duties, For Main.go integrated use. In a child command folder, the. Go file with the same name as the folder is the primary source file, and the rest is the so
Since my boss suddenly gave me an IBM Blockchain course website, I taught myself to finish two lessons from the blockchain provided by IBM and complete the compose-playground of this blockchain component in the fabric framework. This stand-alone construction is relatively simple, IBM's course has after-school this component related exercises and the document, therefore spent 2 days or so completed. Then the boss let me build a multi-machine cluster
When using shell commands for complex operations, the code tends to be complex and difficult to understand, and the Python scripting language is the equivalent of developing a common application, so maintenance and expansion are simpler, More importantly, the Python Ops tool fabric can automatically log on to other servers for a variety of operations, which is hard to do with the shell, but using the fabric
This article illustrates the Python bulk remote administration and deployment tools fabric usage. Share to everyone for your reference. Specifically as follows:
Fabric is a very powerful bulk remote management and deployment tool in Python that is often used to bulk perform SSH tasks on multiple remote PCs.
Common methods of use are summarized as follows:
1. First, to write a batch-executed task into a f
Boyang Tex
Shanghai Xiaoyang fashion fabric Co., Ltd. is a professional company engaged in the development, promotion and sales of advanced fashion fabric. Advanced fashion fabrics for men and women from various countries are gathered to lead the fashion trend and provide the most popular apparel brands at home and abroad.Fashionable high-end fashion fabrics are favored by m
Fabric is a very powerful batch remote management and deployment tool in Python that is often used to perform SSH tasks in batches on multiple remote PCs.The common use methods are summarized as follows:1, first, to write a batch of tasks into a fabfile.py,#-*-Coding:utf-8-*-from fabric.api import Run, local, roles, env, cdenv.hosts=[ ' 192.168.1.110 ', ' 192.168.1.111 ', ' 192.168.1.112 ']env.user= "username" env.password= "password" env.por
Recently, in learning Hyperledger fabric, you need to test fabric's multiple-machine deployment environment at the company's request, so there are three virtual machines installed locally for testing. The software used is VirtualBox, the virtual machine version is Ubuntu17.0.4, the virtual machine is nat+host only mode. The IP addresses and functions of three virtual machines are as follows:
192.168.56.105
Orderer node, peer0.org1.exa
Fabric Source Analysis 8--peer System Chaincode
Summary
For system Chaincode, the following is referred to as the chain code . This is a personal translation, based on the nature of the Chaincode is registered to store a section of the chain of logic code, so personal habits called Chaincode as chain code , fabric documents also disguised as intelligent contract. However, because Chaincode is a special no
Application development Configuration and build
You can use Go to develop applications and use the APIs available in the Hyperledger Fabric SDK Go to invoke the chain code to complete transactions in the blockchain network. At this stage we run the test project first.
Steps:
1. Sample application service-side code run
2. Download the certificate
3. Build the Certificate directory
4. Fabric SDK Configuration
Fabric is a Python class library that uses SSH protocol-based command-line tools for application Deployment and System task management, and here are two ways that fabric code runs in parallel:
1: Parameter-P
From FABRIC.API import * host1 = ' root@ip1:22 ' host2 = ' root@ip2:22 ' env.hosts = [Host1, host2] Env.pass Words = { host1: "P1", host2: "P2" }
Have the version number of the strict as required, encountered a lot of pits1) No requirement to install Git version2) Install the Go 1.9 configuration environment variable3) Install Vagrant 1.9.44) Install VirtualBox 5.1.285) Create the following directory under the Go installation directory/src/(no restrictions on location)D:\Go\src\github.com\hyperledger6) Use Git to draw official source codegit clone https://github.com/hyperledger/fabric.git7) Open the corresponding pathD:\Go\src\github.com\
Fabric is a command-line-based automated deployment framework for Python that uses Docker to open two of containers to learn fabric.#!/usr/bin/env python#-*-coding=utf-8-*- fromFabric.apiImport*env.hosts=[ '[Email protected]:22', '[Email protected]:32',]env.passwords={ '[Email protected]:22':'*****', '[Email protected]:32':'***',} @taskdefTask1 (): Run (' PS') @taskdefTask2 (): Run (' Uname-a')
work, let us see how to achieve a key with fabric: (in fact, with shell script can be directly done, but the advantage of FAB is not here, Here the main bit behind the local + remote operation to prepare, after all, two places to write a script for easy maintenance)from fabric.api import localdef setting_ci(): local("cd /home/project/test/conf/") local("git add settings.py") #后面你懂的,懒得敲了…..Mashup Integration Remote operationAt this point, sup
work, let us see how to achieve a key with fabric: (in fact, with shell script can be directly done, but the advantage of FAB is not here, Here the main bit behind the local + remote operation to prepare, after all, two places to write a script for easy maintenance)from fabric.api import localdef setting_ci(): local("cd /home/project/test/conf/") local("git add settings.py") #后面你懂的,懒得敲了…..Mashup Integration Remote operationAt this point, sup
first, fabric network structure (temporarily excluding CA)
As shown in the figure above, in the Fabric network, o indicates that ORDERER,P represents PEER,EP representative endorsing Peer (endorser), CC represents Chaincode, and client, Channel, Ledger, Transaction, which makes up the entire network, describes each of these elements:
Clients: A client installed at a node (Peer) can initiate a request to
The 1.Chaincode interface must be implemented by all the code on the chain, and the fabric runs the transaction by invoking these specified functions
Call the INIT function to allow code on the chain to initialize internal data after the container has established a connection and then deploys the transaction
Init (stub chaincodestubinterface, function string, args []string) ([]byte, error)
Each call to the transaction invokes the Invoke interface.
Installing Curl (Install curl)
If you do not have curl installed, download and install it.
Note: If it is windows, please look at the following Windows extras;
Docker and Docker Compose
Below you talk about installing Docker and Docker compose.
MAXOSX, *nix, or Windows 10 requires the installation of Docker V1.12 or a later version.
Older versions of Windows need to be installed first: Docker Toolbox before installing Docker V1.12 or later.
You can view your Docker version by entering the fol
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.