Fisco-bcos Environment (ii) deployment system contract

Source: Internet
Author: User
Chapter Fourth Deployment system contracts

System contract is one of the important design ideas of Fisco Bcos block chain, and it is also an important way to control network nodes ' joining and exiting, and only one system contract should be deployed in each block chain. For more information on system contracts, see Appendix: 11.7 System Contract Introduction 4.1 configuration

Switch to the directory where the system contracts are deployed

Cd/mydata/fisco-bcos/systemcontractv2

Install dependent environment

CNPM Install

Set up block chain node RPC ports

Vim.. /web3lib/config.js

Just point the proxy to the RPC port of the block chain node. RPC ports are viewed in the node's Config.json (reference: 2.5.2 Configuration Config.json (node configuration file)).

var proxy= "http://127.0.0.1:8545";
4.2 System contracts of the Department

Run the Deploy.js deployment system contract directly. Note that this deploy.js is different from the tool directory for two files.

Successful deployment, output contract routing table.

rpc=http://127.0.0.1:8545 ouputpath=./output/systemproxy Contract Address 0x919868496524eedc26dbb81915fa1547a20f8998 # <---- ---------'s important. Transactionfilterchain Contract Address 0X23DF89A2893120F686A4AA03B41ACF6836D11E5D authorityfilter contract Address 0x4437f8c9cd1e6a3e8ec9c3460c4bc209acdca052 Send Transaction success: 0xc173c4e910e1a38d2debbb7e29bd3962e8806e5855baf6104bd20c5ab826c98d Send Transaction success: 0xdcc57fc04867cef0f9499c1f03d22884a4a5e292296f98e3367b9307767feefa Authorityfilter Version Number 1.0 Group contract address 0x61dba250334e0fd5804c71e7cbe79eabecef8abe caaction contract Address 0x60d4ee5c461677840ab3552a6845fdf7db4a5317 nodeaction contract Address
0XA40C864C28EE8B07DC2EEAB4711E3161FC87E1E2 configaction Contract Address 0XFCD14ED03E6D94CA127D557A1883DD042A81EA11 Fileinfomanager Contract Address 0x73479ed8162e198b9627b962eb4aae7098bdc770 Fileservermanager contract Address 0X1406A0C559995562FC77BF2A214A2DCFAB4F6B2B contractabimgr Contract Address 0x9216757a91607668cf8a7a38f8ae56206a6e9f6b ...
Omit a few lines .....
Register Fileservermanager ..... Send transaction success: 0XE6B7971A727248ED7F120EDCC7314129CED70C9AB546038FEFF6C372C68A9CC3 contract Deployment Complete System Agent contract: 0x919868496524eedc26dbb81915fa1547a20f8998-----------------System Routing Table----------------------0) transactionfilterchain=> 0x23df89a2893120f686a4aa03b41acf6836d11e5d,false,18 authorityfilter=> 1.0,0x4437f8c9cd1e6a3e8ec9c3460c4bc209acdca052 1) Configaction=>0xfcd14ed03e6d94ca127d557a1883dd042a81ea11, false,19 2) nodeaction=>0xa40c864c28ee8b07dc2eeab4711e3161fc87e1e2,false,20 3) caaction=> 0x60d4ee5c461677840ab3552a6845fdf7db4a5317,false,21 4) contractabimgr=> 0x9216757a91607668cf8a7a38f8ae56206a6e9f6b,false,22 5) fileinfomanager=> 0x73479ed8162e198b9627b962eb4aae7098bdc770,false,23 6) fileservermanager=>

 0x1406a0c559995562fc77bf2a214a2dcfab4f6b2b,false,24

In the above output, it is important that the System Agent contract address, namely Systemproxy contract address. Such as:

Systemproxy Contract Address 0x919868496524eedc26dbb81915fa1547a20f8998
4.3 Configure system Agent contract address

System Agent contract, is the routing of all system contracts, by configuring the System Agent contract address (Systemproxy) to correctly invoke system contracts. Each block chain node should configure the System Agent contract address to correctly invoke the system contract.

Modifies the Config.json of all block chain nodes. Configure the Systemproxyaddress field to the Systemproxy contract address configuration that is exported by the above steps.

Vim/mydata/nodedata-1/config.json

After configuration, the systemproxyaddress fields in Config.json are as follows:

"Systemproxyaddress": "0x919868496524eedc26dbb81915fa1547a20f8998",

To reboot a configured node:

cd/mydata/nodedata-1/
chmod +x *.sh/stop.sh
./start.sh #执行此步骤后不断刷出打包信息, indicating successful reboot

Since then, the system contract has come into effect, preparing the block chain for configuring multiple nodes. For more information on system contracts, please refer to Appendix: 11.7 System Contract Introduction

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.