zoukankan      html  css  js  c++  java
  • fabric升级链码步骤

    Fabric 2.2.1 升级链码步骤

    1. 在通道所属的对等节点安装链码
    peer lifecycle chaincode install 
        ${CC_NAME}.tar.gzs
    
    1. 查询链码是否被安装
    peer lifecycle chaincode queryinstalled
    
    1. 机构1审批,检查链码定义是否准备好提交
      (1) 机构审批
    peer lifecycle chaincode 
        approveformyorg 
        -o localhost:7050 
        --ordererTLSHostnameOverride orderer.example.com 
        --tls 
        --cafile $ORDERER_CA 
        --channelID $CHANNEL_NAME 
        --name ${CC_NAME} 
        --version ${CC_VERSION} 
        --package-id ${PACKAGE_ID} 
        --sequence ${CC_SEQUENCE} ${INIT_REQUIRED} ${CC_END_POLICY} ${CC_COLL_CONFIG}
    
    (2) 检查链码是否准备好
    
    peer lifecycle chaincode checkcommitreadiness 
        --channelID $CHANNEL_NAME 
        --name ${CC_NAME} 
        --version ${CC_VERSION} 
        --sequence ${CC_SEQUENCE} ${INIT_REQUIRED} ${CC_END_POLICY} ${CC_COLL_CONFIG} 
        --output json
    
    1. 机构2审批,检查链码定义是否准备好提交
    2. 提交链码定义
    peer lifecycle chaincode commit 
        -o localhost:7050 
        --ordererTLSHostnameOverride orderer.example.com 
        --tls 
        --cafile $ORDERER_CA 
        --channelID $CHANNEL_NAME 
        --name ${CC_NAME} $PEER_CONN_PARMS 
        --version ${CC_VERSION} 
        --sequence ${CC_SEQUENCE} ${INIT_REQUIRED} ${CC_END_POLICY} ${CC_COLL_CONFIG}
    
    1. 查询提交定义的结果
    peer lifecycle chaincode 
        querycommitted 
        --channelID $CHANNEL_NAME 
        --name ${CC_NAME}
    

    验证升级成功

    链码更新完成,日志

    2021-09-27 02:25:48.886 UTC [lifecycle] update -> INFO 0b0 Updating cached definition for chaincode 'ncapledger' on channel 'chl-01'
    2021-09-27 02:25:48.886 UTC [lifecycle] update -> INFO 0b1 Chaincode with package ID 'ncapledger_20210927:cd7711fdbb05c99c74f3a7cc50dc7516eb3d84c17b5da1019f539a0099750a0a' now available on channel chl-01 for chaincode definition ncapledger:20210927
    
  • 相关阅读:
    Servlet(九):web.xml文件和server.xml文件
    Servlet(八):ServletContext对象和ServletConfig对象
    Servlet(七):session
    Servlet(六):Cookie
    Servlet(五):请求转发和重定向
    Servlet(四):request和response对象
    Servlet(三):生命周期、常用方法、常见错误
    【php】在Windows2003下的IIS配置php5.4
    Spring AOP监控SQL运行
    算法导论—无向图的遍历(BFS+DFS,MATLAB)
  • 原文地址:https://www.cnblogs.com/jiftle/p/15337495.html
Copyright © 2011-2022 走看看