• Hyperledger Fabric中的系统链码——VSCC, ESCC, LSCC, ESCC, QSCC


    系统链码也与用户链码相同。这些链码内置于peer节点中。

    Hyperledger Fabric 中提供了以下系统链代码:

    • LSCC
    • ESCC
    • VSCC
    • CSCC
    • QSCC

    1、LSCC: Lifecycle System Chaincode

    This system chaincode is used for managing the lifecycle of chaincode. It is used for install, instantiate and update chaincode. When we install chaincode, the process goes through LSCC

    2、ESCC: Endorsement System Chaincode

    This system chaincode is used to endorse the transaction by digitally signing the response.
    The client sends the transaction proposal to invoke chaincode function at the endorsement phase. client sign proposal with his credential and send to endorsement peers. First endorsing peer simulate transaction and verify if the client is authorized to invoke transaction on the channel. The endorsement peer executes the chaincode and creates a read/write(R/W) set. Transaction result includes response value, read set and write set. Then endorsement peer call ESCC and sign this transaction response with peer identity and send back to client.

    3、VSCC: Validation System Chaincode

    This is used to validate the transaction against its endorsement policy.
    A Validation system chaincode evaluates endorsements in the transaction against the endorsement policy specified for the chaincode. If the endorsement policy is not satisfied, then that transaction is marked invalid.
    When all peers get a block from the orderer, first they verify orderer's signature on the block. Every block is decoded and all the transaction goes through VSCC before performing MVCC validation. VSCC validates endorsements in the transaction against endorsement policy specified for chaincode. If the endorsement policy fails to satisfy, then the transaction is marked as invalid.
    Note: MVCC - Multiversion Concurrency Control — It ensures that the version of keys read by transaction during the endorsement phase is the same as the current state in a local ledger at commit time. It is performed on all valid transactions in the block which is validated by VSCC. If the read set version does not match, the transaction is marked as invalid. MVCC is not chaincode, it's a mechanism to avoid the double-spending problem in Hyperledger fabric

    4、CSCC: Configuration system Chaincode

    This chaincode is used to manage channel configuration. When we create a channel, update channel, the process goes through the configuration system chaincode. Actually it validates the channel creation/updation.

    5、QSCC: Query System Chaincode

    This Chaincode runs in all peer and provide ledger API like getTransactionByTransactionID, getBlockByBlockNumber, GetBlockByTxID, GetChainInfo, GetBlockByTxID.

    Hope this article will help you. It's basic information about the system chaincodes.

    Top
    收藏
    关注
    评论
  • 相关阅读:
    【ASP.NET 插件】zyUpload的HTML5上传插件
    【软件】图文解释XCode常用快捷键的使用
    【软件使用】Windows下的Objective-C集成开发环境搭建(IDE)
    【Javascript Demo】移动端访问PC端网页时跳转到对应的移动端网页
    【网络文摘】30多年程序员生涯经验总结
    【算法】网上看到的5个问题
    【ASP.NET 进阶】定时执行任务
    【ASP.NET 基础】Page类和回调技术
    【ASP.NET 基础】表单和控件
    【ASP.NET 基础】ASP.NET内置对象
  • 原文地址:https://www.cnblogs.com/JasonCeng/p/15763794.html
Copyright © 2020-2023  润新知