This article address: original link
Share your experience on Hyperledger smart contracts.
Source Address: Chaincode_example2
In the previous setfabriconubuntu, there was no need for virtualbox and vagrant to deploy the fabric directly, and its usefulness now manifests itself ~
The operation of the smart contract Chaincode does not require multiple nodes to be started locally and can be tested directly. Then we can test the existing CHAINCODE_EXAMPLE0
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
("Creating consensus plugin%s", plugin)
Return PBFT. Getplugin (Stack)
}
Logger. Info ("Creating default consensus plugin (noops)")
Return Noops. Getnoops (Stack)
}
The controller directory is a function of the consensus plug-in selection moduleThe---->hyperledger provides two algorithms pbft and Noops----> Default single node Usage noops is equivalent to no consensus algorithm
Func newconsenter (Stack consensus. Stack) consensus. Consenter
The environment required to build the fabric under the ubantu environment.Configure Ubantu virtual machine under Mac, tutorial can refer to above.When the Ubantu system is ready, start the environment setup.
Environment construction
Quick Start: http://hyperledger-fabric.readthedocs.io/en/release-1.1/getting_started.html
Premise
Install Git
$ sudo apt update$ sudo apt install git
Installing Curl
$ sudo apt install curl
Install Vim
$ sudo apt install v
First, the Fabric SDK
The latest official document for Hyperledger fabric (V1.1.0-preview), the description of the Fabric SDK is still poor, just a few simple descriptions, plus two GitHub links: Fabric-sdk-node Fabric-sdk-java
In fact, through the Hyperledger project on GitHub we can see that Hyperledger fabric also offers another three kinds of sdk:fabric-sdk-
=/opt/gopath
Then Soorce
source/etc/profile.
Attention
If the mirror is slow, set up with Daocloud to download
curl-ssl https://get.daocloud.io/daotools/set_mirror.sh | sh-s/HTTP/ 6b8ef0e5.m.daocloud.io
Service Docker restart
if the download process encounters protoc-gen-go missing, download and copy to the corresponding directory
go get-u Github.com/golang/protobuf/protoc-gen-go
4 Fabric Mirroring
Install the fabric image (there are 2 methods, the 1th is to download the source code
current fabric there is limited development resources, so in 1.0 will not do, may be achieved in the future. COUCHDB Installation
Now let's talk about this couchdb.
COUCHDB is a database of key values for a full local restful API, which means we don't need any clients, we just need to operate the database via HTTP requests. Leveldb is a peer local database, then certainly and peer one-to-one relationship, then COUCHDB is a network database, should and peer what kind of relationship. In a produc
Hyperledger source code Analysis of Fabric
The sorting service plays a very central role in the Super Ledger Fabric network. All transactions need to be sorted globally before they are sent to committer for validation acceptance.
In the current architecture, the function of the sorting service is extracted, as a separate Fabric-orderer module to implement, the code is mainly in the Fabric/orderer directory.
The following Kafka as a consensus plug-in a
Hyperledger source code Analysis of Fabric
The Orderer node startup is implemented by the main () method under the Orderer package and further calls to the main () method in the Orderer/common/server package.
The core code is shown below.
Main is the entry point of Orderer Processfunc main () {
fullcmd: = Kingpin. Mustparse (app. Parse (OS. Args[1:])
//"version" command
if Fullcmd = = version. Fullcommand () {
fmt. Println (metada
Hyperledger Installation and testing (MAC PRO)
Environment preparation
Dccker
Golang
node. js
Python 2.7 (MacOS comes with)
Fabric Download and Installation
Reference Links:Hyperledger Fabric v1.1.0 MacOS Deploying a developer environment and creating the first Fabric network
Test
Note that the actual installation is using the 1.2 version, the corresponding test should also refer to:Building Your First Network
Some of the issues that
Prerequisite conditions
CentOS 7.4 64-bit
Install Docker and configure the Aliyun accelerator
Install Docker Compose
Install Golang
Because of the forbidden relationship, there is no way to direct access to the golang.org site, but the domestic download site a lot of their own Baidu can be.
My installation path is/usr/local/src/go
Edit/etc/profile file Add related environment variables as follows
Install Git
Yum Install git
Download Fabric Source Code
Mkdir-p ~/go/src/github.com/
> Before learning bitcoin and Ethereum, must first learn its block structure, at that time in the bank to do hyperledger related projects, I was very neglected in the structure, only care about the smart contract, incredibly can also initially master and start Project-related development. This shows that the super-Ledger block attribute is actually weaker, and it is important that the properties of the smart contract. Performance is also good. In this
Super Ledger Hyperledger Cello installation deployment and simple use
Cello GitHub
Hyperledger Cello helps manage blockchain networks effectively. use to quickly build a blockchain-as-a-service (BaaS) platform. Immediately provide customizable blockchain, such as Hyperledger Fabric Network v1.0 can be used on bare metal, virtual cloud (virtual machine, virtual c
The entities involved in Hyperledger Fabric 1.0 include the following:
FABRIC-CA: Mainly responsible for the maintenance of the certificate of the entity in the network;
Peer: mainly responsible for the implementation of intelligent contracts, record books;
Order: mainly responsible for the accounting content of the consensus.
1.0 architecture can be based on the actual needs of the network through the Certificate of Security Domain Division manag
Fabric-sdk-java build and compile (this article is based on 1.0.1 version)
1, install jdk1.8 and above version
2, download Fabric-sdk-java GitHub address: Https://github.com/hyperledger/fabric-sdk-java
3. Import into Eclipse tools
4, switch to the project directory under the Command Window mode of execution: MVN compile-dskiptests,
Refresh the project after the compilation succeeds.
Proto files in the project are generated into the Target/genera
Copyright Notice: Blog Article copyright owners all, without authorization, prohibit reprint, reprint please specify the source installation Environment installation JDK
Download URL: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Download jdk-8u151-macosx-x64.dmg install to PC install maven
Download URL: https://maven.apache.org/download.cgi
Extract to/users/fujinliang/documents/environment
Open terminal , modify. BASHRC
VI ~/.BASHRC
Add the following code
The previous analysis program looked at the details of the analysis, so without the concept of framework, took two days to analyze the Hyperledger fabric architecture design, analysis of the program does not reference any information, such as error welcome correction, common progress.
The author has the following questions before the detailed analysis procedure:
1) How the CLI (command line) client sends a command to a peer node
2) How the peer node
How to contribute code to the Hyperledger Fabric project
Installation Environment
It is recommended to develop the code in the Ubuntu 14.04+ environment and install the following tools. git: Used to get the code; Golang 1.6+: Environment variables such as configuration $GOPATH after successful installation. Get Code
First register the Linux Foundation ID and log in to https://gerrit.hyperledger.org/to add a personal SSH pub key.
Look at the list of
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.