fabric-docs-i18n
fabric-docs-i18n copied to clipboard
[ja_JP] Commands Reference / peer lifecycle chaincode
Original HTML: https://hyperledger-fabric.readthedocs.io/en/release-2.5/commands/peerlifecycle.html Original Source: https://github.com/hyperledger/fabric/blob/e1e8e2e52aa4fc543360d245fe6554a0eaf81183/docs/source/commands/peerlifecycle.md
diff --git a/docs/source/commands/peerlifecycle.md b/docs/source/commands/peerlifecycle.md
index 7bb768af0..df82c6927 100644
--- a/docs/source/commands/peerlifecycle.md
+++ b/docs/source/commands/peerlifecycle.md
@@ -1,3 +1,8 @@
+<!---
+ File generated by help_docs.sh. DO NOT EDIT.
+ Please make changes to preamble and postscript wrappers as appropriate.
+ --->
+
# peer lifecycle chaincode
The `peer lifecycle chaincode` subcommand allows administrators to use the
@@ -20,6 +25,7 @@ The `peer lifecycle chaincode` command has the following subcommands:
* install
* queryinstalled
* getinstalledpackage
+ * calculatepackageid
* approveformyorg
* queryapproved
* checkcommitreadiness
@@ -37,7 +43,7 @@ Usage:
peer lifecycle [command]
Available Commands:
- chaincode Perform chaincode operations: package|install|queryinstalled|getinstalledpackage|approveformyorg|queryapproved|checkcommitreadiness|commit|querycommitted
+ chaincode Perform chaincode operations: package|install|queryinstalled|getinstalledpackage|calculatepackageid|approveformyorg|queryapproved|checkcommitreadiness|commit|querycommitted
Flags:
-h, --help help for lifecycle
@@ -48,13 +54,14 @@ Use "peer lifecycle [command] --help" for more information about a command.
## peer lifecycle chaincode
```
-Perform chaincode operations: package|install|queryinstalled|getinstalledpackage|approveformyorg|queryapproved|checkcommitreadiness|commit|querycommitted
+Perform chaincode operations: package|install|queryinstalled|getinstalledpackage|calculatepackageid|approveformyorg|queryapproved|checkcommitreadiness|commit|querycommitted
Usage:
peer lifecycle chaincode [command]
Available Commands:
approveformyorg Approve the chaincode definition for my org.
+ calculatepackageid Calculate the package ID for a chaincode.
checkcommitreadiness Check whether a chaincode definition is ready to be committed on a channel.
commit Commit the chaincode definition on the channel.
getinstalledpackage Get an installed chaincode package from a peer.
@@ -120,6 +127,7 @@ Flags:
--connectionProfile string The fully qualified path to the connection profile that provides the necessary connection information for the network. Note: currently only supported for providing peer connection information
-h, --help help for install
--peerAddresses stringArray The addresses of the peers to connect to
+ --targetPeer string When using a connection profile, the name of the peer to target for this action
--tlsRootCertFiles stringArray If TLS is enabled, the paths to the TLS root cert files of the peers to connect to. The order and number of certs specified should match the --peerAddresses flag
Global Flags:
@@ -147,6 +155,7 @@ Flags:
-h, --help help for queryinstalled
-O, --output string The output format for query results. Default is human-readable plain-text. json is currently the only supported format.
--peerAddresses stringArray The addresses of the peers to connect to
+ --targetPeer string When using a connection profile, the name of the peer to target for this action
--tlsRootCertFiles stringArray If TLS is enabled, the paths to the TLS root cert files of the peers to connect to. The order and number of certs specified should match the --peerAddresses flag
Global Flags:
@@ -174,6 +183,34 @@ Flags:
-h, --help help for getinstalledpackage
--output-directory string The output directory to use when writing a chaincode install package to disk. Default is the current working directory.
--package-id string The identifier of the chaincode install package
+ --peerAddresses stringArray The addresses of the peers to connect to
+ --targetPeer string When using a connection profile, the name of the peer to target for this action
+ --tlsRootCertFiles stringArray If TLS is enabled, the paths to the TLS root cert files of the peers to connect to. The order and number of certs specified should match the --peerAddresses flag
+
+Global Flags:
+ --cafile string Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint
+ --certfile string Path to file containing PEM-encoded X509 public key to use for mutual TLS communication with the orderer endpoint
+ --clientauth Use mutual TLS when communicating with the orderer endpoint
+ --connTimeout duration Timeout for client to connect (default 3s)
+ --keyfile string Path to file containing PEM-encoded private key to use for mutual TLS communication with the orderer endpoint
+ -o, --orderer string Ordering service endpoint
+ --ordererTLSHostnameOverride string The hostname override to use when validating the TLS connection to the orderer
+ --tls Use TLS when communicating with the orderer endpoint
+ --tlsHandshakeTimeShift duration The amount of time to shift backwards for certificate expiration checks during TLS handshakes with the orderer endpoint
+```
+
+
+## peer lifecycle chaincode calculatepackageid
+```
+Calculate the package ID for a packaged chaincode.
+
+Usage:
+ peer lifecycle chaincode calculatepackageid packageFile [flags]
+
+Flags:
+ --connectionProfile string The fully qualified path to the connection profile that provides the necessary connection information for the network. Note: currently only supported for providing peer connection information
+ -h, --help help for calculatepackageid
+ -O, --output string The output format for query results. Default is human-readable plain-text. json is currently the only supported format.
--peerAddresses stringArray The addresses of the peers to connect to
--tlsRootCertFiles stringArray If TLS is enabled, the paths to the TLS root cert files of the peers to connect to. The order and number of certs specified should match the --peerAddresses flag
@@ -463,6 +500,42 @@ identifier returned by `queryinstalled`.
peer lifecycle chaincode getinstalledpackage --package-id myccv1:a7ca45a7cc85f1d89c905b775920361ed089a364e12a9b6d55ba75c965ddd6a9 --output-directory /tmp --peerAddresses peer0.org1.example.com:7051
```
+### peer lifecycle chaincode calculatepackageid example
+
+You can calculate the package ID from a packaged chaincode without installing the chaincode on peers
+using the `peer lifecycle chaincode calculatepackageid` command.
+This command will be useful, for example, in the following cases:
+
+ * When multiple chaincode packages with the same label name are installed,
+ it is possible to identify which ID corresponds to which package later.
+ * To check whether a particular chaincode package is installed or not without
+ installing that package.
+
+Calcuate the package ID for the `mycc.tar.gz` package:
+
+```
+peer lifecycle chaincode calculatepackageid mycc.tar.gz
+```
+
+A successful command will return the package ID for the packaged chaincode.
+
+```
+myccv1:cc7bb5f50a53c207f68d37e9423c32f968083282e5ffac00d41ffc5768dc1873
+```
+
+ * You can also use the `--output` flag to have the CLI format the output as JSON.
+
+ ```
+ peer lifecycle chaincode calculatepackageid mycc.tar.gz --output json
+ ```
+
+ If successful, the command will return the chaincode package ID as JSON.
+
+ ```
+ {
+ "package_id": "myccv1:cc7bb5f50a53c207f68d37e9423c32f968083282e5ffac00d41ffc5768dc1873"
+ }
+ ```
### peer lifecycle chaincode approveformyorg example
@@ -477,8 +550,8 @@ channel `mychannel`.
* Use the `--package-id` flag to pass in the chaincode package identifier. Use
the `--signature-policy` flag to define an endorsement policy for the chaincode.
- Use the `init-required` flag to request the execution of the `Init`
- function to initialize the chaincode.
+ Use the `init-required` flag to require the execution of an initialization function
+ before other chaincode functions can be called.
```
export ORDERER_CA=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
@@ -592,7 +665,7 @@ also outputs which organizations have approved the chaincode definition. If an
organization has approved the chaincode definition specified in the command, the
command will return a value of true. You can use this command to learn whether enough
channel members have approved a chaincode definition to meet the
-`Application/Channel/Endorsement` policy (a majority by default) before the
+`/Channel/Application/Endorsement` policy (a majority by default) before the
definition can be committed to a channel.
* Here is an example of the `peer lifecycle chaincode checkcommitreadiness` command,