This is the Chaincode for developers chapter in the official document of Hyperledger Fabric V1.0.The first translation, the wrong place also asked netizens to point out that we learn together progress.Original address (http://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html) chain code is what
Chaincode is a program written with go, which eventually implements a defined interface in other programming languages, such as Java. The chain co
the code
The preferred need is to determine that the go environment is installed and properly configured.
For the sake of simplicity, we use the following command:
Mkdir-p $GOPATH/src/asset cd $GOPATH/src/asset
Next, we create the source file
Touch Asset.go
2.2 Introduction Package
Each Chaincode implements the Chaincode interface
Package main
Import (
"FMT"
"Github.com/hyperledger/fabric/core/chaincode/shim" "
github.com/ Hyperledg
Label:One, MySQL fabric high-availability cluster A database crashes, does not affect the integrity of the data1. Pre-Test preparationA) View the server status of the Group_id-1 cluster groupMysqlfabric Group Lookup_servers Group_id-1return Result:Command: {success = True return = [{' Status ': ' PRIMARY ', ' server_uuid ': ' 7a45f71d-7934-11e4-9e8c-782bcb74823a ', ' mode ': ' Read_write ', ' Weight ': 1.0, ' address ': ' 192.168.1.71:3306 '}, {' Stat
Use Fabric to automate your tasks.What is fabric?
Fabric is a Python library that can run tasks in batches on multiple hosts through SSH. You can write a task script and use Fabric locally to run it automatically on a large number of remote servers using SSH. These functions are ideal for automated application deployme
source code compilation-why?The compilation of fabric source code is based on the basic knowledge of some of the modules or modules of the fabric. But why compile the source of the fabric, the gods have already written the fabric of the project framework and compiled it, not to use it?
1. The Docker container that depl
OverviewFirst of all, this article is only a refinement of the official documents (Chinese, English), detailed installation instructions please read the official documents carefully.While the official name of service fabric is often added to Azure, in fact (many people don't know) that service fabric can be installed on an on-premises datacenter or on any public cloud, there is a chapter in the official doc
Fabric CA User's Guide
Certification Authority
The features provided are: identity registration : or connecting to LDAP (Lightweight Directory Access Protocol, Lightweight Directory Access Protocol) as a user registry; issuance of a registration certificate (ecerts) (Enrollment certificates) issuing Transaction certificate (tcerts) (Transaction certificates) : Provides anonymity and is not linked when trading on Hyperledger
MSP is the abbreviation of Membership service provider, the personal custom literal translation is the member relation service provider. The role is similar to having a large number of participants in a running fabric system network, which is designed to manage these participants, identify who is qualified, who are ineligible, maintain the rights of one participant, and maintain relationships between participants. For more professional concepts of MSP
Because the software (Docker fabric 0.6) and the system (Ubuntu 16.04TLS) operating environment version of the changing, so the online list of various tutorials or the personal summary of netizens may not be able to walk in their own environment, especially for the novice, out of the wrong. Fabric 1.0 is not going to be ready at the end of March, so share your summary of the kids ' shoes that you want to pr
0x00
In fabric, peer is an important binary program, its function is mainly to provide peer related operations, regarding peer concept, can refer to official Document 1 and Official Document 2, peer this CLI tool, as a client, can be launched to the Blockchain Network ( channel ) peerrelated from the operation, this command contains a lot of sub-commands, this article will not be introduced, this is not the purpose of this article, this article is mai
As we all know, Fabric is a Python library. you can execute tasks in batches on multiple hosts through SSH. You can write a task script and use Fabric locally to run it automatically on a large number of remote servers using SSH. These functions are ideal for automated application deployment or system management tasks. This article describes how to use Fabric to
This is a creation in
Article, where the information may have evolved or changed.
Hyperledger Fabric Client SDK for Go
Go get-u github.com/hyperledger/fabric-sdk-go
Document Https://godoc.org/github.com/hyperledger/fabric-sdk-go
compatibility
Fabric v1.0.1 Fabric
: $PATH
Exit Edit and enter the following command to make the changes effective:
Source/etc/profile
Enter the following command to see if the installation was successful:
Go version
If it appears: Go version go1.9.2 LINUX/AMD64 indicates a successful configuration.
As for Gopath, this is the directory where the Go program runs, that is, all the go programs you write are placed in this directory. Based on the above configuration, we create a new Gopath folder in the ~ directory and then create
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
time, which may miss this "virtual value" during this process. COUCHDB is run as a standalone database process with peer, so there are additional considerations for setup, management, and operation. We can consider starting with the default embedded Leveldb, which can be transferred to COUCHDB if additional complex rich queries are required. modeling Chaincode Asset data as JSON is a good practice so that we can execute the complex rich queries we need in the future. Using the CouchDB in Ch
Python automated O M and deployment project tool Fabric use instance, pythonfabric
Fabric is a good tool for automated O M and deployment projects developed using Python. It can automate interaction with remote servers through SSH, such as uploading local files to servers, execute shell commands on the server.
The following is an example of automatic deployment of Django projects.
#-*-Coding: UTF-8-*-# Th
Python fabric remote deployment and pythonfabric deployment
Python fabric Remote Deployment
Requirement Description
In the process of collaborative development projects, code is submitted to the git server almost every day, and then deployed to the test server. It is really boring to repeat several lines of commands every day. What should I do? Automated O M! Next, let's talk about
In Balance-transfer, there are examples of the node SDK being quite complete.The official documentation for the SDK is here: https://fabric-sdk-node.github.io/Each configuration item in the Balance-transfer is ready, and if you need to regenerate the artifacts, make sure to modify the corresponding changes after the build Docker-compose.yaml,network-config.yamlStart the networkAfter you run the./runapp.sh, you get a similar result:Stopping peer1.org1.
Install Python-Pip and Fabric in CentOS/Ubuntu
Recently, newsblur has been being deployed. You need to use fabric to deploy several Remote Server clusters. However, fabric must be installed using pip and other tools. For CentOS server version, pip must be installed first.
Pip is a tool that can replace easy_install to install and manage python software packages.
I. Concepts
Hyperledger is a umbrella project of open source Blockchains and related tools, started in December 2015 by the Linux Foundation, to support the collaborative development of blockchain-based ledgers.
Hyperledgerfabric is a subproject based in Openblockchain denoted by IBM.
Hyperledger Fabric is a platform for distributed ledger solutions, underpinned from a modular architecture delivering high D Egrees of confidentiality, resiliency, flexi
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.