Steps to build a video copyright deposit system based on blockchain and IPFS

Please read carefully before purchasing the column: Introduction to the column "Video Copyright Deposit System Based on Blockchain and IPFS"

introduction:

This system uses the RSA algorithm to generate a key pair, and the RSA private key is used for user identity authentication. The users here include ordinary users (creators) and institutions; the data sent by the user will be stored in IPFS, and the CID (IPFS Hash) returned by IPFS and Detailed copyright information is stored in the blockchain, which expands the storage space of the blockchain; the blockchain part uses Hyperledger Fabric, and Hyperledger Explorer is used to track transactions

Contains functions

  1. Based on Fabric v1.4.4 first-network, four peers and one orderer node, deployed with docker
  2. IPFS uses the ipfs/kubo mirror, which is responsible for the storage of user data files, and the CID returned by IPFS is stored in Fabric
  3. The project includes Hyperledger Explorer (blockchain browser), which starts with the script by default
  4. The project includes tape to chaincode pressure test
  5. Use RSA public and private keys to authenticate user identities (1024 bits)
  6. The chain code stores the transmission records, including: user public key, organization public key, IPFS CID of the file, file name, timestamp, Fabric transaction id
  7. The backend is implemented using the gin framework, and the frontend is implemented using Vue and Element ui.
    Use go fabric sdk to call smart contracts; use go-ipfs-api to upload and download user files

Installation steps (default is on the local virtual machine)

  1. Install ubuntu 20.04 (or other Linux distributions), docker, docker-compose, go1.19
    docker, docker-compose, go1.19 installation method please refer to this article: https://blog.csdn.net/qq_41575489/article/ details/129129086

  2. Write to /etc/hosts:

    127.0.0.1 orderer.example.com
    127.0.0.1 peer0.org1.example.com
    127.0.0.1 peer1.org1.example.com
    127.0.0.1 peer0.org2.example.com
    127.0.0.1 peer1.org2.example.com
    
  3. The project needs to be operated on the server, and this step is omitted if it is a virtual machine.
    Modify 127.0.0.1 in the following two files to be the public IP of the server:

    datashare/application/server/controller/controller.go
    datashare/application/web/index.html
    
  4. Start the blockchain part

    cd blockchain
    ./start.sh
    
  5. Start the front end

    cd application/server
    go run main.go
    
  6. If it is a cloud server,
    allow TCP ports 9090 and 8080 on the firewall

  7. Open the webpage
    ip: 9090/web

tape pressure measurement command:

in blockchain/tape

./tape --config=config.yaml --number=100

Notice:

If all operations are performed in a virtual machine, there is no need to modify the IP

Guess you like

Origin blog.csdn.net/qq_41575489/article/details/131554152