fabric-examples's People
Forkers
wtsoftware habpygo someoneapp hunanhebin llqq123 yluo4 llhl001 penhchet tyhtao1990 3for pjt3591oo charlenemayy chenhuangyin gtt116 sh777 readhelper blockdaemon plrwoodhead uppercaveman shirikatsu maxrobot enterstudio lalloni sanguohot wassimz qsupremacy jonnycrunch yuluxs007 dot-h mfaisaltariq robinsonxie snowdicex xwhl lifezq bstasyszyn tocm pzqm007 fengyunjituan devos50 dalianwang074 simon0210 kkjslee wewebsterchen maggiengwu kykini gonzalobellino iceriverdog jonaskahn sjt931124 smatterersean grishanail ahmedsajid six-days sanqima stlfsunqiang zuolongxiao singhravipratap thezaidbintariq jgr-great triasteam dididadididafabric-examples's Issues
Add support for go module?
returned error: user not found
没有启动fabric-ca服务
user, err := mspClient.GetSigningIdentity("Admin")
GetSigningIdentity returned error: user not found
make example-network returns error
$ make example-network
Service 'org1peer1' depends on service 'chaincoded' which is undefined.
make: *** [Makefile:49: example-network] Error 1
when print response of chaincode invoke, payload is displayed in chaos.
in the func PrintProposalResponse of printer/blockprinter.go
need change like below:
313 p.Field("Payload", string(response.Payload)) --> p.Field("Payload", Base64URLEncode(response.Payload))
Add support for PKCS11
When trying to use pkcs11 as security provider under BCCSP, we get the following error:
[fabsdk] 2019/01/07 21:43:33 UTC - defcore.(*ProviderFactory).CreateCryptoSuiteProvider -> WARN default provider factory doesn't support 'pkcs11' crypto provider [fabriccli] 2019/01/07 21:43:33 UTC - chaincode.glob..func2 -> ERRO Error while initializing getAction: a peer must be specified
How to run this tool when using a remote Fabric network?
I have a remote Fabric network (ie. HSBN) to which I have credentials provided to me post-network creation. There is no way to regenerate the MSP data directory structure and attempting to run this cli tool against the remote network results in the following error:
panic: Error getting user for org PeerOrg1: Error finding the private key path: Could not read directory open /root/go/src/github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/fixtures/channel/crypto-config/peerOrganizations/PeerOrg1.example.com/users/[email protected]/keystore: no such file or directory, err /root/go/src/github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/fixtures/channel/crypto-config/peerOrganizations/PeerOrg1.example.com/users/[email protected]/keystore
root@loadtest:~/go/src/github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli# ./fabric-cli --config 4ecc/4ecc-config.yaml --orgid PeerOrg1 --user admin --pw <> query info
2017-08-20 21:30:56.693 CDT [fabric_sdk_go] InitConfigWithCmdRoot -> INFO 001 Using config file: 4ecc/4ecc-config.yaml
2017-08-20 21:30:56.694 CDT [fabric_sdk_go] InitConfigWithCmdRoot -> INFO 002 fabric_sdk_go Logging level: warning
21:30:56.694 [bccsp_sw] DEBU : KeyStore path [/tmp/msp-4ecc/keystore] missing [true]: []
21:30:56.694 [bccsp_sw] DEBU : Creating KeyStore at [/tmp/msp-4ecc/keystore]...
21:30:56.694 [bccsp_sw] DEBU : KeyStore created at [/tmp/msp-4ecc/keystore].
21:30:56.694 [bccsp_sw] DEBU : KeyStore opened at [/tmp/msp-4ecc/keystore]...done
21:30:56.695 [bccsp_sw] DEBU : KeyStore path [/tmp/msp-4ecc/keystore] missing [true]: []
21:30:56.695 [bccsp_sw] DEBU : Creating KeyStore at [/tmp/msp-4ecc/keystore]...
21:30:56.695 [bccsp_sw] DEBU : KeyStore created at [/tmp/msp-4ecc/keystore].
21:30:56.695 [bccsp_sw] DEBU : KeyStore opened at [/tmp/msp-4ecc/keystore]...done
21:30:56.695 [bccsp] DEBU : Initialize BCCSP [SW]
21:30:56.695 [bccsp_sw] DEBU : KeyStore path [/tmp/msp-4ecc/keystore] missing [true]: []
21:30:56.695 [bccsp_sw] DEBU : Creating KeyStore at [/tmp/msp-4ecc/keystore]...
21:30:56.695 [bccsp_sw] DEBU : KeyStore created at [/tmp/msp-4ecc/keystore].
21:30:56.695 [bccsp_sw] DEBU : KeyStore opened at [/tmp/msp-4ecc/keystore]...done
panic: Error getting user for org PeerOrg1: Error finding the private key path: Could not read directory open /root/go/src/github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/fixtures/channel/crypto-config/peerOrganizations/PeerOrg1.example.com/users/[email protected]/keystore: no such file or directory, err /root/go/src/github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/fixtures/channel/crypto-config/peerOrganizations/PeerOrg1.example.com/users/[email protected]/keystoregoroutine 1 [running]:
github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/common.(*Action).OrgUser(0xc42022d980, 0x7ffe45bd472e, 0x8, 0x0, 0x0)
/root/go/src/github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/common/action.go:287 +0x1ae
github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/common.(*Action).Initialize(0xc42022d980, 0xc42022ccc0, 0xc4201d5cd8, 0x89593f)
/root/go/src/github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/common/action.go:144 +0x1348
github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/query.newQueryInfoAction(0xc42022ccc0, 0xc42022ccc0, 0x88cff4, 0xc42022ccc0)
/root/go/src/github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/query/queryinfocmd.go:51 +0x4a
github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/query.glob..func4(0x1244e60, 0xc4202be300, 0x0, 0x8)
/root/go/src/github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/query/queryinfocmd.go:22 +0x3d
github.com/securekey/fabric-examples/fabric-cli/vendor/github.com/spf13/cobra.(*Command).execute(0x1244e60, 0xc4202be000, 0x8, 0x8, 0x1244e60, 0xc4202be000)
/root/go/src/github.com/securekey/fabric-examples/fabric-cli/vendor/github.com/spf13/cobra/command.go:648 +0x234
github.com/securekey/fabric-examples/fabric-cli/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc42021cd80, 0x1243f80, 0x1243920, 0x1244c40)
/root/go/src/github.com/securekey/fabric-examples/fabric-cli/vendor/github.com/spf13/cobra/command.go:734 +0x339
github.com/securekey/fabric-examples/fabric-cli/vendor/github.com/spf13/cobra.(*Command).Execute(0xc42021cd80, 0xc420000340, 0xc420000340)
/root/go/src/github.com/securekey/fabric-examples/fabric-cli/vendor/github.com/spf13/cobra/command.go:693 +0x2b
main.main()
/root/go/src/github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/fabric-cli.go:50 +0x2f
Error when attempting to instantiate chaincode: cannot find package
I am using the example network to attempt to deploy custom chaincode:
$ make example-network
and installing, in this instance, EVM chaincode:
$ go run fabric-cli.go chaincode install --ccp=github.com/hyperledger/fabric-chaincode-evm/evmcc --ccid=EvmCC --v v0 --gopath /home/me/go --config ../../test/fixtures/config/config_test_local.yaml
Installing chaincode EvmCC on org[org1] peers:
-- localhost:7051
-- localhost:7151
...successfuly installed chaincode EvmCC.v0 on peer localhost:7151.
...successfuly installed chaincode EvmCC.v0 on peer localhost:7051.
Installing chaincode EvmCC on org[org2] peers:
-- localhost:8051
-- localhost:9051
...successfuly installed chaincode EvmCC.v0 on peer localhost:9051.
...successfuly installed chaincode EvmCC.v0 on peer localhost:8051.
then instantiating results in an error that references unrecognised imports:
go run fabric-cli.go chaincode instantiate --cid orgchannel --ccp=github.com/hyperledger/fabric-chaincode-evm/evmcc --ccid=EvmCC --v v0 --args '{"Args":[]}' --policy "AND('Org1MSP.member','Org2MSP.member')" --config ../../test/fixtures/config/config_test_local.yaml
[fabriccli] 2019/01/04 11:04:20 UTC - chaincode.glob..func4 -> ERRO Error while running instantiateAction: error instantiating chaincode: sending deploy transaction proposal failed: Transaction processing for endorser [localhost:7051]: Chaincode status Code: (500) UNKNOWN. Description: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/hyperledger/fabric-chaincode-evm/evmcc/evmcc.go:15:2: cannot find package "github.com/golang/protobuf/proto" in any of:
/opt/go/src/github.com/golang/protobuf/proto (from $GOROOT)
/chaincode/input/src/github.com/golang/protobuf/proto (from $GOPATH)
/opt/gopath/src/github.com/golang/protobuf/proto
chaincode/input/src/github.com/hyperledger/fabric-chaincode-evm/evmcc/evmcc.go:16:2: cannot find package "github.com/hyperledger/burrow/account" in any of:
/opt/go/src/github.com/hyperledger/burrow/account (from $GOROOT)
/chaincode/input/src/github.com/hyperledger/burrow/account (from $GOPATH)
/opt/gopath/src/github.com/hyperledger/burrow/account
chaincode/input/src/github.com/hyperledger/fabric-chaincode-evm/evmcc/evmcc.go:17:2: cannot find package "github.com/hyperledger/burrow/binary" in any of:
/opt/go/src/github.com/hyperledger/burrow/binary (from $GOROOT)
/chaincode/input/src/github.com/hyperledger/burrow/binary (from $GOPATH)
/opt/gopath/src/github.com/hyperledger/burrow/binary
chaincode/input/src/github.com/hyperledger/fabric-chaincode-evm/evmcc/evmcc.go:18:2: cannot find package "github.com/hyperledger/burrow/execution/evm" in any of:
/opt/go/src/github.com/hyperledger/burrow/execution/evm (from $GOROOT)
/chaincode/input/src/github.com/hyperledger/burrow/execution/evm (from $GOPATH)
/opt/gopath/src/github.com/hyperledger/burrow/execution/evm
chaincode/input/src/github.com/hyperledger/fabric-chaincode-evm/evmcc/evmcc.go:19:2: cannot find package "github.com/hyperledger/burrow/logging" in any of:
/opt/go/src/github.com/hyperledger/burrow/logging (from $GOROOT)
/chaincode/input/src/github.com/hyperledger/burrow/logging (from $GOPATH)
/opt/gopath/src/github.com/hyperledger/burrow/logging
chaincode/input/src/github.com/hyperledger/fabric-chaincode-evm/evmcc/evmcc.go:20:2: cannot find package "github.com/hyperledger/fabric-chaincode-evm/event" in any of:
/opt/go/src/github.com/hyperledger/fabric-chaincode-evm/event (from $GOROOT)
/chaincode/input/src/github.com/hyperledger/fabric-chaincode-evm/event (from $GOPATH)
/opt/gopath/src/github.com/hyperledger/fabric-chaincode-evm/event
chaincode/input/src/github.com/hyperledger/fabric-chaincode-evm/evmcc/evmcc.go:21:2: cannot find package "github.com/hyperledger/fabric-chaincode-evm/statemanager" in any of:
/opt/go/src/github.com/hyperledger/fabric-chaincode-evm/statemanager (from $GOROOT)
/chaincode/input/src/github.com/hyperledger/fabric-chaincode-evm/statemanager (from $GOPATH)
/opt/gopath/src/github.com/hyperledger/fabric-chaincode-evm/statemanager
chaincode/input/src/github.com/hyperledger/fabric-chaincode-evm/evmcc/evmcc.go:26:2: cannot find package "golang.org/x/crypto/sha3" in any of:
/opt/go/src/golang.org/x/crypto/sha3 (from $GOROOT)
/chaincode/input/src/golang.org/x/crypto/sha3 (from $GOPATH)
/opt/gopath/src/golang.org/x/crypto/sha3
"
As a test I included an extra import to the successfully instantiating example_cc.go
code (and an extra omitted line to silence the unused import error):
...
import (
"fmt"
"strconv"
"github.com/hyperledger/fabric/core/chaincode/shim"
pb "github.com/hyperledger/fabric/protos/peer"
"github.com/golang/protobuf/proto" // The added import
)
...
and instantiating this failed with:
$ go run fabric-cli.go chaincode instantiate --cid orgchannel --ccp=github.com/securekey/example_cc --ccid ExampleCC --v v0 --args '{"Args":["A","1","B","2"]}' --policy "AND('Org1MSP.member','Org2MSP.member')" --config ../../test/fixtures/config/config_test_local.yaml
[fabriccli] 2019/01/04 14:20:43 UTC - chaincode.glob..func4 -> ERRO Error while running instantiateAction: error instantiating chaincode: sending deploy transaction proposal failed: Transaction processing for endorser [localhost:7051]: Chaincode status Code: (500) UNKNOWN. Description: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 2 "# github.com/securekey/example_cc
chaincode/input/src/github.com/securekey/example_cc/example_cc.go:38:2: undefined: proto
"
It seems as though other external imports are somehow not found. Is this due to the fact that they are not installed on the peer and as such only Hyperledger libraries are usable without manual installation? How would one install dependencies of chaincode like this?
Prometheus client library packages not found in chain code container spun by peer container
Hi,
I am trying to custom instrument my sample chaincode example_cc using Prometheus client golang library. The program works correctly natively in non-container environment. It fails at run time when I try to containerize the change [specifically at the instantiate step - when peer container tries to build chaincode example_cc with shim into an image and start the image in its own dev chaincode container]. I have used Go Module dependency resolution. I am using go.mod and go.sum mechanisms to resolve dependencies. I am seeing the following errors:
++++
hlbcadmin@ubuntu:~/go/src/github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli$ go run fabric-cli.go chaincode instantiate --cid orgchannel --ccp=github.com/securekey/example_cc --ccid ExampleCC --v v0 --args '{"Args":["A","1","B","2"]}' --policy "AND('Org1MSP.member','Org2MSP.member')" --config ../../test/fixtures/config/config_test_local.yaml
[fabriccli] 2019/06/12 13:06:05 UTC - chaincode.glob..func4 -> ERRO Error while running instantiateAction: error instantiating chaincode: sending deploy transaction proposal failed: Transaction processing for endorser [localhost:7051]:
Chaincode status Code: (500) UNKNOWN. Description: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/securekey/example_cc/example_cc.go:27:5: cannot find package "github.com/prometheus/client_golang/prometheus" in any of:
/opt/go/src/github.com/prometheus/client_golang/prometheus (from $GOROOT)
/chaincode/input/src/github.com/prometheus/client_golang/prometheus (from $GOPATH)
/opt/gopath/src/github.com/prometheus/client_golang/prometheus
chaincode/input/src/github.com/securekey/example_cc/example_cc.go:29:2: cannot find package "github.com/prometheus/client_golang/prometheus/promauto" in any of:
/opt/go/src/github.com/prometheus/client_golang/prometheus/promauto (from $GOROOT)
/chaincode/input/src/github.com/prometheus/client_golang/prometheus/promauto (from $GOPATH)
/opt/gopath/src/github.com/prometheus/client_golang/prometheus/promauto
chaincode/input/src/github.com/securekey/example_cc/example_cc.go:28:5: cannot find package "github.com/prometheus/client_golang/prometheus/promhttp" in any of:
/opt/go/src/github.com/prometheus/client_golang/prometheus/promhttp (from $GOROOT)
/chaincode/input/src/github.com/prometheus/client_golang/prometheus/promhttp (from $GOPATH)
/opt/gopath/src/github.com/prometheus/client_golang/prometheus/promhttp
"
++++
My question - where exactly should I stage my vendor folder with client library packages for Prometheus and how do I make the child container spun by peer with chaincode+shim in to find the Prometheus client packages?
I am willing to share my project as a zip file if that helps. Thanks.
fabric-cli.go:10:2: no Go files in fabric-examples/fabric-cli/cmd
The import statement in
imports a single fabric-cli folder and it contains no GO files.
I think the import statement should be
github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/cmd
If yes, please let me know I'll create a pull request.
`go get` fails with "unexpected module path"
Hi,
I am trying to import your printer
package in a piece of code. But the import fails with the following errors:
- GO111MODULE=off:
package github.com/securekey/fabric-examples/fabric-cli/config: cannot find package "github.com/securekey/fabric-examples/fabric-cli/config" in any of:
/usr/local/go/src/github.com/securekey/fabric-examples/fabric-cli/config (from $GOROOT)
/home/doth/go/src/github.com/securekey/fabric-examples/fabric-cli/config (from $GOPATH)
- GO111MODULE=on:
go: finding github.com/hyperledger/fabric-sdk-go/pkg/client/msp latest
go: finding github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/printer latest
go: finding github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli latest
go: finding github.com/hyperledger/fabric-sdk-go/pkg/client latest
go: finding github.com/hyperledger/fabric-sdk-go/pkg latest
go: github.com/securekey/fabric-examples/fabric-cli/cmd/[email protected]: parsing go.mod: unexpected module path "github.com/securekey/fabric-examples/fabric-cli"
go: error loading module requirements
It seems that it comes from the fact that the packages refers to the path "github.com/securekey/fabric-examples/fabric-cli" while the code is in "github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli".
I managed to workaround the issue when GO111MODULE=off
by copying the code in "cmd/fabric-cli" directly where go is expecting it.
Am I missing something when doing the go get
?
invalid operation: kr == nil (mismatched types csr.KeyRequest and nil)
My Go Version:
go version go1.14.4 darwin/amd64
When I go get github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli
I get to following error:
# github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/util
../../../Dev/src/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/util/csp.go:46:8: invalid operation: kr == nil (mismatched types csr.KeyRequest and nil)
../../../Dev/src/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/util/csp.go:119:37: cannot use req.KeyRequest (type *csr.KeyRequest) as type csr.KeyRequest in argument to getBCCSPKeyOpts
# github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations
../../../Dev/src/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/core/operations/system.go:227:23: not enough arguments in call to s.statsd.SendLoop
have (<-chan time.Time, string, string)
want (context.Context, <-chan time.Time, string, string)
Does that means the version of fabric related packages is not right?
../../../Dev
is my GOPATH.
when run go run fabric-cli.go chaincode query,what is the correct result?
after i run the cmd:go run fabric-cli.go chaincode query --cid orgchannel --ccid ExampleCC --args '{"Func":"query","Args":["A"]}' --peer localhost:7051,localhost:8051 --payload --config ../../test/fixtures/config/config_test_local.yaml
the result is:
*** 0 successfull query(s) out of 1
*** 0 successfull query(s) out of 1
*** 0 successfull query(s) out of 1
*** 0 successfull query(s) out of 1
*** 0 successfull query(s) out of 1
*** 0 successfull query(s) out of 1
*** 0 successfull query(s) out of 1
***** | Response[0]:
***** | | Payload: 1
***** | Response[1]:
***** | | Payload: 1
is the result correct?
how to do if I want to test my local fabric images
images tag like this:amd64-1.4.1-snapshot-c8072d0
how to modify cfg files?
ERRO Error while running channelCreateAction: GetSigningIdentity returned error: user not found
OS
MacOs 10.13
# fabric-sdk-go version (overridable)
FABRIC_SDK_GO_BRANCH ?= master
FABRIC_SDK_GO_COMMIT ?= 37201e914412e03b048f398ba3cdbf101515f9a3
➜ fabric-cli git:(master) ✗ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
851726b15b42 hyperledger/fabric-peer:x86_64-1.1.0 "peer node start" 22 minutes ago Up 22 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp, 7052/tcp fabsdkgo_org1peer1_1
de52375c8461 hyperledger/fabric-peer:x86_64-1.1.0 "peer node start" 22 minutes ago Up 22 minutes 0.0.0.0:7151->7151/tcp, 0.0.0.0:7153->7153/tcp, 7152/tcp fabsdkgo_org1peer2_1
0173d1db03b2 hyperledger/fabric-peer:x86_64-1.1.0 "peer node start" 22 minutes ago Up 22 minutes 0.0.0.0:9051->9051/tcp, 0.0.0.0:9053->9053/tcp, 9052/tcp fabsdkgo_org2peer2_1
ac12e7224b79 hyperledger/fabric-peer:x86_64-1.1.0 "peer node start" 22 minutes ago Up 22 minutes 0.0.0.0:8051->8051/tcp, 7052/tcp, 0.0.0.0:8053->8053/tcp fabsdkgo_org2peer1_1
b9e8cfed5772 hyperledger/fabric-ca:x86_64-1.1.0 "sh -c 'fabric-ca-se…" 22 minutes ago Up 22 minutes 7054/tcp, 0.0.0.0:8054->8054/tcp fabsdkgo_org2ca1_1
46dca7c4ee8a hyperledger/fabric-ca:x86_64-1.1.0 "sh -c 'fabric-ca-se…" 22 minutes ago Up 22 minutes 0.0.0.0:7054->7054/tcp fabsdkgo_org1ca1_1
53996fe01763 hyperledger/fabric-baseos:x86_64-0.4.6 "tail -F anything" 22 minutes ago Up 22 minutes fabsdkgo_golangruntime_1
f1abd53d1d98 hyperledger/fabric-ccenv:x86_64-1.1.0 "tail -F anything" 22 minutes ago Up 22 minutes fabsdkgo_builder_1
e3733c3a75e9 hyperledger/fabric-orderer:x86_64-1.1.0 "orderer" 23 minutes ago Up 22 minutes 0.0.0.0:7050->7050/tcp fabsdkgo_orderer1_1
➜ fabric-cli git:(master) ✗
I run
go channel create --cid mychannel --txfile ../../fabric-sdk-go/test/fixtures/fabric/v1.1/channel/mychannel.tx --config ../../test/fixtures/config/config_test_local.yaml --cacert ../../test/fixtures/fabric/v1/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/admincerts/[email protected]
but it seems to find the cacert in path: /tmp/state-store/[email protected]. However this cert perm dose not exist in my mac . It is a bug?
Errors when running fabric-cli
I'm receiving this here:
# command-line-arguments
./fabric-cli.go:32: cannot use flags (type *"github.com/spf13/pflag".FlagSet) as type *"github.com/securekey/fabric-examples/fabric-cli/vendor/github.com/spf13/pflag".FlagSet in argument to "github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/common".Config().InitLoggingLevel
./fabric-cli.go:33: cannot use flags (type *"github.com/spf13/pflag".FlagSet) as type *"github.com/securekey/fabric-examples/fabric-cli/vendor/github.com/spf13/pflag".FlagSet in argument to "github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/common".Config().InitUserName
./fabric-cli.go:34: cannot use flags (type *"github.com/spf13/pflag".FlagSet) as type *"github.com/securekey/fabric-examples/fabric-cli/vendor/github.com/spf13/pflag".FlagSet in argument to "github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/common".Config().InitUserPassword
./fabric-cli.go:35: cannot use flags (type *"github.com/spf13/pflag".FlagSet) as type *"github.com/securekey/fabric-examples/fabric-cli/vendor/github.com/spf13/pflag".FlagSet in argument to "github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/common".Config().InitConfigFile
./fabric-cli.go:36: cannot use flags (type *"github.com/spf13/pflag".FlagSet) as type *"github.com/securekey/fabric-examples/fabric-cli/vendor/github.com/spf13/pflag".FlagSet in argument to "github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/common".Config().InitOrdererTLSCertificate
./fabric-cli.go:37: cannot use flags (type *"github.com/spf13/pflag".FlagSet) as type *"github.com/securekey/fabric-examples/fabric-cli/vendor/github.com/spf13/pflag".FlagSet in argument to "github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/common".Config().InitPrintFormat
./fabric-cli.go:38: cannot use flags (type *"github.com/spf13/pflag".FlagSet) as type *"github.com/securekey/fabric-examples/fabric-cli/vendor/github.com/spf13/pflag".FlagSet in argument to "github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/common".Config().InitWriter
./fabric-cli.go:39: cannot use flags (type *"github.com/spf13/pflag".FlagSet) as type *"github.com/securekey/fabric-examples/fabric-cli/vendor/github.com/spf13/pflag".FlagSet in argument to "github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/common".Config().InitOrgIDs
./fabric-cli.go:41: cannot use chaincode.Cmd() (type *"github.com/securekey/fabric-examples/fabric-cli/vendor/github.com/spf13/cobra".Command) as type *"github.com/spf13/cobra".Command in argument to mainCmd.AddCommand
./fabric-cli.go:42: cannot use query.Cmd() (type *"github.com/securekey/fabric-examples/fabric-cli/vendor/github.com/spf13/cobra".Command) as type *"github.com/spf13/cobra".Command in argument to mainCmd.AddCommand
./fabric-cli.go:42: too many errors
Error while attempting to run CLI: undefined: fab.PeerState
After solving dep issues and another superuser GOPATH issues, managed to get make populate
to work.
Then attempting to run the CLI errors with:
$ go run fabric-cli.go
# github.com/securekey/fabric-examples/fabric-cli/cmd/fabric-cli/printer
printer/blockprinter.go:1406:25: undefined: fab.PeerState
Expected to see a list of available commands.
NewUser returned error: Enroll failed: enrollmentSecret required
error while running “go run fabric-cli.go chaincode invoke..."
while running go run fabric-cli.go chaincode invoke --cid orgchannel --ccid=ExampleCC --args '{"Func":"move","Args":["A","B","1"]}' --peer localhost:7051,localhost:8051 --base64 --config ../../test/fixtures/config/config_test_local.yaml
error occurred:[fabriccli] 2019/08/21 00:50:17 UTC - chaincode.glob..func5 -> ERRO Error while running invokeAction: Error getting channel client: error getting user: error creating MSP client: non-existent CA: 'local.ca.org1.example.com'
error when go run fabric-cli.go channel create ......
when I run thie command:
go run fabric-cli.go channel create --cid mychannel --txfile ../../fabric-sdk-go/test/fixtures/fabric/v1.1/channel/mychannel.tx --config ../../test/fixtures/config/config_test_local.yaml
error happened:
[fabriccli] 2018/06/15 09:10:00 UTC - channel.glob..func2 -> ERRO Error while running channelCreateAction: GetSigningIdentity returned error: user not found
failed when ./fabric-cli channel join
I deployed fabric in three nodes. one contain orderer,one contain peer0.org1,one contain pee0.org2.Now i can create channel sucessfully,but when do join channel only peer0.org1 join sucessed.and erroe info is:
Error while running channelJoinAction: Could not join channel: Join channel proposal response error: Transaction processor (8.0.136.38:7051) returned error 'rpc error: code = Unknown desc = chaincode error (status: 500, message: Cannot create ledger from genesis block, due to LedgerID already exists)' for proposal: {{29e9c10fe5abcadee58e9daa70adc2687bdb74a77b67992f3b71cecd3d72435b [21 255 110 74 243 15 213 105 215 239 14 63 95 139 48 119 83 215 25 55 82 165 4 100]} proposal_bytes:"\ ......
please help.thanks!
warn log : due to envelope validation error: timestamp 1970-01-01 00:00:05.961003709 +000
instantiate failed
orderer v1.1.0
two many files in vender
as the title
can not display the payload of event content obviously
in the fun PrintChaincodeEvent of printer/blockprinter.go
pls add a line to display the string of event.Payload to display the event content obviouly.
like below:
p.Field("Payload", Base64URLEncode(event.Payload))
p.Field("Payload not Base64", string(event.Payload))
mychannel.tx is missing
[fabriccli] 2018/11/23 11:29:35 UTC - channel.glob..func2 -> ERRO Error while running channelCreateAction: Error from save channel: opening channel config file failed: open ../fixtures/fabric/v1.1/channel/mychannel.tx: The system cannot find the path specified.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.