Tape编译完成后,执行压测出现了问题
控制台报错如下: 2025/08/05 02:41:12 debug logging disabled 2025/08/05 02:41:12 debug logging disabled For FAQ, please check https://github.com/Hyperledger-TWGC/tape/wiki/FAQ panic: Received nil message, but expect a valid block instead. You could look into your peer logs for more info
goroutine 59 [running]: github.com/hyperledger-twgc/tape/pkg/infra/observer.(*CommitObserver).Start(0xc00014ea10) /home/qly/batteryBlockchain/tape/pkg/infra/observer/commitObserver.go:85 +0x60e created by github.com/hyperledger-twgc/tape/pkg/infra/cmdImpl.Process /home/qly/batteryBlockchain/tape/pkg/infra/cmdImpl/fullProcess.go:54 +0x9ca
查看docker-peer节点的日志,输出如下: 2025-08-05 09:24:34.295 UTC [common.deliver] deliverBlocks -> WARN 158 [channel: appchannel] Client authorization revoked for deliver request from 172.18.0.1:51026: Failed evaluating policy on signed data during check policy on channel [appchannel] with policy [/Channel/Application/Readers]: [implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Readers' sub-policies to be satisfied] 2025-08-05 09:24:34.295 UTC [comm.grpc.server] 1 -> INFO 159 streaming call completed grpc.service=protos.Deliver grpc.method=DeliverFiltered grpc.peer_address=172.18.0.1:51026 grpc.code=OK grpc.call_duration=1.51241ms
查看docker-order节点的日志,输出如下: 2025-08-05 09:41:08.165 UTC [comm.grpc.server] 1 -> INFO 29b streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.peer_address=172.18.0.1:34942 error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=10.667242ms 2025-08-05 09:41:12.449 UTC [common.deliver] deliverBlocks -> WARN 29c [channel: appchannel] Client authorization revoked for deliver request from 172.18.0.1:55376: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Readers' sub-policies to be satisfied: permission denied 2025-08-05 09:41:12.449 UTC [comm.grpc.server] 1 -> INFO 29d streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=172.18.0.1:55376 grpc.code=OK grpc.call_duration=1.450479ms 2025-08-05 09:41:12.467 UTC [orderer.common.broadcast] Handle -> WARN 29e Error reading from 172.18.0.1:55388: rpc error: code = Canceled desc = context canceled 2025-08-05 09:41:12.467 UTC [comm.grpc.server] 1 -> INFO 29f streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.peer_address=172.18.0.1:55388 error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=14.294384ms 2025-08-05 09:48:39.204 UTC [common.deliver] deliverBlocks -> WARN 2a0 [channel: appchannel] Client authorization revoked for deliver request from 172.18.0.1:40592: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Readers' sub-policies to be satisfied: permission denied 2025-08-05 09:48:39.205 UTC [comm.grpc.server] 1 -> INFO 2a1 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=172.18.0.1:40592 grpc.code=OK grpc.call_duration=1.740654ms
隐式策略评估失败-满足0个子策略,但此策略要求满足“读者”子策略中的1个子策略:权限被拒绝
endorsement policy不满足。
这是我的config.yaml文件,请问是这里有问题吗?
这是我的config.yaml文件,请问是这里有问题吗?
![]()
emmmm 老实说我不知道。因为你看要和你的channel配置对应,我不知道你channel配置什么样子。。。 https://github.com/Hyperledger-TWGC/tape/blob/master/test/config14org1andorg2.yaml 这里有e2e测试的例子,对应AB转账的fabric samples,请自行参考。
@SamYuan1990 你好,我出现了和这个issue中相似的情况, 控制台报错完全一样 `2025/09/24 15:10:23 debug logging disabled 2025/09/24 15:10:23 debug logging disabled For FAQ, please check https://github.com/Hyperledger-TWGC/tape/wiki/FAQ query panic: Received nil message, but expect a valid block instead. You could look into your peer logs for more info
goroutine 323 [running]:
github.com/hyperledger-twgc/tape/pkg/infra/observer.(*CommitObserver).Start(0xc0004d25b0)
/home/ziyang/fabric/fabric-samples-main/test-network/tape-master/pkg/infra/observer/commitObserver.go:88 +0x5b2
created by github.com/hyperledger-twgc/tape/pkg/infra/cmdImpl.Process in goroutine 1
/home/ziyang/fabric/fabric-samples-main/test-network/tape-master/pkg/infra/cmdImpl/fullProcess.go:94 +0xb35
而查看peer2节点的docker日志发现2025-09-24 07:25:06.762 UTC 0085 WARN [policies] SignatureSetToValidIdentities -> invalid identity error="the supplied identity is not valid: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.org1.example.com")" identity="(mspid=Org1MSP [email protected],OU=client,L=San Francisco,ST=California,C=US issuer=CN=ca.org1.example.com,O=org1.example.com,L=San Francisco,ST=California,C=US serialnumber=95970028035109945927959477176148853860)"
2025-09-24 07:25:06.762 UTC 0086 WARN [policies] SignatureSetToValidIdentities -> invalid identity error="the supplied identity is not valid: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.org1.example.com")" identity="(mspid=Org1MSP [email protected],OU=client,L=San Francisco,ST=California,C=US issuer=CN=ca.org1.example.com,O=org1.example.com,L=San Francisco,ST=California,C=US serialnumber=95970028035109945927959477176148853860)"
2025-09-24 07:25:06.762 UTC 0087 WARN [policy] CheckPolicyBySignedData -> Failed evaluating policy on signed data error="implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Readers' sub-policies to be satisfied" policyName=/Channel/Application/Readers identities="(mspid=Org1MSP [email protected],OU=client,L=San Francisco,ST=California,C=US issuer=CN=ca.org1.example.com,O=org1.example.com,L=San Francisco,ST=California,C=US serialnumber=95970028035109945927959477176148853860)"
2025-09-24 07:25:06.762 UTC 0088 WARN [common.deliver] deliverBlocks -> [channel: mychannel] Client 192.168.32.1:55182 is not authorized: Failed evaluating policy on signed data during check policy on channel [mychannel] with policy [/Channel/Application/Readers]: [implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Readers' sub-policies to be satisfied]
2025-09-24 07:25:06.762 UTC 0089 INFO [comm.grpc.server] 1 -> streaming call completed grpc.service=protos.Deliver grpc.method=DeliverFiltered grpc.peer_address=192.168.32.1:55182 grpc.code=OK grpc.call_duration=1.061964ms
`
查看日志报错发现子策略不满足似乎是由于身份验证失败导致的。
我使用的config.yaml基于https://github.com/Hyperledger-TWGC/tape/blob/master/test/config14org1andorg2.yaml,修改了tls_ca_cert的路径,以及调用链码的args,其他未作修改
我部署fabric使用的是从Hyperledger仓库下载的master分支的fabric-samples中的test-network,配合Hyperledger仓库下载的v2.5.4的fabric二进制文件以及1.5.15的ca二进制文件(没有使用ca方式启动,不太清楚这个有没有影响)
启动网络所用指令为:
./network.sh up createChannel
./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-go -ccl go
配置了二进制文件的路径后
export PATH=${PWD}/../bin:$PATH
export FABRIC_CFG_PATH=$PWD/../config/
我调用链码进行测试,能够正确反馈
ziyang@ziyang-158:~/fabric/fabric-samples-main/test-network$ peer chaincode query -C mychannel -n basic -c '{"Args":["GetAllAssets"]}' [{"AppraisedValue":300,"Color":"blue","ID":"asset1","Owner":"Tomoko","Size":5},{"AppraisedValue":400,"Color":"red","ID":"asset2","Owner":"Brad","Size":5},{"AppraisedValue":500,"Color":"green","ID":"asset3","Owner":"Jin Soo","Size":10},{"AppraisedValue":600,"Color":"yellow","ID":"asset4","Owner":"Max","Size":10},{"AppraisedValue":700,"Color":"black","ID":"asset5","Owner":"Adriana","Size":15},{"AppraisedValue":800,"Color":"white","ID":"asset6","Owner":"Michel","Size":15}]
在使用tape工具时,我将源代码copy到test-network目录下,并在tape-master文件夹下编译,通过运行二进制文件tape使用,即命令 ./tape --config=config.yaml --number=40000 在运行前,我使用命令cp -r ../organizations ./organizations将由cryptogen生成的证书目录拷贝到tape文件夹下,请问我接下来该如何排查问题呢 之前做过的尝试是,更换config.yaml中tls_ca_cert的路径,我曾将order节点的tls_ca_cert路径更换为fabric文档中调用链码指令中提到的“${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem”,报错仍然不变
而查看peer2节点的docker日志发现2025-09-24 07:25:06.762 UTC 0085 WARN [policies] SignatureSetToValidIdentities -> invalid identity error="the supplied identity is not valid: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.org1.example.com")" identity="(mspid=Org1MSP subject=CN=[email protected],OU=client,L=San Francisco,ST=California,C=US issuer=CN=ca.org1.example.com,O=org1.example.com,L=San Francisco,ST=California,C=US serialnumber=95970028035109945927959477176148853860)"
自签名证书问题我这边解决不了的。
@SamYuan1990 非常感谢回复,请问之前测试过能支持tape的fabric版本是什么,以及启动fabric网络时,是否需要额外对自签名证书进行配置或使用默认选项, 我后续将做更多尝试,如果能跑通,我会继续寻找和我之前遇到bug时的差异,并反馈给技术组
@SamYuan1990 非常感谢回复,请问之前测试过能支持tape的fabric版本是什么,以及启动fabric网络时,是否需要额外对自签名证书进行配置或使用默认选项, 我后续将做更多尝试,如果能跑通,我会继续寻找和我之前遇到bug时的差异,并反馈给技术组
https://github.com/Hyperledger-TWGC/tape/actions/runs/17886529185 测试效果在这里,从github action入口看吧。今日用vibe coding的话,理解代码不难。
@SamYuan1990 非常感谢回复,请问之前测试过能支持tape的fabric版本是什么,以及启动fabric网络时,是否需要额外对自签名证书进行配置或使用默认选项, 我后续将做更多尝试,如果能跑通,我会继续寻找和我之前遇到bug时的差异,并反馈给技术组
https://github.com/Hyperledger-TWGC/tape/actions/runs/17886529185 测试效果在这里,从github action入口看吧。今日用vibe coding的话,理解代码不难。
@ryjones , I want to know if we have any plan for https://deepwiki.com/?
@SamYuan1990 it was demonstrated at the TAC call a few weeks ago but I don't know if we have plans
@SamYuan1990 it was demonstrated at the TAC call a few weeks ago but I don't know if we have plans
I don't mind to attempt deepwiki with this repo, but I was stopped when processing. as a mail address is needed during deepwiki process. @ryjones , could you please check if deepwiki is free for opensource and for us for know and who should be actionable for the config?(I am not sure if github api key or auth needed)
@SamYuan1990 that sounds like a good research project for you. I don't have the time to dig into it, sorry
@SamYuan1990 非常感谢昨天提供的思路,我仔细对比了技术组集成测试的流程和我部署fabric、部署tape的方法,发现二者相同,因此我初步判断应该是fabric使用的证书以及tape所读取证书不一致导致
我在hyperledger/fabric-samples的仓库中寻找证书相关issue,发现
#1330和我的问题高度一致,按照hyperledger技术组人员的回答,我在关闭fabric的test-network网络后使用命令docker system prune --volumes清理了docker volumes,之后重新启动test-network并创建channel以及安装链码,cp证书到tape目录后,直接运行二进制tape文件,得到正确结果。
From Orderer Time 0.38s Block 56 Tx 10
Time 0.39s Block 32 Tx 10
Time 0.40s Block 33 Tx 10
Time 0.41s Block 34 Tx 10
Time 0.42s Block 35 Tx 10
Time 0.43s Block 36 Tx 10
Time 0.45s Block 37 Tx 10
Time 0.45s Block 38 Tx 10
Time 0.46s Block 39 Tx 10
Time 0.47s Block 40 Tx 10
Time 0.48s Block 41 Tx 10
Time 0.49s Block 42 Tx 10
Time 0.50s Block 43 Tx 10
Time 0.51s Block 44 Tx 10
Time 0.52s Block 45 Tx 10
Time 0.53s Block 46 Tx 10
Time 0.54s Block 47 Tx 10
Time 0.55s Block 48 Tx 10
Time 0.56s Block 49 Tx 10
Time 0.57s Block 50 Tx 10
Time 0.58s Block 51 Tx 10
Time 0.59s Block 52 Tx 10
Time 0.60s Block 53 Tx 10
Time 0.61s Block 54 Tx 10
Time 0.62s Block 55 Tx 10
Time 0.63s Block 56 Tx 10
tx: 500, duration: 634.680472ms, tps: 787.797990
btw,我在测试时发现使用二进制tape文件以及在docker中运行tape时,config.yaml的写法支持程度不同。在直接运行二进制文件时,我的节点地址addr必须写成addr: localhost:7051的形式,再用ssl_target_name_override: peer0.org1.example.com补充域名,而在docker容器中运行tape则可以将addr直接写为peer0.org1.example.com:7051,作为docker的初学者,我还没有完全理解原因。
最后,希望能对issue提出者 @qinleiyong 提供些许帮助
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
