Professional Documents
Culture Documents
03
Exploring test-network with Hyperledger Fabric
2. Prepare
Cách 1: Sử dụng công cụ MobaXterm để truy cập từ xa đến máy ảo theo địa chỉ IP:
wandertour.ddns.net, port 25, username: hyperledger, pass: 123456
C:\Users\ABC>ssh -p 25 hyperledger@wandertour.ddns.net
You can now query the ledger from your CLI. Run the following command to get the
list of assets that were added to your channel ledger:
dutchain@vmhyper:~/fabric-samples/test-network$ peer chaincode query -C mychannel -n
basic -c '{"Args":["GetAllAssets"]}'
Chaincodes are invoked when a network member wants to transfer or change an asset
on the ledger. Use the following command to change the owner of an asset on the ledger
by invoking the asset-transfer (basic) chaincode:
Because the endorsement policy for the asset-transfer (basic) chaincode requires the
transaction to be signed by Org1 and Org2, the chaincode invoke command needs to
target both peer0.org1.example.com and peer0.org2.example.com using the --peerAddresses flag.
{"ID":"asset6","color":"white","size":15,"owner":"Christopher","appraisedValue":800}
You can use the following command to examine the MSP folder of the Org1 admin
user:
hyperledger@vmhyper:~/fabric-samples/test-network$ tree
organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/
The command will reveal the MSP folder structure and configuration file:
organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/
└── msp
├── IssuerPublicKey
├── IssuerRevocationPublicKey
├── cacerts
│ └── localhost-7054-ca-org1.pem
├── config.yaml
├── keystore
│ └── 58e81e6f1ee8930df46841bf88c22a08ae53c1332319854608539ee78ed2fd65_sk
├── signcerts
│ └── cert.pem
└── user
7. REFERENCE
[1]. https://hyperledger-fabric.readthedocs.io/en/latest/test_network.html
-----------------------------------------------