Skip to content

Commit ec0159a

Browse files
joe-alewinejoe-alewine
joe-alewine
authored and
joe-alewine
committed
[FAB-10198] Update system chaincode documentation
Change-Id: I60d1d3c9442167ad5cfe8723bdf11ebabc887e6a Signed-off-by: joe-alewine <Joe.Alewine@ibm.com>
1 parent ea2296d commit ec0159a

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

docs/source/systemchaincode.rst

+16-14
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ System chaincodes are specialized chaincodes that run as part of the peer proces
55
as opposed to user chaincodes that run in separate docker containers. As
66
such they have more access to resources in the peer and can be used for
77
implementing features that are difficult or impossible to be implemented through
8-
user chaincodes. Examples of System Chaincodes are ESCC (Endorser System Chaincode)
9-
for endorsing proposals, QSCC (Query System Chaincode) for ledger and other
10-
fabric related queries and VSCC (Validation System Chaincode) for validating
11-
a transaction at commit time respectively.
8+
user chaincodes. Examples of System Chaincodes include QSCC (Query System Chaincode)
9+
for ledger and other fabric related queries, CSCC (Configuration System Chaincode)
10+
which helps regulate access control, and LSCC (Lifecycle System Chaincode).
1211

1312
Unlike a user chaincode, a system chaincode is not installed and instantiated
14-
using proposals from SDKs or CLI. It is registered and deployed by the peer at start-up.
13+
using proposals from SDKs or CLI. It is registered and deployed by the peer at
14+
start-up.
1515

16-
System chaincodes can be linked to a peer in two ways: statically and dynamically
16+
System chaincodes can be linked to a peer in two ways: statically and dynamically,
1717
using Go plugins. This tutorial will outline how to develop and load system chaincodes
1818
as plugins.
1919

@@ -27,21 +27,22 @@ A plugin includes a main package with exported symbols and is built with the com
2727
``go build -buildmode=plugin``.
2828

2929
Every system chaincode must implement the `Chaincode Interface <https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim#Chaincode>`_
30-
and export a constructor method that matches the signature ``func New() shim.Chaincode`` in the main package.
31-
An example can be found in the repository at ``examples/plugin/scc``.
30+
and export a constructor method that matches the signature ``func New() shim.Chaincode``
31+
in the main package. An example can be found in the repository at ``examples/plugin/scc``.
3232

3333
Existing chaincodes such as the QSCC can also serve as templates for certain
34-
features - such as access control - that are typically implemented through system chaincodes.
35-
The existing system chaincodes also serve as a reference for best-practices on
36-
things like logging and testing.
34+
features --- such as access control --- that are typically implemented through
35+
system chaincodes. The existing system chaincodes also serve as a reference for
36+
best-practices on things like logging and testing.
3737

3838
.. note:: On imported packages: the Go standard library requires that a plugin must
39-
include the same version of imported packages as the host application (fabric, in this case)
39+
include the same version of imported packages as the host application
40+
(Fabric, in this case).
4041

4142
Configuring Plugins
4243
-------------------
4344

44-
Plugins are configured in the ``chaincode.systemPlugin`` section in *core.yaml*:
45+
Plugins are configured in the ``chaincode.systemPlugin`` section in ```core.yaml``:
4546

4647
.. code-block:: bash
4748
@@ -54,7 +55,8 @@ Plugins are configured in the ``chaincode.systemPlugin`` section in *core.yaml*:
5455
invokableCC2CC: true
5556
5657
57-
A system chaincode must also be whitelisted in the ``chaincode.system`` section in *core.yaml*:
58+
A system chaincode must also be whitelisted in the ``chaincode.system`` section
59+
in ``core.yaml``:
5860

5961
.. code-block:: bash
6062

0 commit comments

Comments
 (0)