我想在调用链代码中的函数时查看日志,以进行调试。我尝试过这样的事情:
var logger = shim.NewLogger("chaincode_example02")
logger.Info("get_caller_data called");
Run Code Online (Sandbox Code Playgroud)
我查看了运行链代码的对等方的日志,但找不到上述日志。我究竟做错了什么?
我曾经使用 Fabric 和 Fabric GoLang SDK 设置 Fabric 网络并部署了 Fabric 网络和基本应用程序。我能够执行查询并写入链。有没有办法检索块信息?像块高度和当前哈希?
+ I'm unable to find out a documentation for GoLang Fabric SDK.
Run Code Online (Sandbox Code Playgroud)
我遵循以下代码和教程,
Fabric 基础应用程序 - 教程 https://chainhero.io/2017/07/tutorial-build-blockchain-app/
使用 GoLang SDK 的 Fabric 基本应用程序 - 代码 https://github.com/chainHero/heroes-service/
GoLang SDK - 官方 SDK https://github.com/hyperledger/fabric-sdk-go
我尝试手动创建first-network而不是使用 byfn.sh 脚本,当我尝试在 cli 容器中创建通道时。
peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
Error: got unexpected status: BAD_REQUEST -- error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining
Run Code Online (Sandbox Code Playgroud)
来自订购者的这个错误:
ERRO 008 Principal deserialization failure (the supplied identity is not valid: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate …Run Code Online (Sandbox Code Playgroud) 我使用 kafka 构建了结构网络。
然后,我创建了 2 个频道,例如“channel_A”和“channel_B”。
现在,我不需要“channel_B”。
所以,我想从我的网络中删除(删除)这个“channel_B”。
有没有办法删除(删除)它?
我正在研究Hyperledger Fabric并运行示例代码。我仍在尝试正确了解事物的工作原理,特别是在用户/管理员注册和使用证书和加密材料的注册方面。
我想知道以下是如何工作的。
1)注册
2)招生
3)用户和管理上下文。
我感到困惑的另一件事是证书或 CA。要使用区块链网络,如何使用我自己的/第三方 x509 类型证书。有可能吗??
在 hyperledger Fabric 文档中的 BYFN 示例中,证书是使用 cryptogen 工具生成的,并用于与 MSP 验证区块链参与情况。
它在现实世界或业务应用场景中是如何工作的。
谢谢
ca x509certificate blockchain hyperledger hyperledger-fabric
我尝试将图像上传到分类帐中(将图像转换为 base64 字符串并将其作为交易中的 arg 传递)。
当我发送大小为 30 kb 的图像时,它工作正常,但是对于 100 kb 的图像,我的交易失败了,指出最大大小为 102400。
我的问题是交易的最大大小和块的最大大小是多少?
尝试启动第一个超级账本网络时出现此错误:
$ ./byfn.sh -m up
Starting with channel 'mychannel' and CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] y
proceeding ...
2018-05-13 07:33:04.240 UTC [main] main -> INFO 001 Exiting.....
LOCAL_VERSION=1.1.0
DOCKER_IMAGE_VERSION=1.1.0
Starting peer1.org1.example.com ... done
Starting peer1.org2.example.com ... done
Starting peer0.org1.example.com ... done
Starting peer0.org2.example.com ... done
Starting orderer.example.com ... done
cli is up-to-date
OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "exec: \"scripts/script.sh\": stat scripts/script.sh: no such file or directory": …Run Code Online (Sandbox Code Playgroud) 为了避免错误和编写高效的 Hyperledger Fabric Chaincode,应该遵循哪些最佳实践?
我一直在关注 Hyperledger Fabric Multi-Org setup 的教程,我能够成功地做到这一点。现在我想根据我想要的组织名称对其进行自定义,并且在尝试连接网络时遇到以下错误。希望有人能帮我找出问题所在。提前致谢。
在 Hyperledger Fabric 文档中,使用了 2 个术语
1. 在对等点上安装链代码
2. 在通道上实例化链代码
这两者之间的主要区别是什么?
在文档中,它说链码可以安装在多个对等点上,但可以实例化一次。我将这一点理解为通道只需要有关通道的信息。
我正在遵循余额转移示例,因此在创建通道后,节点需要加入该通道。
有 2 个节点加入了该通道["peer0.org1.example.com", "peer0.org1.example.com"],因此当我实例化链代码时,它会创建 2 个链代码的 docker 镜像
dev-peer0.org1.example.com-chaincode-v0
dev-peer1.org1.example.com-chaincode-v0
Run Code Online (Sandbox Code Playgroud)
这两张图片的真正含义是什么?
初始化链码不就是通道的意思吗?
或者通道在所有加入它的对等点上初始化它?
这个初始化实际上发生在哪里?
谢谢!