Giter Site home page Giter Site logo

fabric-go-sdk's People

Contributors

sxguan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fabric-go-sdk's Issues

变更启动目录后异常

为了开始新项目;
先编辑了对应 配置
$ rg -Tcss "qfab"

go.mod
1:module qfab

main.go
6:      "qfab/sdkInit"
14:     srv_root = "/home/zoomq/go/src/qfab"

config.yaml
12:    path: /home/zoomq/go/src/qfab/fixtures/crypto-config
38:        path: /home/zoomq/go/src/qfab/fixtures/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/tls/client.key
40:        path: /home/zoomq/go/src/qfab/fixtures/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/tls/client.crt
156:      path: /home/zoomq/go/src/qfab/fixtures/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem
185:      path: /home/zoomq/go/src/qfab/fixtures/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
204:      path: /home/zoomq/go/src/qfab/fixtures/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem

(base) zoomq @ ubuntu-s-1vcpu-2gb-sgp1-01 ~/go/src/qfab

docker 先启动后:

$ cd fixtures && docker-compose up -d

Creating network "fixtures_test" with the default driver
Creating volume "fixtures_orderer.example.com" with default driver
Creating volume "fixtures_peer0.org1.example.com" with default driver
Creating volume "fixtures_peer1.org1.example.com" with default driver
Creating couchdb1               ... done
Creating couchdb0               ... done
Creating orderer.example.com ... done
Creating ca.org1.example.com    ... done
Creating peer1.org1.example.com ... done
Creating peer0.org1.example.com ... done

(base) zoomq @ ubuntu-s-1vcpu-2gb-sgp1-01 ~/go/src/qfab/fixtures

$ cd ..
(base) zoomq @ ubuntu-s-1vcpu-2gb-sgp1-01 ~/go/src/qfab

$ go build

# github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/discovery/client
../../pkg/mod/github.com/hyperledger/[email protected]/internal/github.com/hyperledger/fabric/discovery/client/api.go:47:28: undefined: discovery.ChaincodeCall
../../pkg/mod/github.com/hyperledger/[email protected]/internal/github.com/hyperledger/fabric/discovery/client/client.go:83:53: undefined: discovery.ChaincodeInterest
../../pkg/mod/github.com/hyperledger/[email protected]/internal/github.com/hyperledger/fabric/discovery/client/client.go:120:55: undefined: discovery.ChaincodeCall
../../pkg/mod/github.com/hyperledger/[email protected]/internal/github.com/hyperledger/fabric/discovery/client/client.go:124:13: undefined: discovery.ChaincodeInterest
../../pkg/mod/github.com/hyperledger/[email protected]/internal/github.com/hyperledger/fabric/discovery/client/client.go:229:95: undefined: discovery.ChaincodeCall
../../pkg/mod/github.com/hyperledger/[email protected]/internal/github.com/hyperledger/fabric/discovery/client/client.go:247:54: undefined: discovery.ChaincodeCall
../../pkg/mod/github.com/hyperledger/[email protected]/internal/github.com/hyperledger/fabric/discovery/client/client.go:604:38: undefined: discovery.ChaincodeInterest
../../pkg/mod/github.com/hyperledger/[email protected]/internal/github.com/hyperledger/fabric/discovery/client/client.go:620:25: undefined: discovery.ChaincodeCall

同, 另外征信项目相同尝试时, 也一样:
不时出现 discovery.ChaincodeCall 无法完成编译 · Issue #4 · sxguan/education

多组织架构 SaveChannel 错误

fmt.Println(">>>> 使用每个org的管理员身份更新锚节点配置...")
	//do the same get ch client and create channel for each anchor peer as well (first for Org1MSP)
	for i, org := range info.Orgs {
		req = resmgmt.SaveChannelRequest{ChannelID: info.ChannelID,
			ChannelConfigPath: org.OrgAnchorFile,
			SigningIdentities: []msp.SigningIdentity{signIDs[i]}}

		if _, err = org.OrgResMgmt.SaveChannel(req, resmgmt.WithRetry(retry.DefaultResMgmtOpts), resmgmt.WithOrdererEndpoint("orderer.example.com")); err != nil {
			return fmt.Errorf("SaveChannel for anchor org %s error: %v", org.OrgName, err)
		}
	}
	fmt.Println(">>>> 使用每个org的管理员身份更新锚节点配置完成")

关于这段代码,我看示例中是单组织架构,本人配置多组织架构,第一个组织更新成功,后续报错如下:

create channel failed, error: Create channel error: SaveChannel for anchor org Org2 error: create channel failed: create channel failed: SendEnvelope failed: calling orderer 'orderer0.example.com:7050' failed: Orderer Server Status Code: (400) BAD_REQUEST. Description: error applying config update to existing channel 'businesschannel': error authorizing update: error validating ReadSet: proposed update requires that key [Group]  /Channel/Application be at version 0, but it is currently at version 1

根据查阅,显示已经更新过通道了,所以报错了,请问怎么回事?

启动节点出问题

cd /fabric-go-sdk/fixtures/ && docker-compose up -d

应该是 cd ./fabric-go-sdk/fixtures/ && docker-compose up -d

还有,我用的虚拟机,默认关闭防火墙,docker启动失败,
ERROR: Failed to Setup IP tables: Unable to enable SKIP DNAT rule: (iptables failed: iptables --wait -t nat -I DOCKER -i br-71c3b7ab98c2 -j RETURN: iptables: No chain/target/match by that name.
得重新打开防火墙才行

提交链码时报错

开始创建通道......

使用每个org的管理员身份更新锚节点配置...
使用每个org的管理员身份更新锚节点配置完成
创建通道成功
加入通道......
加入通道成功
开始打包链码......
打包链码成功
开始安装链码......
安装链码成功
组织认可智能合约定义......
chaincode approved by Org1 peers:
peer0.org1.example.com:7051
peer1.org1.example.com:9051
[fabsdk/util] 2022/11/22 23:39:27 UTC - lazyref.(*Reference).refreshValue -> WARN Error - initializer returned error: load MSPs from config failed: configure MSP failed: sanitizeCert failed the supplied identity is not valid: x509: certificate signed by unknown authority. Will retry again later
[fabsdk/util] 2022/11/22 23:40:27 UTC - lazyref.(*Reference).refreshValue -> WARN Error - initializer returned error: load MSPs from config failed: configure MSP failed: sanitizeCert failed the supplied identity is not valid: x509: certificate signed by unknown authority. Will retry again later
create chaincode lifecycle error: queryApprovedCC error: Org Org1 Peer peer0.org1.example.com:7051 NewInvoker error: Test status Code: (12) UNKNOWN. Description: LifecycleQueryApprovedCC returned error: querying for installed chaincode failed: Transaction processing for endorser [peer0.org1.example.com:7051]: Chaincode status Code: (500) UNKNOWN. Description: failed to invoke backing implementation of 'QueryApprovedChaincodeDefinition': could not fetch approved chaincode definition (name: 'simplecc', sequence: '1') on channel 'mychannel'exit status 255

这个问题大家有遇到过么 求指教

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.