系统链码与智能合约

本文详细介绍了Hyperledger Fabric中的智能合约与系统链码概念。智能合约定义了业务对象的状态转换逻辑,并被封装到链码中进行部署。系统链码如生命周期系统链码、配置系统链码等则用于管理链码的安装、升级及通道配置变更。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

System Chaincode and Smart Contract

再次强调一遍:
system chaincode 系统链码;smart contract智能合约

a smart contract defines the executable logic that generates new facts that are added to the ledger.

A smart contract defines the rules between different organizations in executable code. Applications invoke a smart contract to generate transactions that are recorded on the ledger.

A chaincode is typically used by administrators to group related smart contracts for deployment, but can also be used for low level system programming of Fabric

a smart contract defines the transaction logic that controls the lifecycle of a business object contained in the world state.

It is then packaged into a chaincode which is then deployed to a blockchain network.

Think of smart contracts as governing transactions, whereas chaincode governs how smart contracts are packaged for deployment.
在这里插入图片描述
A smart contract is defined within a chaincode. Multiple smart contracts can be defined within the same chaincode. When a chaincode is deployed, all smart contracts within it are made available to applications.

Different Types of System chaincode

_lifecycle runs in all peers and manages the installation of chaincode on your peers, the approval of chaincode definitions for your organization, and the committing of chaincode definitions to channels.

  • Lifecycle system chaincode (LSCC) manages the chaincode lifecycle for the 1.x releases of Fabric. This version of lifecycle required that chaincode be instantiated or upgradedon channels. You can still use LSCC to manage your chaincode if you have the channel application capability set to V1_4_x or below.
  • Configuration system chaincode (CSCC) runs in all peers to handle changes to a channel configuration, such as a policy update.
  • Query system chaincode (QSCC) runs in all peers to provide ledger APIs which include block query, transaction query etc.
  • Endorsement system chaincode (ESCC) runs in endorsing peers to cryptographically sign a transaction response.
  • Validation system chaincode (VSCC) validates a transaction, including checking endorsement policy and read-write set versioning.

关于这一块的好文

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值