区块链之解读config.ini文件

配置RPC端口

[rpc]
    channel_listen_ip=0.0.0.0 //Channel监听IP,为方便节点和SDK跨机器部署,默认设置为0.0.0.0


    channel_listen_port=20200 //Channel端口,对应到JAVA SDK配置中的channel_listen_port


    jsonrpc_listen_ip=127.0.0.1 //RPC监听IP,安全考虑,默认设置为127.0.0.1,若有外网访问需求,请监听节点外网IP或0.0.0.0


    jsonrpc_listen_port=8545 //JSON-RPC端口

当前FISCO-BCOS必须要配置P2P网络配置(为什么?)

[p2p]
    listen_ip=0.0.0.0 //P2P监听IP,默认设置为0.0.0.0


    listen_port=30300 //节点P2P监听端口


    ; nodes to connect //节点需连接的所有节点
    node.0=127.0.0.1:30300
    node.1=127.0.0.1:30301
    node.2=127.0.0.1:30302
    node.3=127.0.0.1:30303

黑名单与白名单配置

[certificate_blacklist] //黑名单配置
    ; crl.0 should be nodeid, nodeid's length is 128
    ;crl.0=

[certificate_whitelist] //白名单配置
    ; cal.0 should be nodeid, nodeid's length is 128
    ;cal.0=

配置群组内的配置 

[group]
    group_data_path=data/ //群组数据存储路径


    group_config_path=conf/ //群组配置文件路径

配置SSL连接的证书信息

[network_security]
    ; directory the certificates located in
    data_path=conf/ //证书和私钥文件所在目录


    ; the node private key file
    key=node.key //节点私钥相对于data_path的路径


    ; the node certificate file
    cert=node.crt //证书node.crt相对于data_path的路径


    ; the ca certificate file
    ca_cert=ca.crt //ca证书文件路径

落盘加密

[storage_security]
    enable=false //是否开启落盘加密,默认不开启
    key_manager_ip= //Key Manager服务的部署IP
    key_manager_port= //Key Manager服务的监听端口
    cipher_data_key= //节点数据加密密钥的密文,cipher_data_key的产生

配置节点的链属性。此配置项建链时工具会自动生成,用户不需修改

[chain]
    id=1 //链ID,默认为1


    ; use SM crypto or not, should nerver be changed 
    sm_crypto=false //true表示节点使用国密模式,false表示节点使用非国密模式,默认为false


    sm_crypto_channel=false //此选项用于配置是否使用国密SSL与SDK连接,默认为false

配置节点的兼容性

[compatibility] 
    ; supported_version should nerver be changed
    supported_version=2.8.0 //当前节点运行的版本

统计日志配置

[log]
    enable=true //是否启用日志


    log_path=./log //日志路径


    ; enable/disable the statistics function
    enable_statistic=false //使用启用网络统计功能


    ; network statistics interval, unit is second, default is 60s
    stat_flush_interval=60 //网络统计数据的刷新间隔,单位为秒


    ; info debug trace
    level=info //日志级别


    ; MB
    max_log_file_size=200 //日志的最大容量大小,默认200MB,日志级别从大到小排序        error > warning > info > debug > trace


    flush=true //默认开启日志自动刷新,若需提升系统性能,建议将该值设置为false

[flow_control]
    ; restrict QPS of the node
    ;limit_req=1000 //用于限制SDK每秒到节点的最大请求数目,当每秒到节点的请求超过配置项的值时,请求会被拒绝,SDK请求速率限制默认关闭,若要开启该功能,需要将limit_req配置项前面的;去掉
    ; restrict the outgoing bandwidth of the node
    ; Mb, can be a decimal
    ; when the outgoing bandwidth exceeds the limit, the block synchronization operation will not proceed
    ;outgoing_bandwidth_limit=2 //节点出带宽限制,单位为Mbit/s,当节点出带宽超过该值时,会暂缓区块发送,也会拒绝客户端发送的AMOP请求,但不会限制区块共识和交易广播的流量,该配置项默认关闭,若要打开流量限制功能,请将outgoing_bandwidth_limit配置项前面的;去掉

猜你喜欢

转载自blog.csdn.net/LforikQ/article/details/130985734