Hyperledger fabric smart contract writing (2) ledger operations

1. What is Chaincode Chaincode is a program written in Go, Node.js, or Java that implements a prescribed interface. Chaincode runs in a process independent of peers, initializing and managing ledger state through transactions submitted by applications. Chaincode usually handles the business logic after Channel member permission, so it is similar to a “smart contract”. […]

Hyperledger fabric deploys chain code (5) Initialization and chain code upgrade

After the chaincode definition is submitted to channel, it will be started on the peer node of the channel where the chaincode is installed. The asset-transfer (basic) chaincode can now be called directly by client applications via the command line. Use the following command to create an initial set of assets (initialization) on ledger. Please […]

Hyperledger fabric test environment deployment

1. Preface This tutorial runs under the ubuntu20.04 version. Please deploy the ubuntu20.04 environment before performing the fabric2.2 environment deployment. All deployments are carried out in accordance with the official document hyperledger fabric. I also share the problems and solutions encountered during the operation. I will answer them one by one. If you don’t know […]

Hyperledger fabric smart contract writing (3) Endorsement strategy

1. Concept of endorsement strategy Nodes use the endorsement strategy to determine whether a transaction is correctly endorsed. When a peer accepts a transaction, it will call the VSCC (Validation System Chaincode) related to the transaction Chaincode as part of the transaction verification process to confirm the validity of the transaction. Therefore, a transaction contains […]

Hyperledger fabric smart contract writing (1)

1. Differences in fabric chain code versions Fabric chaincode is divided into two major versions, version 1.x and version 2.x. The main differences between the two are: ####1. Differences in imported packages The packages imported by 1.x are: “[github.com/hyperledger/fabric/core/chaincode/shim](http://github.com/hyperledger/fabric/core/chaincode/shim)” pb “[github.com/hyperledger/fabric/protos/peer](http://github.com/hyperledger/fabric/protos/peer)” The packages imported by 2.0 are: “[github.com/hyperledger/fabric-contract-api-go/contractapi](http://github.com/hyperledger/fabric-contract-api-go/contractapi)” ####2. Different method structures There is no […]

The use and development of Hyperledger Fabric

Hyperledger Fabric is a cross-industry blockchain technology initiated by the Linux Foundation. It is currently used in many large companies. I won’t introduce HF itself here. If you are interested, you can pay attention to its official website. 1. Preparations: Before starting, certain preparations are required, including installing various middleware: If the following problems occur […]

Hyperledger Fabric using CouchDB and complex smart contract development

Foreword In the last experiment, we have implemented a simple smart contract implementation and client development, but the smart contract in this experiment only has basic addition, deletion, modification and query functions, and its data management functions are far from traditional MySQL. Based on the previous experiments, this article will change Hyperledger Fabric’s default database […]

M2-Macbook install hyperledger explorer-docker way, install by hand

There are some problems with the installation of the M2 chip according to the official tutorial, record and share the solutions to various pits The official tutorial is as follows GitHub – hyperledger-labs/blockchain-explorer This article is the docker method 1. Prerequisites According to the official Docker related dependencies, hyperfavric ledger, etc. 2. Start the fabric […]

Preparation and basic use of Hyperledger Fabric test network

Article directory related installation Launch test network Create channels Packaging chaincode Install the chaincode package defined by chaincode The chaincode definition is submitted to the channel call chaincode close the network problems encountered 1.docker keeps starting 2. Forget about testnets 3. Java version is too high, recommend 1.8 Related installation npm, node, git, docker, docker-compose. […]